Skip to content

Commit

Permalink
ran ideal sims
Browse files Browse the repository at this point in the history
  • Loading branch information
asheldon44 committed Oct 31, 2024
1 parent 98ea325 commit f9d80e9
Show file tree
Hide file tree
Showing 7 changed files with 176 additions and 0 deletions.
55 changes: 55 additions & 0 deletions sim/JNW_SIGMA_DELTA_A2D/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@


all: typical etc mc summary



TB=tran
VIEW=Sch
#VIEW=Lay
CELL=JNW_SIGMA_DELTA_A2D
LIB =JNW_SIGMA_DELTA_A2D_SKY130A
OPT=

include ../../tech/make/sim.make

test:
${MAKE} typical OPT="Debug"

typical: netlist
cicsim run --name ${VIEW}_typical ${TB} ${OPT} ${VIEW} Gt Ktt Tt Vt

slow: netlist
cicsim run --name ${VIEW}_slow ${TB} ${OPT} ${VIEW} Gt Kss "Th,Tl" Vl

fast: netlist
cicsim run --name ${VIEW}_fast ${TB} ${OPT} ${VIEW} Gt Kff "Th,Tl" Vh

tfs: netlist
cicsim run --name ${VIEW}_tfs ${TB} ${OPT} ${VIEW} Gt "Ktt,Kss,Kff" "Tt,Th,Tl" "Vt,Vl,Vh"

etc: netlist
cicsim run --name ${VIEW}_etc ${TB} ${OPT} ${VIEW} Gt "Kss,Kff,Ksf,Kfs" "Th,Tl" "Vl,Vh"

mc: netlist
cicsim run --name ${VIEW}_mc --count 30 ${TB} ${OPT} ${VIEW} Gt "Kttmm" "Tt" "Vt"

ntc: netlist
cicsim run --name ${VIEW}_ntc ${TB} ${OPT} ${VIEW} Gt "Ktt,Kss,Kff" "Tt" Vt

temp: netlist
cicsim run --name ${VIEW}_temp ${TB} ${OPT} ${VIEW} Gt "Ktt" "Tt,Th,Tl" Vt

summary:
cicsim summary --output "README.md"

slide:
pandoc -s -t slidy README.md -o README.html


clean:
-rm -rf output_*
-rm -rf __pycache__
-rm *.run
-rm *.pdf
-rm *.csv
9 changes: 9 additions & 0 deletions sim/JNW_SIGMA_DELTA_A2D/cicsim.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
options:
useTmpDir: False
sha: True
corner:
Lay: ''
Sch: ''
ngspice:
library: JNW_SIGMA_DELTA_A2D_SKY130A
cell: JNW_SIGMA_DELTA_A2D
16 changes: 16 additions & 0 deletions sim/JNW_SIGMA_DELTA_A2D/summary.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
description: TB_NCM
simulations:
tran:
name: Transient analysis
description: |
Check transient operation
data:
- name: Sch_typ
src: results/tran_Sch_typical
method: typical
- name: Sch_etc
src: results/tran_Sch_etc
method: minmax
- name: Sch_3std
src: results/tran_Sch_mc
method: 3std
9 changes: 9 additions & 0 deletions sim/JNW_SIGMA_DELTA_A2D/tran.meas
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
* Measure JNW_SIGMA_DELTA_A2D
.control

load {cicname}.raw

echo "MEAS_START"

echo "MEAS_END"
.endc
18 changes: 18 additions & 0 deletions sim/JNW_SIGMA_DELTA_A2D/tran.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#!/usr/bin/env python3
import pandas as pd
import yaml

def main(name):
# Delete next line if you want to use python post processing
return
yamlfile = name + ".yaml"

# Read result yaml file
with open(yamlfile) as fi:
obj = yaml.safe_load(fi)

# Do something to parameters

# Save new yaml file
with open(yamlfile,"w") as fo:
yaml.dump(obj,fo)
59 changes: 59 additions & 0 deletions sim/JNW_SIGMA_DELTA_A2D/tran.spi
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
*TB_SUN_TR_SKY130NM/TB_NCM
*----------------------------------------------------------------
* Include
*----------------------------------------------------------------
#ifdef Lay
.include ../../../work/lpe/JNW_SIGMA_DELTA_A2D_lpe.spi
#else
.include ../../../work/xsch/JNW_SIGMA_DELTA_A2D.spice
#endif

*-----------------------------------------------------------------
* OPTIONS
*-----------------------------------------------------------------
.option TNOM=27 GMIN=1e-15 reltol=1e-3

*-----------------------------------------------------------------
* PARAMETERS
*-----------------------------------------------------------------
.param TRF = 10p

.param AVDD = {vdda}

*-----------------------------------------------------------------
* FORCE
*-----------------------------------------------------------------
VSS VSS 0 dc 0
VDD VDD_1V8 VSS pwl 0 0 10n {AVDD}

*-----------------------------------------------------------------
* DUT
*-----------------------------------------------------------------
.include ../xdut.spi

*----------------------------------------------------------------
* PROBE
*----------------------------------------------------------------
.save all


*----------------------------------------------------------------
* NGSPICE control
*----------------------------------------------------------------
.control
set num_threads=8
set color0=white
set color1=black
unset askquit

optran 0 0 0 1n 1u 0


tran 1n 10n 1p
write
quit


.endc

.end
10 changes: 10 additions & 0 deletions sim/JNW_SIGMA_DELTA_A2D/tran.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#<name>:
# src:
# - <paramters>
# typ: <typical spec value>
# name: <long name>
# min: <minimum spec value>
# max: <maximum spec value>
# scale: <scale, multiply result by scale>
# digits: <significant digits>
# unit: Unit

0 comments on commit f9d80e9

Please sign in to comment.