Commit Graph

9552 Commits

Author SHA1 Message Date
Justin Fisher 17ea132b3a Updated osdiregistry.c and osdi.h to hopefully make OSDI files from all current, known flavors run without crashing 2026-08-11 17:08:08 +02:00
Justin Fisher d429f24bb3 fixed 555-timer-2 convergence issue 2026-08-02 18:01:43 +02:00
Justin Fisher 13d55715fc fixed memory leaks 2026-08-02 18:01:38 +02:00
Justin Fisher e50dee9ccc Loading a production PDK model library (a deck that pulls in roughly 50,000 parameter definitions and expands to about 70,000 lines) took ngspice over 15 minutes -- before a single timestep was simulated. The circuit itself was small; the time went entirely into reading the input. This branch attempts to rectify that. This new parser now load the same deck in 5.3s. The parser itself takes about 0.7s with the rest of the time taken by ngspice itself 2026-08-02 18:01:27 +02:00
Justin Fisher 8fd86075c1 Reviewer: Please look at openva_location.txt and justins_osdi_modification.txt 2026-07-06 17:52:16 +02:00
Justin Fisher 0246ba761a Added a text file that explains the bsimbulk PMOS wiring fix. 2026-06-16 17:48:37 +02:00
Justin Fisher 39a5ea338b parser: 5-node count for bsimbulk/bsimcmg_va in model_numnodes
Without this entry, OSDI BSIM-BULK / BSIM-CMG models fall through
to model_numnodes()'s default 'return 4'.  The two consumers in
INP2M() (the 'too many nodes' check and the node-binding loop)
then set up only 4 GENnode slots on the instance.  The OSDI
runtime's node_mapping[] reads its 5-port descriptor and picks
up a stale/wrong node index for port 5 — effectively rewiring
the body (or temperature) terminal to a random node.

Symptom: PMOS body diode forward-biased through the supply.
A simple CMOS inverter draws amperes in steady state and fails
to switch rail-to-rail.  This branch demonstrates the bug
(without this commit) and the fix (with it).

Also add bsimcmg_va to the model-type allowlist in INP2M() for
consistency with bsimbulk (which was added in the previous
commit).
2026-06-01 14:39:52 +02:00
Justin Fisher 4db43d9612 parser: fix BSIM-BULK (level 77) model type lookup for OSDI MOSFETs
inpdomod.c: Add case 77 to the MOS level switch so that .model lines
with level=77 resolve to the bsimbulk OSDI device type instead of
leaving INPmodType=-1.  Without this, BSIM-BULK model cards are
registered with an invalid type and instances later fail to load.

inp2m.c: Add bsimbulk to the model-type allowlist in INP2M() so that
MOSFET instances using an OSDI BSIM-BULK model (M-prefix) are accepted
instead of rejected with 'incorrect model type'.

This is the minimum subset needed for a single-model BSIM-BULK test
case to parse.  The multi-bin handling change to inpgmod.c that
accompanied the original fix is omitted here — it is unrelated to the
PMOS-polarity wiring demonstration this branch is for.
2026-06-01 14:38:40 +02:00
Justin Fisher 4b017d0f8a Added a text file that explains the 2 modifications I made. 2026-05-27 10:21:34 +02:00
Justin Fisher fe6476f9f6 Add pre_osdi alias and set sourcepath case preservation
- commands.c: register pre_osdi as alias for osdi command so existing
  scripts using pre_osdi continue to work
- inpcom.c: add set sourcepath to the preprocessor case-preservation
  exception list; the lowercasing pass was corrupting uppercase letters
  in paths (e.g. VA_test -> va_test), causing source to fail on
  case-sensitive filesystems
