From f9d80e9f3fd92023ed482ff3597df7a6e47d7617 Mon Sep 17 00:00:00 2001 From: Alexander Sheldon Date: Wed, 30 Oct 2024 21:07:48 -0700 Subject: [PATCH] ran ideal sims --- sim/JNW_SIGMA_DELTA_A2D/Makefile | 55 ++++++++++++++++++++++++++ sim/JNW_SIGMA_DELTA_A2D/cicsim.yaml | 9 +++++ sim/JNW_SIGMA_DELTA_A2D/summary.yaml | 16 ++++++++ sim/JNW_SIGMA_DELTA_A2D/tran.meas | 9 +++++ sim/JNW_SIGMA_DELTA_A2D/tran.py | 18 +++++++++ sim/JNW_SIGMA_DELTA_A2D/tran.spi | 59 ++++++++++++++++++++++++++++ sim/JNW_SIGMA_DELTA_A2D/tran.yaml | 10 +++++ 7 files changed, 176 insertions(+) create mode 100644 sim/JNW_SIGMA_DELTA_A2D/Makefile create mode 100644 sim/JNW_SIGMA_DELTA_A2D/cicsim.yaml create mode 100644 sim/JNW_SIGMA_DELTA_A2D/summary.yaml create mode 100644 sim/JNW_SIGMA_DELTA_A2D/tran.meas create mode 100644 sim/JNW_SIGMA_DELTA_A2D/tran.py create mode 100644 sim/JNW_SIGMA_DELTA_A2D/tran.spi create mode 100644 sim/JNW_SIGMA_DELTA_A2D/tran.yaml diff --git a/sim/JNW_SIGMA_DELTA_A2D/Makefile b/sim/JNW_SIGMA_DELTA_A2D/Makefile new file mode 100644 index 0000000..c9ca322 --- /dev/null +++ b/sim/JNW_SIGMA_DELTA_A2D/Makefile @@ -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 diff --git a/sim/JNW_SIGMA_DELTA_A2D/cicsim.yaml b/sim/JNW_SIGMA_DELTA_A2D/cicsim.yaml new file mode 100644 index 0000000..9022b42 --- /dev/null +++ b/sim/JNW_SIGMA_DELTA_A2D/cicsim.yaml @@ -0,0 +1,9 @@ +options: + useTmpDir: False + sha: True +corner: + Lay: '' + Sch: '' +ngspice: + library: JNW_SIGMA_DELTA_A2D_SKY130A + cell: JNW_SIGMA_DELTA_A2D diff --git a/sim/JNW_SIGMA_DELTA_A2D/summary.yaml b/sim/JNW_SIGMA_DELTA_A2D/summary.yaml new file mode 100644 index 0000000..9528d14 --- /dev/null +++ b/sim/JNW_SIGMA_DELTA_A2D/summary.yaml @@ -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 diff --git a/sim/JNW_SIGMA_DELTA_A2D/tran.meas b/sim/JNW_SIGMA_DELTA_A2D/tran.meas new file mode 100644 index 0000000..48a81d8 --- /dev/null +++ b/sim/JNW_SIGMA_DELTA_A2D/tran.meas @@ -0,0 +1,9 @@ +* Measure JNW_SIGMA_DELTA_A2D +.control + +load {cicname}.raw + +echo "MEAS_START" + +echo "MEAS_END" +.endc diff --git a/sim/JNW_SIGMA_DELTA_A2D/tran.py b/sim/JNW_SIGMA_DELTA_A2D/tran.py new file mode 100644 index 0000000..afe28d7 --- /dev/null +++ b/sim/JNW_SIGMA_DELTA_A2D/tran.py @@ -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) diff --git a/sim/JNW_SIGMA_DELTA_A2D/tran.spi b/sim/JNW_SIGMA_DELTA_A2D/tran.spi new file mode 100644 index 0000000..3da0ae4 --- /dev/null +++ b/sim/JNW_SIGMA_DELTA_A2D/tran.spi @@ -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 diff --git a/sim/JNW_SIGMA_DELTA_A2D/tran.yaml b/sim/JNW_SIGMA_DELTA_A2D/tran.yaml new file mode 100644 index 0000000..545647c --- /dev/null +++ b/sim/JNW_SIGMA_DELTA_A2D/tran.yaml @@ -0,0 +1,10 @@ +#: +# src: +# - +# typ: +# name: +# min: +# max: +# scale: +# digits: +# unit: Unit