Commit Graph

21 Commits

Author SHA1 Message Date
Darryl L. Miles d55a2b74ac header file #ifndef guard namespace consistency (global change)
This add an effective namespace prefix to the guard ifndef
2025-07-29 10:50:32 -04:00
Darryl L. Miles f77c4cbaa1 ext2spice.h: move function prototype after arg type decls 2025-07-27 12:52:12 -04:00
Darryl L. Miles 2d889b3e9d ext2spice.h: one line per declaration 2025-07-27 12:52:12 -04:00
Darryl L. Miles 1cab3852f1 K&R ext2spice.h: conversion to ANSI 2025-07-27 12:52:12 -04:00
Darryl L. Miles e258b21251 K&R ext2spice: remove non-existent function prototypes
extern int _ext2spice_start();
 extern EFNode *spcdevHierSubstrate();
2025-07-27 12:52:12 -04:00
Darryl L. Miles 0badf814c5 extraction: constify struct devMerge.next, devMergeList
Feel free to undo variables as necessary in the future as requirements change.
2025-07-27 12:49:54 -04:00
Darryl L. Miles 82a57f8714 ext2sim.c: constify string globals 2025-07-27 12:49:54 -04:00
Tim Edwards a3f5f4db80 Changed the behavior of capacitance value output in ext2spice
and ext2sim to make use of the new esSIvalue() routine, so that
it no longer depends on a preformatted string.  Corrected an
issue where the esSIvalue() routine would output "a" for "atto"
which is not supported by ngspice.
2023-03-13 13:21:34 -04:00
Tim Edwards c7f11d2169 Important update: Reworked the extraction method to properly
isolate the terminal areas of a device (e.g., source and drain)
and calculate their area and perimeter individually for the
device (in addition to the traditional method of calculating
area and perimeter of each resistance class for the entire node).

Also:  Reworked the SPICE syntax output to generate SI values
in the range 1-1000 with the appropriate suffix (e.g., "20u")
instead of defaulting to "u" for lengths and "p" for areas.
This prevents it from producing weird units like "150000u" when
a process definition already includes a scalefactor.

Reworked the "extresist" code to use the device terminal area
and perimeter.  This fixes an error in which "extresist" would
lose these values and "ext2spice" with option "extresist on"
would generate a new netlist output with zero terminal areas
and perimeters.
2023-02-16 11:59:13 -05:00
Alessandro De Laurenzis b306a39560 Compatibility with C99 standard
This commit makes the code (mostly) C99-compatible, enabling to compile
it without the -Wno-error=implicit-function-declaration flag. This
way, Magic becomes usable on arm64 architectures, specifically on Apple
computers with M1/M2 SoC.
2022-10-29 06:07:46 +02:00
Tim Edwards 6ecd077ab4 Restored compiling of the non-Tcl/Tk version of magic. This has
traditionally been kept for backwards compatibility.  However, the
operation of "ext2spice" and "ext2sim" as separate programs has
become extremely difficult to maintain, and so it has been dropped
in favor of folding both into the program as commands, as was done
a long time ago in the Tcl/Tk version.
2022-02-08 16:12:07 -05:00
Tim Edwards 5e3c26c95a Tracked down two more memory leaks coming from ext2spice, due to
client data generated by ext2spice and attached to a node's
nodeClient record;  there is an initNodeClient() routine but no
corresponding freeNodeClient() routine.  Eventually had to add a
callback function passed to EFDone() and EFFlatDone() to clean up
these entries.  After doing that, valgrind reports clean for all
memory allocated within ext2spice (there are other things that are
not freed but not related to a specific command, so do not need to
be treated as leaks).
2021-12-13 18:05:53 -05:00
Tim Edwards 6136d3ff0f Implemented a command option "ext2spice short voltage|resistor|none" that
implements a method for handling ports in a subcircuit that have different
port names and indexes but are shorted together.  "none" is the default
and backwards-compatible behavior that merges ports together, which will
often cause one of the ports to be optimized out of the netlist.  "resistor"
will separate the port names with a 0-ohm ideal resistor.  "voltage" will
separate the port names with a 0-volt voltage source.  This should work
well for simulation and potentially for LVS, although its impact on LVS
has not been fully investigated.
2021-07-10 21:13:24 -04:00
Tim Edwards e9f21885b3 Corrected an error in initNodeClient in ext2spice that uses
TTMaskSetMask() like = instead of |=, which doesn't work because
the mask is uninitialized.
2021-06-11 16:53:23 -04:00
Tim Edwards 1c0dbc907a Recast all uses of resist-class and device class in routines using
code from extflat from type unsigned long to type TileTypeBitMask.
This increases the number of types of each to 256 and tracks the
number of types, so it should be difficult to exceed this amount.
2021-05-27 16:13:06 -04:00
Tim Edwards 32ec962535 Separated drain and source records for the esFetInfo array, to
support asymmetric FETs and other devices like bipolars that have
three distinct terminals.  This does not go as far as it should to
make the array independent of the number of declared terminals of
the device.  However, it suffices to make, e.g., parameter "a2=area"
work for a bipolar device, and to generate the right drain and source
areas and perimeters for asymmetric (e.g., extended-drain) devices.
2020-09-11 17:29:12 -04:00
Tim Edwards 18131e26b3 Pulled merge request from Jan Belohoubek, but corrected the problem
of needing to revert parameter definitions after swapping them
during a device source/drain swap.
2020-08-09 13:11:38 -04:00
Tim Edwards 2af38a4191 Updates from running the fix-ending-whitespace script. 2020-05-23 17:13:14 -04:00
Tim Edwards 7a42b5b6ad Fixed a long-standing error in which "ext2spice merge" fails when
used with "ext2spice hierarchy on" because the device index is not
reset between calls to output cells in the hierarchy, leading to
a mismatch of the index for all cells after the first one output.
2019-10-23 09:33:37 -04:00
Tim Edwards 088fc759c4 Set of changes updating version 8.2 to the level of 8.1, since 8.2
development had been halted since it was first created back in April.
Version 8.2 is now the official development version, with the first
development push to create a Cairo graphics interface.
2017-08-01 22:14:42 -04:00
Tim Edwards 231a299b16 Initial commit at Tue Apr 25 08:41:48 EDT 2017 by tim on stravinsky 2017-04-25 08:41:48 -04:00