Hi, when I build a subcircuit, I have various sepa...
# magic
c
Hi, when I build a subcircuit, I have various separate nodes, but when I place the subcircuit into the wrapper, many of them are tied together in the extracted spice model. Is this a problem with the routing or with the spice extraction in magic? I noticed without any routing, the instance shows all the nodes as tied together. Some of the nodes (v2a, v3a...) were labeled in the subcircuit for easier documentation but have no connection to anything in the wrapper; however, they are tied to some other node on the wrapper such as gnd. I have included the main parts of the spice file below and also attached the file. Any help would be greatly appreciated! Thanks!
Copy code
*SUBCIRCUIT WITH DIFFERENT NODES

.subckt CD_Rect_nfet01v8 v2a v3a gnd2 gnd3 v3d in3 out3 v3b v2c in2 out2 v2b in1 out1
+ gnd v3c v1 v3e
XXM12 out1 sky130_fd_pr__nfet_01v8_648S5X
Xx1 in3 v3e CD_100pF_cap_m3_1
Xx2 gnd3 v3b CD_100pF_cap_m3_1
Xx3 gnd3 v3d CD_100pF_cap_m3_1
Xx4 in3 v3c CD_100pF_cap_m3_1
Xx5 in3 v3a CD_100pF_cap_m3_1
Xx6 in2 v2c CD_100pF_cap_m3_1
Xx7 in2 v2a CD_100pF_cap_m3_1
Xx8 gnd2 v2b CD_100pF_cap_m3_1
Xx9 in1 v1 CD_100pF_cap_m3_1
XXM1 v2a sky130_fd_pr__nfet_01v8_648S5X
XXM2 v2c sky130_fd_pr__nfet_01v8_648S5X
XXM3 v2b sky130_fd_pr__nfet_01v8_648S5X
XXM4 out2 sky130_fd_pr__nfet_01v8_648S5X
XXM5 v3e sky130_fd_pr__nfet_01v8_648S5X
XXM6 v3c sky130_fd_pr__nfet_01v8_648S5X
XXM7 v3b sky130_fd_pr__nfet_01v8_648S5X
XXM8 v3a sky130_fd_pr__nfet_01v8_648S5X
XXM9 out3 sky130_fd_pr__nfet_01v8_648S5X
XXM10 v3d sky130_fd_pr__nfet_01v8_648S5X
XXM11 v1 sky130_fd_pr__nfet_01v8_648S5X
.ends

*INSTANCE PLACED IN WRAPPER WITH MANY NODES TIED TOGETHER
XCD_Rect_nfet01v8_0 gnd3_wrap gnd3_wrap gnd3_wrap gnd3_wrap gnd3_wrap in3_wrap out3_wrap
+ gnd3_wrap gnd3_wrap in2_wrap out2_wrap gnd3_wrap in1_wrap out1_wrap gnd3_wrap gnd3_wrap
+ gnd3_wrap gnd3_wrap CD_Rect_nfet01v8
m
Connie, one thing I notice is that you have an isolated nfet subcircuit with only one connection
.subckt sky130_fd_pr__nfet_01v8_648S5X drain
Also, what version of magic are you using?
c
@User I am using Magic 8.3 revision 230. Is that okay?
I checked in my spice file of the instance I place into the wrapper, and it looks like the nfet has two connections in the sub circuit
Copy code
.subckt sky130_fd_pr__nfet_01v8_648S5X gsb drain
But i guess when I place it into the wrapper and run
Copy code
ext2spice lvs
extract all
ext2spice
the result is a one terminal nfet?
Is there any way to specify what becomes the terminals of a subcircuit? Is specifying the connections and labels enough?
m
Looks like the latest magic version is 8.3.290, but mpw-5 required 8.3.265(?) to build the pdk. Openlane for mpw-5 uses 8.3.209. Do you get any short messages in your extraction log?
c
Yes, I get
Copy code
Extracting sky130_fd_pr__nfet_01v8_648S5X into /home/connie/caravel_user_project_analog/mag/sky130_fd_pr__nfet_01v8_648S5X.ext:
Extracting sky130_fd_pr__cap_mim_m3_1_CNFDQN into /home/connie/caravel_user_project_analog/mag/sky130_fd_pr__cap_mim_m3_1_CNFDQN.ext:
Extracting CD_100pF_cap_m3_1 into /home/connie/caravel_user_project_analog/mag/CD_100pF_cap_m3_1.ext:
Extracting CD_Rect_nfet01v8 into /home/connie/caravel_user_project_analog/mag/CD_Rect_nfet01v8.ext:
Extracting user_analog_project_wrapper_test into /home/connie/caravel_user_project_analog/mag/user_analog_project_wrapper_test.ext:
user_analog_project_wrapper_test: 38 warnings
Total of 38 warnings.
I thought the 38 warnings were due to the fact that I haven't connected my subcircuit to any of the pads of the wrapper?
@User I also downloaded magic from the command
Copy code
git clone <https://github.com/RTimothyEdwards/magic>
just a few months ago, but it seems that it has been revision 291 since April 2020. Is there a link to download the latest Magic to update it?
m
Depends on the warnings, I think. Can you try
extract warn all
before
extract all
? I use this repo. https://github.com/RTimothyEdwards/magic
c
Thanks! Do I need to go through all of the installation steps to update my previous version? Or should I uninstall the previous version?
Also, when I to extract warn all and extract all I get many more errors
Copy code
Extracting user_analog_project_wrapper_test into /home/connie/caravel_user_project_analog/mag/user_analog_project_wrapper_test.ext:
user_analog_project_wrapper_test: 98 warnings
Total of 1029 warnings.
Can I see what these warnings are in the .ext file?
m
Try
feedback save user_analog_project_wrapper_test.errors
magic
installation depends on if you're using docker or not. If you're not using docker, then I think you just reinstall. As far as I know, you don't need to uninstall anything.
c
@User thanks for all your help! It got the correct spice list after updating my magic version
👍 2