Does anyone know how I can correct my test bench t...
# magic
j
Does anyone know how I can correct my test bench to simulate a design taken from magic with a subcircuit?
l
Where is the inverter subcircuit's spice file?
j
as the subcircuit is flattened, the transistors appear in the spice
l
The subcircuit has only two terminals, VDD and GND. The other terminals aren't listed.
It seems it is a ring oscillator...
j
It is connected inside
Yes
l
Copy code
X0 vout1 vout3 GND GND inverter_blo
X1 vout2 vout1 GND GND inverter_blo
X2 vout3 vout2 GND GND inverter_blo
X3 vout3 vout2 VDD VDD inverter_blo
X4 vout1 vout3 VDD VDD inverter_blo
X5 vout2 vout1 VDD VDD inverter_blo
It has four terminals here in your testbench file. That is why it doesn't run.
You should use
X0 VDD GND inverter_blo
j
if I just call GND and VDD, which I think is what comes out of the block, it simulates but everything stays at 0, even though I initialize to 0
what could be the error?
l
You should start any inner node with a preset voltage. Use
Copy code
.ic X0.vout1 = 1
Your transient command should be:
Copy code
tran 0.1n 50n 0.1n uic
j
what is uic?
l
use initial condition
j
Yes that worked, but this command "nodeset x2.vout3=0" its same?
l
I don't know if it works for transient simulations. It should. But it should not be set as 0, I think. nodeset and ic act different. Nodeset is too find the solution for OP and DC, but I don't know if it works as a initial condition for transient sims.
j
Well, I used nodeset with conditional 0, and it also works
l
Good. Just be aware that for a real design, you must consider the width of the metal tracks, as they may not be able to handle the current.
j
thanks
@Luis Henrique Rodovalho Do you know how I can instantiate the block, taking into account that it has 9 outputs?
l
it is the name of the instance, begining with x, then the names of each node at each pin, then the name of the subcircuit.