Is there any docs available that explain how to do...
# caravel
a
Is there any docs available that explain how to do DRC/LVS/PEX? Can't find anything. I am using caravel_user_project_analog and I have .gds and .spice generated by xschem. I found this https://github.com/sgherbst/sky130-hello-world But the drc just does not work for some reason.
m
@Arman Avetisyan How about something like this
flow.tcl -design digital_pll -drc -report drc.out -gds ../gds/digital_pll.gds -magicrc $PDK_ROOT/sky130A/libs.tech/magic/sky130A.magicrc -tech $PDK_ROOT/sky130A/libs.tech/magic/sky130A.tech
t
@Arman Avetisyan: I would suggest replacing the "drc count" in the sky130-hello-world with "magic::drc_save_report $cellname $outfile" which produces a full formatted DRC report (the script uses $::env(CELL_NAME) for the cellname, and you can use whatever you want for the output filename. I don't generally condone the overuse of environment variables like is done in that example, but it gets the job done).
a
Thanks, that is super useful! I got everything working it seems. It seems PEX does not work properly in the sky130-hello-world. I used reference manual and wrote my own. ext2spice lvs ext2spice cthresh 0 ext2spice rthresh 0 ext2spice subcircuit on ext2spice -f ngspice -o $design_name.pex.spice However last ext2spice outputs Error: Ran out of space for device types! but generates some file. @Tim Edwards should I be reporting it in Magic as a bug? Maybe it's already fixed? I am using magic from openlane:v0.15, it might be a couple of weeks old
m
@Arman AvetisyanI think this may be due to an older version of magic. What version are you using?
magic -dnull -noc
will print the version and enter a simple interactive interface - use
exit
to quit.
a
Magic 8.3 revision 145. From OpenLane v0.15
m
Magic is at 8.3.203 now. @Tim Edwards was saying that the
Error: Ran out of space for device type
in older versions may be more of a warning than a fatal error. Magic will still extract most device types correctly. The error was referring to number of devices defined in the rule file exceeding magic's internal device array limit. I think it just ignored them.
t
Right. It could potentially be an error if the circuit contained one of the device types that was being ignored because it ran out of array space for them, but the ones at the end are all very obscure devices so that was unlikely to happen in practice. At any rate, an update of magic should make the error message go away.
@Arman Avetisyan: FYI, in your five commands above:
rthresh 0
is meaningless, because lumped resistance is used only by IRSIM.
-f ngspice
is already implied by
ext2spice lvs
. If you want parasitic resistances in your output, you need a more complicated script that uses the
extresist
command (but which currently will not correctly extract capacitors, bipolars, and diodes, and which I am working on a fix right now).
a
I think I will add this as a quote in the article I am writing, and just leave it as is. Hopefully, it will not cause a significant mismatch between the real IC and PEX based simulation