Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The sky130_ef_fd_sc spice file for decap_12 is not pin compatible with the sky130_fd_sc_hd version. #475

Open
d-m-bailey opened this issue Feb 18, 2025 · 3 comments

Comments

@d-m-bailey
Copy link
Contributor

Version 1.0.493 and later

From libs.ref/sky130_fd_sc_hd/spice/sky130_ef_sc_hd__decap_12.spice

.subckt sky130_ef_sc_hd__decap_12 VGND VPWR VPB VNB

From libs.ref/sky130_fd_sc_hd/spice/sky130_fd_sc_hd.spice

.subckt sky130_fd_sc_hd__decap_12 VGND VNB VPB VPWR

The xschem symbol for decap_12 has the pins in the sky130_fd_sc_hd order. This means that when using the symbol in a schematic, switching between the 2 libraries is not as simple as changing the prefix from sky130_fd_sc_hd to sky130_ef_sc_hd.

Changing the pin order in the sky130_ef_sc_hd__decap_12.spice file may be sufficient, but since this file was generated from an extracted layout, changing the pin order in the original mag file might be a good idea too.

The spice file is also referenced from verilog during device level LVS, but since the verilog to spice calls are by port name and not position, changing the port order in the spice subcircuit definition shouldn't cause a problem.

@RTimothyEdwards
Copy link
Owner

@d-m-bailey : There is no .mag source for these. The sources are kept in open_pdks directory sky130/custom/sky130_fd_sc_hd/ where there is only GDS, LEF, and verilog. Since LEF and verilog do not have a definitive port order, the only ordering will come from the order in which text is read from GDS. The only solution here is probably to copy the SPICE files for these cells back into the custom/ directory, then add a -spice line for the installation of custom sources in the digital-hd-% recipe in the sky130 Makefile (line 1599).

@d-m-bailey
Copy link
Contributor Author

@RTimothyEdwards Thanks for the review. Wasn't there a push to have the default pin order extracted in a deterministically (possibly alphabetically)?

@RTimothyEdwards
Copy link
Owner

Yes, that was Tim Ansell's idea, but it is not easy to do from within magic. It could be done in python during the PDK build, but I think in this case it's easier to just provide the netlist.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants