https://open-source-silicon.dev logo
#sky130
Title
# sky130
p

Preet Batavia

07/23/2021, 9:23 AM
I have completed the design flow of a MUX successfully in openlane , i have various magic , spice files etc , i am not able to figure out how do i simulate it and visualize the inputs and outputs , please if someone could help me out here.
a

Aastha Dave

07/23/2021, 11:35 AM
you could simulate it using ngspice outside the OpenLANE flow.
p

Preet Batavia

07/23/2021, 12:37 PM
yeah , openlane created a .spice file , but I am unable to simulate it on ngspice
a

Aastha Dave

07/24/2021, 3:49 AM
What error are you getting?
p

Preet Batavia

07/24/2021, 4:25 AM
there is no error as such , but im lost as to how to get the waveforms on the GUI
this is the netlist file created by openlane as .spice which is just changed to .txt for sending it.
In this file what should I print / plot to get some output
a

Aastha Dave

07/24/2021, 10:35 AM
You'll have to first invoke ngspice, then run plot commands. "ngspice test1.spice" "plot y vs time x" - plots output y with time sweeping input x values. You'll have to use appropriate variables according to your design
You'll see the node names and voltage values listed after the invoke command. Pick out the output and input node names from there
p

Preet Batavia

07/25/2021, 1:31 PM
Hey , on invoking "ngspice test1.spice", i am not getting any node names and voltage values
Also , while running the design flow I got this :
but i am getting that the design flow is successful
but getting this too , so i suppose the power ports are not an issue , really sorry but im a novice at this
m

Matt Venn

07/26/2021, 12:42 PM
not exactly what you want, but here's an example of how you can run a simulation with a spice file
the spice file in this case is coming from extracting from a drawing made in magic instead of the output from openlane
but the concept is the same.
p

Preet Batavia

07/26/2021, 1:33 PM
thank you , ill try it out
@Matt Venn , i tried following your repo and it worked fine , i want to understand how did you write the pre.spice and post.spice so that i can also write it for my design to run a simulation
m

Matt Venn

07/26/2021, 6:00 PM
Spice is a bit of a pain to learn. I just copy and paste the same pieces. You might be better off learning pyspice python Library.
If you do want to learn, then the manual is not bad. Search for it and you should find it easily