1
\$\begingroup\$

I am trying to play around with beta ratio effect of CMOS inverter. To do so I need to have parameterized subcircuit so I can adjust the ratio of PMOS beta over NMOS beta and achieve HI-skewed or LO-skewed inverters.

How do you define parameter x in a sub-circuit?

What I need to do is to define a sub-circuit like this:

.subckt inverter_035_x in out VDD GND
XM1 out in 0 0 NM W={x*1u} L=0.35u
XM2 out in VDD VDD PM W={x*3u} L=0.35u
.ends inverter_035_x

and then set x in every instance of the subcircuit so I can achieve different transistor width per instance.

How to set x and pass it to a sub-circuit instance?

\$\endgroup\$
  • \$\begingroup\$ ok I figured it out. Just needed to right click and type 'x=2' in PARAM field from the main block to pass the x set 2 to the sub-circuit. \$\endgroup\$ – Ehsan Jul 16 '16 at 0:33
  • \$\begingroup\$ Make that comment an answer instead and mark it as answered. \$\endgroup\$ – winny Jul 16 '16 at 9:42
  • \$\begingroup\$ ok I will do that. \$\endgroup\$ – Ehsan Jul 16 '16 at 14:59
2
\$\begingroup\$

ok I figured it out. Just needed to right click and type 'x=2' in PARAM field from the main block to pass the x set 2 to the sub-circuit.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.