<@U017UPJEGKZ>: This comes in several flavors dep...
# magic
t
@User: This comes in several flavors depending on the arguments.
<cellname>
has a namespace and device name. For starters,
magic::gencell sky130::sky130_fd_pr__nfet_01v8
will give you an interactive window to enter parameters. That is probably not what you want. What you want is
magic::gencell sky130::sky130_fd_pr__nfet_01v8 <instance> -spice <param> <value> ...
, for example,
magic::gencell sky130::sky130_fd_pr__nfet_01v8 xm0 -spice W 2.0 L 0.18
. There is a Tcl scripted routine in the magic source code called
toolkit.tcl
and it has a routine in it called
magic::netlist_to_layout
which does more or less what you are attempting to do, except in a trivial way. It reads a SPICE netlist and creates a layout, seeding it with components from the netlist and generating subcircuits and ports. But no attempt to arrange anything; all devices are just placed end-to-end in a row. This procedure can be invoked from the Magic GUI as
File->Import SPICE
(when using the setup files installed by open_pdks).
w
I am trying that and I can not seem to set many of the parameters (it seems to be mostly the ones that are set though the UI with a checkbox?)
for example:
Copy code
magic::gencell sky130::sky130_fd_pr__nfet_01v8 xm15 -spice W 5 L 0.5 nf 5 m 1 diffcov 100 polycov 100 poverlap 100 doverlap 100 topc 1 botc 0 guard 0 full_metal 0
still gives a guard ring and bottom gate contacts
t
Don't use "-spice" as an argument, then. But then I think you have to do something different with W and L. . . let me check.
Ah, yes, they have to be lower-case.
w
Just tried that, it works!
I tried removing -spice earlier and saw it broke things, now I see why. With spice removed and W and L lower case it fully works as expected. Thanks!
t
You're welcome!