Is there a way to copy the BSIM transistor model p...
# analog-design
l
Is there a way to copy the BSIM transistor model parameters from ngspice and reuse it again in a model card? Maybe we could use it for a limited porting for other simulators, as LTspice.
t
Probably, but the SkyWater models have parameters spread around multiple files. You'd have to start with the
sky130.lib.spice
and figure out all the files that are being included for a specific device, and then figure out which parameters in those files belong to that device's model.
l
Hello, Tim. Another possible solution I'm trying to copy the entire model library to the project folder and submit it to github, then comment out the unnecessary folders. But there must be another solution for this
My project spice files already use a default path to what should be the Open PDKs installation folder. There should be a way to install only the ngspice models along with github. Something like a Open PDKs Lite, with only primitives.
t
Sure, you can just build open_pdks with "make primitive-A". I think the full build would be something like:
Copy code
cd sky130
make prerequisites
make tools-A
make primitive-A
l
Thanks! I'm going to try that! I'm wondering if I could put something like this in a my github projects to make the ngspice testbenches point to the local open PDKs file...
y
For your information, the license agreement of LTSpice explicitly forbids using it to design ICs
l
That is why I love ngspice! My problem is that I'm publishing some articles using the open PDKs and I don't know how to make it easy for people without knowlegde about Open PDKs installation to just clone the repo and start simulating. A basic model just for the FETs would be enough to simulate everything.
y
That is a good point. That's a potentially strong point of @Pepijn de Vos approach with Mosaic being browser based. You could just send a link to the schematic and simulation environment already setup and ready to go
l
Can I just send a link with the netlist and it is done? If so, it would be great for simple simulations. Thanks!
y
You could send a link to the schematic, for example: https://nyancad.github.io/Mosaic/app/editor/?schem=nmos%24sky130_fd_pr_01v8&db=schema[…]17fef02-bluemix.cloudantnosqldb.appdomain.cloud%2Fschematics And then simulate it there. But I don't know if simulation works in the example at the moment, Pepijn would be able to give more info
p
Simulation needs to run somewhere and Binder doesnt have the pdk installed. It'd be possible but not currently done. Local install with openpdks works.
👍 1
e
@Luis Henrique Rodovalho Another possibility is @proppy has developed ways to run openlane stuff inside of Google Cloud. See for example: https://colab.research.google.com/gist/proppy/5074509f4d247f0987383cd0e6289651/analog-inverter-gdsfactory.ipynb
If the code for the article was all inside one of those notebooks, in theory the user should be able to clone that notebook and reproduce exactly what you see.
l
The full openlane stuff may be too big. I'm just simulating operational amplifiers. But if it is easy for the user, it is enough. A notebook for presentation would be very nice!
Copy code
circuit.lib(f'{CONDA_PREFIX}/share/pdk/sky130A/libs.tech/ngspice/sky130.lib.spice', 'tt')
What does this line of code do? Where does it install the libraries?
e
Hopefully @proppy can reply here because I might be totally off base here but my understanding is this notebook quickly setups up a linux virtual machine, configures it with all the libraries and tools, then runs them. At then end one as a fully configured linux system “in the cloud” which persists for however long the notebook persists.
That line of python is pointing the spice deck to the install location of the SkyWater PDK
l
Interesting. I'll try it someday, so it installs only the primitives' spice models. I'll have a look at pyspice too.
e
The whole install is managed by conda (the micromamda lines at the beginning) so you don’t have to deal with any of that.
And that’s why the PDK_ROOT is relative to CONDA_PREFIX
l
Copy code
!conda-env/bin/python -m pip install pyspice gdsfactory sky130
So, what is this sky130 package here?
e
Unfortunately this is where we're going to need help from @proppy because I'm not sure of the mechanics of the install
l
Thank you!
e
One possible disadvantage is it does require a Google cloud account and cloud credits. These are fairly inexpensive, but they're not free. Although I do recall Google having programs for students and universities to get some amount of free credits.
p
Ah this install a pdk version specific to gdsfactory (it's still a wip example)
There is a more classical example that uses magic and the regular open_pdks conda packages here
If you use binder you should be able to reuse https://anaconda.org/LiteX-Hub/open_pdks.sky130a
p
whoa this is so cool. I'm totally going to add this to my binder repo and document how to install it
p
@Pepijn de Vos if you want to work together on some analog notebooks, we have that repo under Chips Alliance where we try to consolidate examples https://github.com/chipsalliance/silicon-notebooks/
It'd be great to also make them work with binder
p
Sounds good! I have a binder repository here that installs Mosaic and JupyterLab and the Panel app https://github.com/NyanCAD/Pyttoresque-templates