https://open-source-silicon.dev logo
Channels
aa
abcc
activity
adiabatonauts
analog-design
announce
announcements
b2aws
b2aws-tutorial
bag
basebands
beagleboard
bluetooth
board-respin
cadence-genus
cadence-innovus
cadence-spectre
cadence-virtuoso
caravan
caravel
caravel-board
chilechipmakers
chip-yard
chipignite
chipignite2206q_stanford_bringup
chisel
coalition-for-digital-environmental-sustainability
community_denmark_dtu
containers
courses
design-review
design-services
dffram
digital-design
digital-electronics-learners
discord-mods
dynamic-power-estimation
efabless
electric
events
fasoc
fault
foss-asic-tools
fossee-iitb-esim
fossee-iitb-google-sky130
fpga
funding
fuserisc
general
generative-ai-silicon-challenge
genius-vlsi
gf180
gf180mcu
hardware-beginners
help-
ieee-sscs-cac-23
ieee-sscs-dc-21q3
ieee-sscs-dc-22
ieee-sscs-dc-23
ihp-sg13g2
images
infiniband
j-core
japan-region
junk
klayout
latam_vlsi
layouteditor
lvs
lvs-analysis
magic
magical
maker-projects
maker-zone
microwatt
mpw-2-silicon
mpw-one-clean-short
mpw-one-silicon
neuro-mem
nydesign
open_pdks
open-pdk
openadiabaticlogic
openfpga
openhighqualityresonators
openlane
openlane_cloudrunner
openlane-development
openocd
openpositarithmetic
openpower
openram
openroad
opentitan
osu
pa-test-chip
paracells
pd-openlane-and-sky130
picosoc
pll
popy_neel
power
private-shuttle
rad-lab-silicon
radio
rdircd
reram
researchers
rf-mmw-design
rios
riscv
sdram
serdes
shuttle
shuttle-precheck
shuttle-status
silicon-photonics
silicon-validation
silicon-validation-private
sky130
sky130-ci
sky130-pv-workshop
sky65
sky90
skywater
sram
stdcelllib
strive
swerv
system-verilog-learners
tapeout-job
tapeout-pakistan
team-awesome
timing-closure
toysram
travis-ci
uvm-learners
vendor-synopsys
venn
verification-be
verification-fe
verilog-learners
vh2v
vhdl
vhdl-learners
vliw
vlsi_verilog_using_opensource_eda
vlsi_verilog_using_opensoure_eda
vlsi-learners-group
vlsi101
waveform-viewers
xls
xschem
xyce
zettascale
Powered by
Title
s

Stefan Schippers

02/09/2023, 11:22 AM
Hi, @Tim Edwards what I did was to clone this reram repo, then use the
openvaf
compiler (openvaf is a prebuilt executable I downloaded from the openvaf main site). Then simply compiled the
sky130_fd_pr_reram_git/cells/reram_cell/sky130_fd_pr_reram__reram_cell.va
to produce the
sky130_fd_pr_reram__reram_cell.osdi
object. This must be included in ngspice with the new
pre_osd
command. Following is the complete netlist of the testbench:
** sch_path: /home/schippes/.xschem/xschem_library/xschem_sky130/sky130_tests/tb_reram.sch
**.subckt tb_reram
N1 TOP 0 sky130_fd_pr_reram__reram_model
V1 TOP 0 PWL (0 0 1u 2 2u 0 3u -2 4.0u 0.0)
**** begin user architecture code
.control
  * Modify according to your specific location
  pre_osdi /mnt/sda7/sky130_fd_pr_reram_git/cells/reram_cell/sky130_fd_pr_reram__reram_cell.osdi
  save all
  tran 1n 4.0u
  write tb_reram.raw
.endc
** opencircuitdesign pdks install, not needed in this testbench
* .lib /home/schippes/share/pdk/sky130A/libs.tech/ngspice/sky130.lib.spice tt
**.ends

.model sky130_fd_pr_reram__reram_model sky130_fd_pr_reram__reram_cell area_ox=0.1024e-12  Tox=5.0e-9
+  Tfilament_max=4.9e-9  Tfilament_min=3.3e-9  Tfilament_0=3.5e-9  Eact_generation=1.501  Eact_recombination=1.500
+  I_k1=6.140e-5  Tfilament_ref=4.7249e-9  V_ref=0.430  velocity_k1=150  gamma_k0=16.5  gamma_k1=-1.25
+   Temperature_0=300  C_thermal=3.1825e-16  tau_thermal=0.23e-9  t_step=1.0e-9

**** end user architecture code
.end
You see the reram instance uses the (new)
N
letter, it references a
sky130_fd_pr_reram__reram_model
SPICE model, this can be defined as simply
.model sky130_fd_pr_reram__reram_model sky130_fd_pr_reram__reram_cell
the
.model
'*connects*' the spice device to the verilog OSDI model Additionally the .model can override default parameters specified in the .va file, as done in above netlist . To enable the new reram I think the
.model sky130_fd_pr_reram__reram_model
SPICE wrapper and the
<http://sky130_fd_pr_reram__reram_cell.va|sky130_fd_pr_reram__reram_cell.va>
verilog source file should be added. Then the verilog must be compiled on the target machine in some way.
t

Tim Edwards

02/09/2023, 2:04 PM
So
pre_osdi
has to be run in a control block? Is there a way to run it like a dot-card so that it would get enabled by calling
.lib
?
s

Stefan Schippers

02/09/2023, 2:18 PM
@Tim Edwards I don't know much about that, but it seems
pre_osdi
needs to be at the beginning of a
.control
, see the attached manual page. I have verified that having this:
.control
  pre_osdi <.....osdi model>
.endc

.save all
.tran 1n 2u
...
works calling ngspice in batch mode, or this one works in interactive mode:
.control
pre_osdi <.....osdi model>
.endc

.control
  save all
  tran 1n 2u
  write tb_reram.raw
.endc