Commit Graph

28 Commits

Author SHA1 Message Date
Tim Edwards 3a1f4dc816 Removed an "if" statement that was apparently designed to
reduce the amount of redundant painting done by the connectivity
search algorithm, but which was preventing composed types (such
as FET gates) from getting added to a net if one of the composing
types (such as poly) was drawn over the device in an ancestor
cell.  Removing the "if" statement does not appear to have any
significant performance impact, so this change is being adopted.
2024-04-11 15:18:25 -04:00
Tim Edwards f1e60fe8b1 Found an extreme issue in "extresist" in which the algorithm spent
all of its time running area searches on zero-area rectangles,
which was causing simple extractions to run hours.  Checking for
a zero area rectangle and conditionally skipping the area search
resulted in a massive speed-up in parasitic extraction.
2023-09-23 12:57:03 -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
Tim Edwards f066844761 Substantially revised the "def write" and "def read" routines.
Both were corrected with respect to the definition of non-default
(taper) rules.  "def write" was additionally modified to avoid
redundantly processing tiles where tile areas were merged together
to form a complete wire.  There is plenty of room for optimization,
but the output appears to be matching the layout.  Also:  Revised
the definition of "(not) visible layers" to include labels attached
to those layers, so that turning off visibility of any layer will
also hide all labels attached to that layer.
2022-11-17 20:24:39 -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 a550d615c0 Made some modifications to the "def write" command: It now handles
non-default rules and so can accurately capture wire widths other
than the technology LEF defaults (also corrected a bug with non-
default rules for "def read").  Corrected via handling in "def
write" to function as claimed (although the algorithm is still
naive and expects all contacts to be rectangular, which is usually
true but doesn't have to be).
2022-09-23 15:02:22 -04:00
Tim Edwards f89d52dbcc Modified the short selection routine (again) to avoid issues when
tracing the short path back through stacked contacts.  Discovered
a problem with the connectivity search routine (which has been in
the code for a very long time) which will fail to copy contacts
to the selection cell if it has already drawn one of the metal
layers in the same place.  This has now been fixed.
2022-01-06 13:29:43 -05:00
Tim Edwards 43bb499bcf Corrected an issue with the limited bitfield dedicated to port numbers;
this limited ports to 16384, which seemed reasonable at the time.
However, the sky130_sram_macro layouts connect power and ground in a
way that when coupled with "extract unique" can generate tens of
thousands of ports and overrun the bit field, showing that automation
can do the unexpected.  The solution was to split out the port number
from the label record as its own 32-bit value.
2021-12-12 22:09:31 -05:00
Tim Edwards 59fc24729c Corrected issues in the extresist function found after the previous
commit, mostly relating to the scale of values in the ".nodes" file
produced by ext2sim.  Making this file CIF syntax seemed unnecessary,
so I removed the CIF syntax and scaling.  "extresist" can now produce
an apparently valid output on a standard cell layout.  Even with the
change, the extresist output is still only pseudo-hierarchical, so
this does not preclude the need for eliminating the .sim format file
in favor of the .ext file, but it provides a working intermediate
form.
2021-04-21 13:03:26 -04:00
Tim Edwards c2aedcebab Applied the same change made yesterday to DBconnect.c to ResConDCS.c
and SimDBstuff.c, which have nearly the same connectivity search
functions.  All three now use the hybrid list + stack method.
2021-03-22 09:49:56 -04:00
Tim Edwards 4ff8d06810 Changed to a hybrid list and stack; the list keeps 65536 entries
at a time, and when it runs out of space, it pushes the stack.
This should speed up the connectivity routine somewhat, as it no
longer has to copy memory when expanding the list size, and it no
longer has limit at the integer boundary for memory allocation.
2021-03-21 20:53:20 -04:00
Tim Edwards fbd1acd60e A few corrections to the network connection selection. The pruning
method does not work and needs debugging, but is otherwise harmless.
2021-03-21 17:21:25 -04:00
Tim Edwards 633f6f558d Modified the connectivity finding search routine so that it does
not crash if too many unprocessed areas get queued up.  Also modified
it to prune entries that match one of the last five entries created
before searching the current tile.  However, it is not clear that
that makes any significant difference to the run time, and it needs
to be analyzed vs. the number of entries to check against.
2021-03-21 15:54:07 -04:00
Tim Edwards 324721b514 Added some options to the net selection with respect to labels.
The previous behavior was to generate hierarchical names for all
labels when copying contents of subcells.  This is "safe" for
copying selections without accidentally shorting things through
labeling, but it can make a mess of the selection.  Options are
now "select do labels" for the existing behavior, "select no labels"
to not show any labels, and "select simple labels" to show only the
root name of labels in subcells.
2021-03-04 14:00:31 -05:00
Tim Edwards fc9ecd2c9b Corrected a problem with an uninitialized entry in ExtCurStyle that
could cause serious errors on systems that do not auto-zero allocated
memory.  Also:  Fixed an error introduced by a recent commit to allocate
character memory for efReadLine() which frees the memory before reading
a .res.ext file, causing a crash when using "ext2spice" with the
"extresist on" option.
2020-06-05 12:46:46 -04:00
Tim Edwards 2af38a4191 Updates from running the fix-ending-whitespace script. 2020-05-23 17:13:14 -04:00
Tim Edwards 937e848d03 Modified DBTreeCopyConnect() so that it can take an argument to
not copy labels;  not copying labels speeds up the antenna checks
(which don't need labels) greatly.  Also fixed several numerical
overflow problems in the antenna checks, which resulted in false
positive errors, as well as nonsensical results.
2020-04-03 16:22:56 -04:00
Tim Edwards 42917e80cc Merge branch 'master' into bplane
Conflicts:
	VERSION

Merged master (fix to dbcConnectFunc for integer size overflow in
call to mallocMagic()).
2020-03-28 20:15:17 -04:00
Tim Edwards 70613a3778 Modified line in DBconnect.c to cast csa2_size to type (size_t), as
magic crashed when the conSrArea array exceeded the size of a 32-bit
int during the antenna rule check.  Should be good for another four
orders of magnitude.
2020-03-28 20:11:22 -04:00
Tim Edwards cd87b08b21 Merge branch 'master' into bplane
Conflicts:
	VERSION
	database/DBcellsrch.c
	database/DBconnect.c
	extract/ExtInter.c
	lef/Depend
	utils/Depend

Updated bplane branch with all changes to master since the bplane branch
was last modified.
2020-03-12 08:29:33 -04:00
Tim Edwards 897a8064ba Restored the behavior of selecting and displaying labels that are
down in the hierarchy when selecting a region or net, but with a
(hopefully very useful) twist:  To avoid the problem of ambiguous
labels in subcells, the subcell name hierarchy is generated in
the same way as is done when flattening a cell, with the instance
name prepended.  For example, when selecting a net in a standard
cell design, a terminal would highlight the name "OR2X1_1/B"
instead of just "B".
2020-02-14 08:48:47 -05:00
Tim Edwards f2dc4b37f0 Corrected the connectivity search function so that it does not attempt
to copy and search on a label that already exists in the flattened,
copied database.  Otherwise multiple labels on a single net can cause
the search to go into an infinite loop, repeatedly copying and erasing
the same label over and over again.
2020-02-13 10:04:55 -05:00
Tim Edwards 197c3f3448 Merge branch 'master' into bplane
Conflicts:
	commands/CmdCD.c
	database/DBcellsrch.c
	database/DBconnect.c
	database/DBio.c
	lef/lefRead.c
	select/selDisplay.c

Updated the bplane implementation with all recent updates (merged master).
2019-07-24 20:36:55 -04:00
Tim Edwards 24786b208a Corrected a badly-implemented search for electrical connectivity
through labels with the same text (particularly necessary for
abstract views, since the real connectivity may not be represented).
The original implementation could generate very deep subroutine call
stacks and lead to stack overflow.  The new implementation performs
the same check but without the deep nesting.
2019-05-22 10:38:00 -04:00
Tim Edwards 1d04f20f5d Moved new work on magic-8.4 (experimental merging of micromagic bplane structure
into magic-8.2) into the newly-reorganized git repo as branch "bplane".
2019-03-22 19:58:47 -04:00
Tim Edwards 7f1fa3a4c5 Modified the label connect function so that it only copies connected
labels if they are in the top-level cell of the connection search.
Otherwise, this slows the connection search way down for nets with
lots of internal labels, and can also have potentially bad consequences
if, for example, the connected network is copied to another position,
and carries all the flattened and non-hierarchically-named labels with
it.
2019-02-09 17:02:23 -05: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