Skip to content

Commit

Permalink
Add new test for failing sky130A simulation in ngspice with continuou…
Browse files Browse the repository at this point in the history
…s models
  • Loading branch information
hpretl committed Aug 21, 2024
1 parent 47cdcd4 commit 79ffaf2
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 0 deletions.
24 changes: 24 additions & 0 deletions _tests/06/test_boris.spice
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
* old binned models
*.lib /foss/pdks/sky130A/libs.tech/ngspice/sky130.lib.spice tt
* new continuous models
.lib /foss/pdks/sky130A/libs.tech/combined/sky130.lib.spice tt

.param mc_mm_switch=0
.param lx=0.15 wx=162.5 nfx=40 idx=0.5m
.save @m.xm1a.msky130_fd_pr__nfet_01v8_lvt

XM1a d g s 0 sky130_fd_pr__nfet_01v8_lvt L={lx} W={wx} nf={nfx} ad='int((nf+1)/2) * W/nf * 0.29' as='int((nf+2)/2) * W/nf * 0.29' pd='2*int((nf+1)/2) * (W/nf + 0.29)'
+ ps='2*int((nf+2)/2) * (W/nf + 0.29)' nrd='0.29 / W' nrs='0.29 / W' sa=0 sb=0 sd=0 mult=1 m=1
XM1b d g s 0 sky130_fd_pr__nfet_01v8_lvt L={lx} W={wx} nf={nfx} ad='int((nf+1)/2) * W/nf * 0.29' as='int((nf+2)/2) * W/nf * 0.29' pd='2*int((nf+1)/2) * (W/nf + 0.29)'
+ ps='2*int((nf+2)/2) * (W/nf + 0.29)' nrd='0.29 / W' nrs='0.29 / W' sa=0 sb=0 sd=0 mult=1 m=1
vg g 0 1
vd d 0 1
is s 0 {2*idx}

.control
op
*show
print @m.xm1a.msky130_fd_pr__nfet_01v8_lvt[gm]
print @m.xm1a.msky130_fd_pr__nfet_01v8_lvt[cgg]
.endc
.end
1 change: 1 addition & 0 deletions _tests/06/test_ngspice_sky130a.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ source iic-pdk-script.sh sky130A > /dev/null
ngspice -b $DIR/test_nmos.spice > /dev/null 2>&1 || ERROR=1
ngspice -b $DIR/test_pmos.spice > /dev/null 2>&1 || ERROR=1
ngspice -b $DIR/test_analog.spice > /dev/null 2>&1 || ERROR=1
ngspice -b $DIR/test_boris.spice > /dev/null 2>&1 || ERROR=1
# Check if there is an error in the log
if [ $ERROR -eq 1 ]; then
echo "[ERROR] Test <ngspice with sky130a> FAILED."
Expand Down

0 comments on commit 79ffaf2

Please sign in to comment.