Open daquintero opened 1 year ago
I have also been thinking about the source of this issue. I think it is important to mention that I am running this from Windows with a mamba install ngspice
installation. I was running the latest versions of both vlsir
and hdl21
tools.
When I printed binary_line
on line 327
in vlsir ngspice
on the exception above it gave me: 'Values:\r\n'
which makes me think the assertion was out of date at some point. Same thing for all the analysis_names
in this exception. At the top is the printed data
of line 117
of the same file.
{'Plotname: Operating Point\r\n': NutBinAnalysis(analysis_name='Plotname: Operating Point\r\n', numtype=<NumType.REAL: 'real'>, data={'v(xtop.vdc_p)': array([1.39804065e-76]), 'i(v.xtop.vvdc)': array([1.39804329e-76])}, units={'v(xtop.vdc_p)': <Units.VOLTS: 'voltage'>, 'i(v.xtop.vvdc)': <Units.AMPS: 'current'>})}
Plotname: Operating Point
Traceback (most recent call last):
File "C:\Users\dario\Documents\phd\software\Hdl21\examples\mos_sim.py", line 61, in <module>
main()
File "C:\Users\dario\Documents\phd\software\Hdl21\examples\mos_sim.py", line 49, in main
results = MosDcopSim.run(opts)
File "c:\users\dario\documents\phd\software\hdl21\hdl21\sim\data.py", line 392, in run
return run(self, opts=opts)
File "c:\users\dario\documents\phd\software\hdl21\hdl21\sim\data.py", line 411, in run
return vsp.sim(inp=to_proto(inp), opts=opts)
File "c:\users\dario\documents\phd\software\vlsir\vlsirtools\vlsirtools\spice\spice.py", line 124, in sim
results = [
File "c:\users\dario\documents\phd\software\vlsir\vlsirtools\vlsirtools\spice\spice.py", line 125, in <listcomp>
future.result() for future in concurrent.futures.as_completed(futures)
File "C:\Users\dario\mambaforge\lib\concurrent\futures\_base.py", line 451, in result
return self.__get_result()
File "C:\Users\dario\mambaforge\lib\concurrent\futures\_base.py", line 403, in __get_result
raise self._exception
File "C:\Users\dario\mambaforge\lib\concurrent\futures\thread.py", line 58, in run
result = self.fn(*self.args, **self.kwargs)
File "c:\users\dario\documents\phd\software\vlsir\vlsirtools\vlsirtools\spice\base.py", line 59, in sim
results = sim.run()
File "c:\users\dario\documents\phd\software\vlsir\vlsirtools\vlsirtools\spice\ngspice.py", line 73, in run
return self.parse_results()
File "c:\users\dario\documents\phd\software\vlsir\vlsirtools\vlsirtools\spice\ngspice.py", line 123, in parse_results
raise RuntimeError(msg)
RuntimeError: Cannot read results for analysis op {
analysis_name: "op"
}
Then I ran:
$ python examples/mos_sim.py
Traceback (most recent call last):
File "C:\Users\dario\Documents\phd\software\Hdl21\examples\mos_sim.py", line 61, in <module>
main()
File "C:\Users\dario\Documents\phd\software\Hdl21\examples\mos_sim.py", line 56, in main
assert idd > 115e-76
AssertionError
(base)
This makes me think the sample_pdk
was maybe out of date. After I changed the assertion parameters on the simulation, it worked fine.
So I think that somehow in one of the new versions, maybe the ngspice
vlsirtool directive got
I have begun writing a transient example, and from comparing the RAW files to the bin_data
parsed file in the vlsir ngspice parse_nutbin_analysis
, I think I've found out that I think maybe the file data output changed from however it was encoded before. This version I am running is the mamba install ngspice
so I wonder if it's a version issue.
Reading the github actions, I think maybe this is uncaught in the testing as it is now. Potentially something that would solve the issue is if we had a conda recepie to also mantain some form of version control with the simulation tools and related. Maybe you have it somewhere I haven't found. Might try downgrading my ngspice to check.
This is the ngspice version I have on Windows. I might try Linux if it comes down to this being the reason, which I would not be surprised, but maybe could have implications in terms of file output parsing.
ngspice -v
******
** ngspice-38 : Circuit level simulation program
** The U. C. Berkeley CAD Group
** Copyright 1985-1994, Regents of the University of California.
** Copyright 2001-2022, The ngspice team.
** Please get your ngspice manual from http://ngspice.sourceforge.net/docs.html
** Please file your bug-reports at http://ngspice.sourceforge.net/bugrep.html
** Creation Date: Nov 1 2022 12:41:43
******
Ok I've found the issue finally. No surprise. It has to do with the installation of ngpsice
. I've just run the mos_sim
example with your latest repo in ngspice 40
in the latest IIC-OSIC-TOOLS ubuntu docker version and worked fine as you had it, so is not a problem with your configuration. I will test if ngspice 40
works fine in Windows as the mamba installation is version 38.
EDIT: I cba dealing with Windows so I'm moving all my development to Linux as I should have done some time ago.
I will keep the issue open because maybe we should think about version control of the toolchain so this helps others.
Yeah. One thing we do not control especially well are the version requirements on external tools - particularly simulators.
This should be a VLSIR (tools) thing, and is now: https://github.com/Vlsir/Vlsir/issues/78.
That'd be a great first issue to tackle!
I have run:
I get:
I've sorted it and will submit a PR iab.