RTimothyEdwards / magic

Magic VLSI Layout Tool
Other
498 stars 103 forks source link

double parameter extraction for generic resistor devices #223

Open d-m-bailey opened 1 year ago

d-m-bailey commented 1 year ago

In magic 8.3.328

.subckt sky130_fd_sc_hd__conb_1 LO HI   VGND VPWR
R0 HI VPWR sky130_fd_pr__res_generic_po w=480000u l=45000u
R1 VGND LO sky130_fd_pr__res_generic_po w=480000u l=45000u
.ends

In magic 8.3.368 (2 w parameters)

.subckt TG_sky130_fd_sc_hd__conb_1 HI LO VPWR VGND
R0 HI VPWR sky130_fd_pr__res_generic_po w=0.48 w=0.045
R1 VGND LO sky130_fd_pr__res_generic_po w=0.48 w=0.045
.ends

The ext files have the following differences in the device lines that might be relevant

< device devres sky130_fd_pr__res_generic_po 159 232 160 233 9 96 "a_159_232#" 0 0 "VGND" 96 0 "LO" 96 0
< device devres sky130_fd_pr__res_generic_po 21 232 22 233 9 96 "a_21_232#" 0 0 "HI" 96 0 "VPWR" 96 0
---
> device devres sky130_fd_pr__res_generic_po 159 232 160 233 9 96 "a_159_232#" 0 0 "VGND" 96 20256,614 "LO" 96 27072,756
> device devres sky130_fd_pr__res_generic_po 21 232 22 233 9 96 "a_21_232#" 0 0 "HI" 96 20256,614 "VPWR" 96 27072,756
RTimothyEdwards commented 1 year ago

That was a simple typo, and I just fixed it and pushed. Thanks for the heads-up!

The difference in the .ext files is from the commit that introduced the stupid typo. It records area and perimeter for each terminal, and so it resolves the long-standing issue of magic lumping terminal area and perimeter onto one device connected to a single net, and leaving the others as zero. It makes it unnecessary to use the "-d" switch to "ext2spice", since the areas and perimeters are now not only distributed, but they are properly distributed.

You'll also note that magic no longer prints awkward dimensions like "480000u" for the pre-scaled values in the sky130 technology, but now outputs "0.48", which is a lot easier to parse, visually, at a glance.