2026-05-27 09:23:12 +02:00
Holger Vogt 6a99f7978e Update description for Linux. 2026-04-30 15:24:04 +02:00
Holger Vogt 531c4550bc Update for compiling with macOS Apple Silicon, tested with M2 2026-04-30 14:55:57 +02:00
Holger Vogt 0638e6ab35 Update to the README. 2026-04-30 13:40:39 +02:00
Holger Vogt db8cbb5c6e Remove result file 2026-04-30 13:06:31 +02:00
Linus Torvalds a1cd8d0565 Allow loading the entire audio file at vsjack_open() time,
get the actual oversampling, to allocate the sample space.
2026-04-30 13:06:31 +02:00
Linus Torvalds b672580181 Add some reset to -re-enable consecutive simulations 2026-04-30 13:06:31 +02:00
Linus Torvalds 6694fd882d Patch fixes bug in the original linear interpolation,
along with generating a proper "streaming" resampled output.
2026-04-30 13:06:31 +02:00
Holger Vogt a40e283ddc provide correct path info 2026-04-30 13:06:30 +02:00
Holger Vogt 8efc138b73 Add wav to fftw version of shared ngspice 2026-04-30 13:06:30 +02:00
Holger Vogt 70a1c3fc6e Improve error messages.
Oversampling default is 4.
2026-04-30 13:06:30 +02:00
Holger Vogt f3a243fd1f Make types compatible, change from int to size_t 2026-04-30 13:06:30 +02:00
Holger Vogt d71146a37a Formatting
Replace tabs by spaces
2026-04-30 13:06:30 +02:00
Holger Vogt 9f2f8bd567 Oversampling default is 1 2026-04-30 13:06:30 +02:00
Holger Vogt 8fda6f73ba Install ngspice wav on Ubuntu 24.04 2026-04-30 13:06:30 +02:00
Holger Vogt d774f5cf7c Examples for wav audio simulation. 2026-04-30 13:06:29 +02:00
Holger Vogt 412d9a7289 Update to ngspice-43. 2026-04-30 13:06:29 +02:00
Holger Vogt 2c9f7a7ebf Use the most recent samplerate.dll from
https://github.com/libsndfile/libsamplerate/releases
2026-04-30 13:06:29 +02:00
Holger Vogt d26c19f984 Remove source of memory errors: read and write beyond boundaries
caused segfaults.
2026-04-30 13:06:29 +02:00
Holger Vogt 302df8ddac Enable most recent build of sndfile.dll from
https://github.com/libsndfile/libsndfile
2026-04-30 13:06:29 +02:00
Holger Vogt 5bf1e82ac3 Just a small fix 2026-04-30 13:06:29 +02:00
Holger Vogt f4c56990f8 prevent a segfault when TSTOP less than TSTART in tran command 2026-04-30 13:06:28 +02:00
Holger Vogt 17665eb843 allow other simulation types, e.g. ac
prevents crash
2026-04-30 13:06:28 +02:00
Holger Vogt 271e9ce6b1 Enable compilation of shared ngspice with wav support 2026-04-30 13:06:28 +02:00
Holger Vogt 7a88c3341d Enable compiling with *.wav (audio) file support. 2026-04-30 13:06:28 +02:00
Holger Vogt 831754e71a Enable standard search paths for *.wav file search. 2026-04-30 13:06:28 +02:00
Holger Vogt 44a625e4df add dot commands .sndprint, .sndparam in inp.c 2026-04-30 13:06:28 +02:00
Holger Vogt 852c48194b Formatting: tabs to spaces 2026-04-30 13:06:27 +02:00
Holger Vogt 50c5a8e2ea Remove unused 2026-04-30 13:06:27 +02:00
Holger Vogt 338e50f15d update to enable compiling for Linux and Cygwin 2026-04-30 13:06:27 +02:00
Holger Vogt 8e9c5fb84a link to download added 2026-04-30 13:06:27 +02:00
Holger Vogt efe634cd71 typo 2026-04-30 13:06:27 +02:00
Holger Vogt 58d7739334 renamed from REAME.wav 2026-04-30 13:06:27 +02:00
Holger Vogt 63e7bd665e rename 2026-04-30 13:06:27 +02:00
Holger Vogt 07e61044c1 short intro
more to follow
2026-04-30 13:06:26 +02:00
Holger Vogt ab32d47860 replace exit() by controlled_exit() 2026-04-30 13:06:26 +02:00
Holger Vogt 93dbc846a3 declare functions and variables static, if so 2026-04-30 13:06:26 +02:00
Holger Vogt c1a35dbb92 reformat vsjack.c 2026-04-30 13:06:26 +02:00
Holger Vogt f6c78d8e9e Use the current method to set the coefficients 2026-04-30 13:06:26 +02:00
Holger Vogt 3d82891a87 reformat, set better error message for src_process() 2026-04-30 13:06:26 +02:00
Holger Vogt feb89e07dc add progress report when entering wav output stage 2026-04-30 13:06:26 +02:00