xschem_sky130 icon indicating copy to clipboard operation
xschem_sky130 copied to clipboard

Simulating sky130_stdcells in xschem & ngspice

Open mhajimorad opened this issue 1 year ago • 4 comments

Hi @StefanSchippers ,

Regarding the use of sky13_fd_sc_hd standard cell library components in xschem and running ngspice, how do we setup ngspice to find the corresponding subckt definitions?

Upon trying both TT_MODELS and Corner: tt packages from the xschemrc file, I receive "unknown subckt errors".

Thank you!

mhajimorad avatar Dec 04 '23 19:12 mhajimorad

You don't need to use the xschem_sky130 repository directly. Install open_pdks. This will get the spice models and the xschem symbols. Detailed instructions are here.

StefanSchippers avatar Dec 04 '23 21:12 StefanSchippers

Hi @StefanSchippers ,

I had previously installed open_pdks. I do not have any issues simulating circuits with the sky130 devices themselves when I include the path to the model files referenced in Corner: tt.

What syntax is needed for the .include statement as it pertains to the standard cell library components in sky130_fd_sc_hd?

Thank you!

mhajimorad avatar Dec 04 '23 21:12 mhajimorad

For standard cells you need to add this line in the testbench: .include /<pdk_install_root>/share/pdk/sky130A/libs.ref/sky130_fd_sc_hd/spice/sky130_fd_sc_hd.spice Of course replace <pdk_install_root> with the location of the pdk install on your machine (may be /usr/local but depends on installation). This single file contains the spice netlists of all standard cells.

StefanSchippers avatar Dec 04 '23 21:12 StefanSchippers

Thank you @StefanSchippers !

Inclusion of your referenced line in the testbench works.

As a follow-up question: Are you able to provide some context/background information as to how the constituent transistors of the standard cells were sized?

Take for example the standard cells nand2_1 and nor2_1. It appears that all PMOS and NMOS transistors of these gates have been sized W=1 and W=0.65, respectively. This suggests that transistor sizing was not based-on arriving at comparable (worst-case) rise and fall times. So what was the sizing based-on?

Thank you!

mhajimorad avatar Dec 06 '23 20:12 mhajimorad