Skip to content

Instantly share code, notes, and snippets.

@diadatp
Last active September 24, 2020 05:20
Show Gist options
  • Save diadatp/1ab7263884b29d27c3d595891a1618cf to your computer and use it in GitHub Desktop.
Save diadatp/1ab7263884b29d27c3d595891a1618cf to your computer and use it in GitHub Desktop.
Ring oscillator in SKY130A
* Ring Oscillator
.param TEMP=27
* Include SkyWater SKY130A device models.
.include "path/to/sky130_fd_pr/models/corners/tt.spice"
* Include SkyWater inv_1 standard cell model.
.include "path/to/skywater-pdk/libraries/sky130_fd_sc_hd/latest/cells/inv/sky130_fd_sc_hd__inv_1.spice"
vddi vdd gnd DC 1.8V
Xinv1 A1 gnd gnd vdd vdd A2 sky130_fd_sc_hd__inv_1
Xinv2 A2 gnd gnd vdd vdd A3 sky130_fd_sc_hd__inv_1
Xinv3 A3 gnd gnd vdd vdd A1 sky130_fd_sc_hd__inv_1
* Run the simulation for 10ns. Enough time for things to settle.
.tran 1ps 10ns
* Plot the voltages between the inverters and a fourier transform of one of them.
.control
run
plot A1 A2 A3
fft A1
plot mag(A1)
.endc
.end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment