AugustUnderground/pyspectre

Excited to use pyspectre!

Closed this issue · 10 comments

Hey @AugustUnderground ! Very interesting project, the code seems very concise, can it handle all analysis types in spectre like Noise, monte-carlo, etc ? I was planning to write something like this or try and modify pyspice to run spectre. I would try and contribute if I can get simple tests working.

Hi @leochand101. In serafin I have dc, dcmatch, dcop, ac, stb, tran, noise and xf analyses working. pysepctre is just the backend that launches spectre in interactive mode and runs all the analyses specified in the netlist, whatever they may be.

Got it. As I tried to install it I was getting clashes with another pyspectre module from someone at Georgia tech looks like.
Is this a related work or something independent ? I was getting attribute errors and on debug realized that your methods dont exist in that pyspectre class.
Also which version of python have you tested this with and the version number of dependencies will be helpful. I saw issues on the subprocess call (was running it with python3.6 so thought I should check before debugging further)

There is no relation to other pyspectre modules. I'm using it with Python version 3.9 and Spectre version 20.1.0 64bit 10/14/2021. I'm not sure when/if/how the subprocess library was changed. What kind of issues are you experiencing?

The above issue was fixed when I used the right versions of python, There was one small issue I had to fix which was causing the subprocess to fail in my setup, on line 68 of core.py the log inside the list causes an error since the list within a list fails the subprocess cmd when I run the example.py, I can push my change today.

You are right, thanks for the heads up, dooes 2e6bfe2 fix it? I don't use this functionality a lot, since interactive mode is so much more convenient. What is your usecase?

I am finishing running few test simulations and plotting the outputs using the backend, I want to move away from manual gui based sims and then create templates per simulation type, which can be ported to multiple technologies and such. We can discuss further, I sent you a linkedin invite.

Ok, I got the hang of it, the only thing which I couldnt find documentation were the scl commands* on the interactive shell, they seem to do all the magic. Ideally we could parse the netlist like pySpice does so that we arent dependent on the simulator to query simulation objects, but that maybe for another time.
Where can I find the documentation for the scl commands ? They fail on the shell and I cant tell why, I barely know any skill.
Command is pretty clear in terms of what it needs to do but I am missing some arguments which seem like the handle to the sim object or the top level or something. Let me know if there is manpage or reference.

As far as I know the interactive mode in spectre is an undocumented feature. If you run sepctre -help you can get very limited information about the +interactive flag. The REPL can be launched with something like

$ spectre +interactive -I/some/path/gpdk180_vX.Y/models/spectre -log test/example.scs

Once in it you can see all available commands with

> (sclHelp)

That's all I got, so from there on it's trial and error.

Ok yea I also got to sclHelp but no manpage related to that. Let me see if I can open a request at Cadence, most of the commands looked straightforward.

BTW I opened a case and as usual Cadence AE did not answer the question but instead provided me documentation on sie (more gui based inefficiency). Will see if they come around to it. Closing the question for now,both gpdk and commercial foundry outputs work.