Commit Graph

3860 Commits

Author SHA1 Message Date
Holger Vogt 50974b1ddc Re-enable detection of over- or underflow of number of nodes
when calling a subcircuit.
Update to commit
c12296182 ("The code in src/frontend/subckt.c has a
fixed-size structure called table at the top with a
size set to N_GLOBAL_NODES = 1005.  If the number of
items passed in formal and actual exceeds 1005, then
ngspice exits immediately with an error.", 2023-03-14)
2024-11-13 11:14:29 +01:00
Holger Vogt 04796868fa typos 2024-11-09 12:24:37 +01:00
Giles Atkinson 27e63add5e Improve the behaviour of ngspice when run in the background on a
Unix-like OS with job control.  The progress ticker is suppressed
for a command like "ngspice some_circuit.cir &" so the terminal
remains usuable while the simulation runs.
2024-11-08 11:18:41 +01:00
Giles Atkinson 543a8bb62d Remove function cp_ccon() and related code. The function modifies
the terminal driver's treatment of the control-D (EOF) and escape
keys on Unix-like OSs.  But escape has no special meaning, and treating
control-D as a line terminator was probably to prevent unexpected
session exit when connected through a modem without error-correction.

Removing the function allows "ngspice netlist &" to work correctly.
The function was called during initialisation, which caused an endless
loop of job-control stops when ngspice was started as a background process.
2024-11-08 11:18:36 +01:00
Giles Atkinson 4c61e0ba26 Three minor code improvements. Remove a redundant test in com_measure2.c.
In vectors.c, always initialise a newly-created plot exactly once.
Improve an error message in spiceif.c.
2024-11-08 11:18:31 +01:00
Giles Atkinson a5a393c8b8 Fix processing of lines like: "*# pre_some_command ...". 2024-11-08 11:14:24 +01:00
Brian Taylor e819fc40d7 Fix some memory leaks. 2024-11-08 11:04:59 +01:00
dwarning f7e6b237f5 format - white spaces 2024-11-06 15:02:10 +01:00
dwarning bb0f7e2b29 Keep it simple: use only one structure and get_time function 2024-11-06 14:32:26 +01:00
dwarning f822d47c80 seconds() gives difftime to program start, lower priority for getrusage() and times() 2024-11-05 18:27:47 +01:00
dwarning 47e3eac83c Reorder and renovate timer functions taking into account ngspice multiprocessor capabilities
by using available high performance functions first.
Deprecated ftime() still acts as a backup function.
Solution is portable for today's operating systems and compilers.
2024-11-02 16:58:56 +01:00
Holger Vogt 7b3b36b1d9 Make the resistor name unique for a device with multiple unconnected nodes 2024-10-29 16:57:43 +01:00
Holger Vogt 31b9075f88 If preprocessing is skipped, we still need the number of lines in the deck. 2024-10-27 15:18:34 +01:00
Holger Vogt 4847ce100e Prevent crash if number of lines is wrong/not available ... 2024-10-27 15:17:51 +01:00
Holger Vogt 73ce59aa84 Add a comment 2024-10-27 10:43:41 +01:00
Holger Vogt ceec478091 Vectors Cy_xxx are of type 'current'. 2024-10-26 23:25:02 +02:00
Holger Vogt aa97a05f04 Use the correct type for each vector after S-parameter analysis.
Cy_1_1 is still missing (voltage as default).
2024-10-26 17:32:19 +02:00
Holger Vogt 9b8c7bd62f Fix bug no. 708, reported by Philip Sauvage. 2024-10-20 23:32:16 +02:00
Holger Vogt 878ac0076a Allow plotting a single point in an ascii plot
(command .asciiplot)
2024-10-09 16:58:20 +02:00
Giles Atkinson e0079e1cd5 Improve an error message. 2024-10-08 13:02:21 +02:00
Giles Atkinson e658a0942b Try to clarify the mechanism of parameter substitution and add
an example of substituting an XSPICE vector parameter.
2024-10-08 13:02:06 +02:00
Holger Vogt b14420803a Fix commit 09685dde1
("Set lower case for variables or vectors in command 'echo'.
Tokens starting with '$' will get lower-casing.", 2024-09-07)

Don't use s as name for temporary string, as s has been set
already and is used later.
2024-09-13 11:35:28 +02:00
Holger Vogt 09685dde1c Set lower case for variables or vectors in command 'echo'.
Tokens starting with '$' will get lower-casing.
2024-09-07 18:50:13 +02:00
Holger Vogt ecc8990e20 Make error messages more verbose:
add line number and source file name.
2024-08-28 16:20:10 +02:00
Holger Vogt 30ee6dff97 Add line number and source file to some error messages 2024-08-28 16:08:36 +02:00
Holger Vogt 0553960e37 Fix warning message 2024-08-28 16:05:56 +02:00
Holger Vogt a3bae9bc7a More on verbose error and warning messages 2024-08-28 16:05:03 +02:00
Holger Vogt d18680d728 Allow KiCad special token V(/xyz) by quoting 2024-08-28 15:14:00 +02:00
Holger Vogt ce656bd400 Make error messages more verbose:
add line number and source file name.
2024-08-28 15:12:56 +02:00
Holger Vogt 4a8000cad9 Add simulator version info to raw file ('write' commad)
using an extra line 'Command: ...').
The old sequence (adding commands manually to raw file) is
still available.
The 'Command: anycommand' will not be executed if loading
an ngspice-generated raw file. Raw files from other simulators may
generate a warning that the command is not available.
2024-08-18 14:21:03 +02:00
Holger Vogt 413382bd56 Add simulator version info to raw file in batch mode,
using the line 'Command:...'
2024-08-18 14:16:42 +02:00
Vogt f95e8c2e3a Error and warning messages to stderr 2024-08-01 13:28:32 +02:00
Holger Vogt f0ff8b230b Remove sourceinfo upon shared ngspice reset.
Remove memory leaks.
2024-07-20 17:54:43 +02:00
Holger Vogt 272e4cc6fb Memcpy only when p_word is not NULL
enable -fsanitize=address
2024-07-16 17:01:57 +02:00
Holger Vogt 98479267d4 Revert "memcpy only if p_word is not NULL"
This reverts commit 58787756d4.
2024-07-16 16:48:23 +02:00
Holger Vogt c61fc35231 Set pl_lookup_table to NULL after freeing: allow another initialization 2024-07-16 16:21:53 +02:00
Holger Vogt 620b9c86ce Update copyright 2024-07-16 16:21:22 +02:00
Holger Vogt 58787756d4 memcpy only if p_word is not NULL 2024-07-16 16:06:54 +02:00
Holger Vogt 2af390f0b1 Update copyright info 2024-07-13 10:14:02 +02:00
Holger Vogt 3c7012a826 Repair the link to the xhtml manual
Thanks to Geoffrey Coram for the hint.
2024-07-05 23:59:37 +02:00
Holger Vogt acdd93f157 If compiling shared ngspice, don't set up a terminal. 2024-07-01 09:42:58 +02:00
Holger Vogt 442d8554f0 Enable single terminal n devices (Verilog-A modules) 2024-07-01 09:42:28 +02:00
Holger Vogt 14bb63490c Plug a memory leak 2024-06-22 16:33:53 +02:00
Brian Taylor d01868b725 Cleanup gcc compiler warnings. 2024-06-22 14:23:50 +02:00
Holger Vogt b1795dbcf2 add path or filepath (without file name) to variable sourcepath,
when calling command 'source'
2024-06-22 14:23:41 +02:00
Holger Vogt dd6089c4fc Improved warning message: hint to line causing the warning. 2024-06-22 14:22:59 +02:00
Holger Vogt d61a728688 Add function check_for_nodes to
check if there are enough tokens in an instance line.
2024-06-22 14:22:06 +02:00
Holger Vogt 0362953cd4 Bail out when the instance line is not complete.
Moving on does typically not make any sense.
2024-06-22 14:21:56 +02:00
Holger Vogt fa5ac4a0cd When reading code models, allow only a single model pere command
(as was implicitely assumed anyway).
2024-06-22 14:21:15 +02:00
Holger Vogt 344beaad24 Add ft_spiniterror, to be set during spinit processing,as
ft_stricterror will be set only later, when .spiceinit is
executed.
2024-06-22 14:21:01 +02:00