-
Notifications
You must be signed in to change notification settings - Fork 52
Enable XSPICE support in libngspice #416
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Enable XSPICE support in libngspice #416
Conversation
Package Build ResultsTotal packages built: 50 Package Build Times (click to expand)
Longest build: libngspice (8m 49s) |
|
yea no I don't think Claude has any clue what it's doing and xspice adds a ton of extra complications of loading shared modules. It's kinda gone into clueless panic mode which rarely ends well, just changing random things, giving up, and claiming it works. This is definitely going to be more difficult than just enabling the option and fixing a few issues, or telling Claude to do so. |
|
Well after a lot of babysitting both Claude and my actual baby, I managed to coerce it towards the right solution. I wouldn't say it was efficient, but I could do it from my phone while also taking care of the actual baby. The main things it struggled with are failing to build matplotlib to actually run the tests, and the CI error was from unpickeling exceptions that don't exist in the host, masking the actual error and sending it on a wild goose chase. Once I got it to test pyodide on node manually and add some error logging we started a very slow human+ci+ai in the loop debugging process. |
- Enable XSPICE in libngspice build with --enable-xspice - Build cmpp natively for code model generation (wasm can't execute) - Package XSPICE code model libraries (*.cm files) to /usr/lib/ngspice/ - Add XSPICE mixed-signal test with ADC bridge - Use NgSpiceShared.new_instance() to avoid cffi duplicate declarations - Fix verilog install hook to prevent build errors
4434bab to
347a03b
Compare
ryanking13
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks. I literally have zero knowledge about this library and the package, so I will believe you ¯_(ツ)_/¯
I left some minor comments, otherwise it looks good to me overall.
| ngspice = NgSpiceShared.new_instance() | ||
|
|
||
| # Load XSPICE code model | ||
| ngspice.exec_command("codemodel /usr/lib/ngspice/digital.cm") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In some environments (e.g. pyodide venv) we don't install shared libraries to /usr/lib as it actually points the native directory, but I guess it should be okay for unit test.
Co-authored-by: Gyeongjae Choi <[email protected]>
This fixes #373 supposedly, let's see what CI has to say about it. It's a bit sketchy with manually compiling native build dependencies.
Here is what Claude had to say about it: