stineje / CharLib

Open-source repository for a standard-cell library characterizer using complete open-source tools
GNU General Public License v2.0
16 stars 2 forks source link

problem testing gf180 #25

Closed thesourcerer8 closed 2 months ago

thesourcerer8 commented 7 months ago

When trying these commands:

pip install charlib git clone https://github.com/stineje/CharLib/ cd CharLib test/gf180/fetch_spice.sh charlib run test/gf180

I get this output:

Searching for YAML files in test/gf180/ Reading configuration found in "test/gf180/gf180.yml" Prefixed unit not found for 1e-15 J and power -15 Prefixed unit not found for 1e-15 J and power -15 Recognized GF180MCU_OSU_SC_GP12T3V3INV_1 pin Y function as INV Recognized GF180MCU_OSU_SC_GP12T3V3AND2_1 pin Y function as AND2 Recognized GF180MCU_OSU_SC_GP12T3V3XNOR2_1 pin Y function as XNOR2 Recognized GF180MCU_OSU_SC_GP12T3V3DFF_1 pin Q function as BUF Recognized GF180MCU_OSU_SC_GP12T3V3DFF_1 pin QN function as INV Recognized GF180MCU_OSU_SC_GP12T3V3DFFSR_1 pin Q function as BUF Recognized GF180MCU_OSU_SC_GP12T3V3DFFSR_1 pin QN function as INV Running input_capacitance for pin A of cell GF180MCU_OSU_SC_GP12T3V3__INV_1 Traceback (most recent call last): File "/home/philipp/.local/lib/python3.10/site-packages/PySpice/Spice/Netlist.py", line 928, in getattr return self.getitem__(attribute_name) File "/home/philipp/.local/lib/python3.10/site-packages/PySpice/Spice/Netlist.py", line 921, in getitem raise IndexError(attribute_name) # KeyError IndexError: lib

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/home/philipp/.local/bin/charlib", line 8, in sys.exit(main()) File "/home/philipp/.local/lib/python3.10/site-packages/charlib/characterizer/run.py", line 60, in main args.func(args) File "/home/philipp/.local/lib/python3.10/site-packages/charlib/characterizer/run.py", line 127, in run_charlib library = characterizer.characterize() File "/home/philipp/.local/lib/python3.10/site-packages/charlib/characterizer/Characterizer.py", line 39, in characterize cells = [self.characterize_cell(cell) for cell in self.tests] File "/home/philipp/.local/lib/python3.10/site-packages/charlib/characterizer/Characterizer.py", line 39, in cells = [self.characterize_cell(cell) for cell in self.tests] File "/home/philipp/.local/lib/python3.10/site-packages/charlib/characterizer/Characterizer.py", line 48, in characterize_cell return cell.characterize(self.settings) File "/home/philipp/.local/lib/python3.10/site-packages/charlib/characterizer/TestManager.py", line 307, in characterize input_capacitance = self._run_input_capacitance(settings, pin.name) @ u_F File "/home/philipp/.local/lib/python3.10/site-packages/charlib/characterizer/TestManager.py", line 256, in _run_input_capacitance self._include_models(circuit) File "/home/philipp/.local/lib/python3.10/site-packages/charlib/characterizer/TestManager.py", line 139, in _include_models circuit.lib(*model) File "/home/philipp/.local/lib/python3.10/site-packages/PySpice/Spice/Netlist.py", line 930, in getattr raise AttributeError(attribute_name) AttributeError: lib

infinitymdm commented 7 months ago

Looks to me like you don't have our customized PySpice installed. We did a bit of extra work to handle the results of .measure directives and a handful of other things. This also appears to be the cause of #24 and #26.

Within the venv (or whatever equivalent you prefer) where you have CharLib installed, install our PySpice: pip install git+https://github.com/infinitymdm/PySpice. Then try running this again and see if you get some better results.

infinitymdm commented 6 months ago

@thesourcerer8 have you had a chance to try this out with our custom PySpice version?

thesourcerer8 commented 3 months ago

Yes, that problem seems to be gone with the correct installation of your customized version. Thanks a lot! What are your plans to distribute it upstream or to fork it?

infinitymdm commented 3 months ago

What are your plans to distribute it upstream or to fork it?

I submitted my patches to upstream PySpice ages ago, but I think they aren't as active as they once were. Hopefully they will come back around to it and accept my PRs at some point, but until then we'll continue to point people to our customized PySpice version.