Commit Graph

6038 Commits

Author SHA1 Message Date
Matthias Koefferlein 7cec679d39 Taking care of complex library reference scenarios where libraries self-reference and under the presence of stale references. Main issue is order of resolution and indirect references due to replication. Solution is to repeat resolution until saturated. A test is supplied. 2026-03-31 21:35:33 +02:00
Matthias Koefferlein 062567f206 WIP 2026-03-29 19:41:19 +02:00
Matthias Koefferlein ddb261d708 Improving stability of library refresh
1.) Safeguard against missing cells
2.) Use topological order during refresh
    This avoid child-first issues
3.) Use cell names and basic names for mapping
    (cell names may be disambiguated while
    basic names are not)
2026-03-28 22:05:23 +01:00
Matthias Koefferlein 4c47cfb03a WIP: 'sparse_array_limit' on DSS 2026-03-23 22:49:47 +01:00
Matthias Koefferlein c03a617fe2 Added some tests for the netlist browser API 2026-03-23 21:42:49 +01:00
Matthias Koefferlein 1588e74873 Providing a way to generate netlist browser paths
You can generate paths from net, device, circuit or subcircuit
objects. To generate a path for an object from the first netlist
of a pair (layout netlist in LVS case), use

  NetlistObjectsPath#from_first

e.g.

  path = RBA::NetlistObjectsPath::from_first(net)

For an object from the second netlist (schematic in the LVS case)
use "from_second".
2026-03-23 20:36:46 +01:00
Matthias Koefferlein 92143ef543 WIP - experimental feature to resolve sparse cell arrays 2026-03-22 23:49:51 +01:00
Matthias Koefferlein 851919c42b Enabling direct storage of boxes in box scanner for (slightly) better performance 2026-03-22 21:50:26 +01:00
Matthias Koefferlein aa361277a0 Implementing replication in LStream, OASIS and GDS2 2026-03-22 21:21:11 +01:00
Matthias Koefferlein 56e84e7056 Added test for lib file reading 2026-03-22 16:01:39 +01:00
Matthias Koefferlein 4908f51e1c WIP 2026-03-22 00:07:09 +01:00
Matthias Koefferlein c211925d2a Implemented solution for #2306
First of all, NetlistBrowserDialog#current_path now has a setter.
Changing the selection will navigate to the location of the
selected object, but not issue an "on_selection_changed" event.

In addition, the following features have been added:
* NetlistBrowserDialog#db_index
* NetlistBrowserDialog#view
2026-03-21 20:32:32 +01:00
Matthias Koefferlein f501f039c0 Added tests and two convenience methods
The two convenience methods are

Library#library_from_file
Library#library_from_files

Both create and register a Library object tied to a file.
This object supports proper reloading and re-mapping on
"refresh".
2026-03-21 14:59:08 +01:00
Matthias Koefferlein ca3505b872 Part of the bugfix for #2305 - properly mapping cell indexes after library reload 2026-03-21 11:17:39 +01:00
Matthias Koefferlein cb9e25f1b3 Issue #2300: added documentation about KLAYOUT_DEF_FORMAT and KLAYOUT_LEF_FORMAT environment variables. 2026-03-21 09:25:17 +01:00
Matthias Koefferlein c311906298 Some refactoring 2026-03-20 16:58:53 +01:00
Matthias Koefferlein 94908162d6 LEF/DEF suffixes can be configured
The way to specify them is through the following
environment variables:

$KLAYOUT_LEF_FORMAT - LEF suffixes (default: "*.lef *.LEF *.lef.gz *.LEF.gz")
$KLAYOUT_DEF_FORMAT - DEF suffixes (default: "*.def *.DEF *.def.gz *.DEF.gz")

The string is a space-separated list of simple
match pattern. Only "*.xyz"-style pattern are allowed
currently.
2026-03-20 16:48:35 +01:00
Matthias Koefferlein 2dfcc9293e Allowing to explicity specify a format
Most tools and functions now allow to explicitly
specify a format for input and output. On input,
the format is usually detected, but for some
cases, this is not possible (e.g. DEF). So you can
specify the format attached to the file name in
square brackets:

e.g. file.defok[def]

"def" is the intended suffix, "defok" is the given one.

On output, the same is possible, specifically in strmxor
and strmclip:

strmxor a.gds b.gds out.xor[oas]
2026-03-20 16:30:28 +01:00
Matthias Koefferlein 00c826688f Added the ability to run DRC and LVS from strmrun 2026-03-20 15:48:58 +01:00
Matthias Koefferlein 42a008efd1 Potential performance improvement for deep-mode DRC
The idea is to use broken regions for certain operations
such as booleans in deep mode (local operations). These polygons are
more efficient. To support this, a "broken polygon" view
is supplied similar for "merged" view. The translation is
handled automatically.

As a side effect, regions may appear to be composed in broken
polygons now when they have been merged before.
2026-03-19 12:53:49 +01:00
Matthias Koefferlein 95f2335fc4 [consider merging] bugfix: DeepRegion::processed with properties did not deliver polygon refs which made them unsuitable for further processing. 2026-03-19 12:53:30 +01:00
Matthias Koefferlein 4af2662a08 Fixing unit tests 2026-03-15 10:03:51 +01:00
Matthias Koefferlein fb2559bf75 Fixing a performance regression in the merged layer computation
Problem was that while properly implementing the reverse
cluster connection during cluster merges, cluster connection
propagation suffered a complexity explosion during generation
of the cluster interactions.

Solution is to postpone the cluster joining step until
a cell is finished connecting the clusters. To mitigate the
performance effect of that, some optimizations are
introduced (e.g. using a more efficient unordered_map).
2026-03-14 18:55:03 +01:00
Matthias Koefferlein 1985f5663c Fixing issue #2293 2026-03-07 13:28:35 +01:00
Matthias Koefferlein f8646851e1 Updating doc and pyi files 2026-03-06 15:46:16 +01:00
Matthias Koefferlein a80d181cf1 Mutex got faster on i386, so threaded worker tests need to be adjusted 2026-03-05 21:16:17 +01:00
Matthias Köfferlein e82d2140b3
Merge pull request #2280 from KLayout/wip
Wip
2026-03-04 18:46:10 +01:00
Matthias Koefferlein 001deab767 Fixing Python module builds 2026-03-03 23:20:43 +01:00
Matthias Köfferlein 9b5c76f993
Merge pull request #2290 from KLayout/feature/issue-2248
Providing a solution for #2248
2026-03-03 22:38:31 +01:00
Matthias Köfferlein 5acb789ecf
Merge pull request #2289 from KLayout/bugfix/issue-2285
issues 2285 and 2286
2026-03-01 23:25:56 +01:00
Matthias Köfferlein abc1ffe9f6
Merge pull request #2276 from KLayout/bugfix/issue-2273
Bugfix/issue 2273
2026-03-01 23:25:22 +01:00
Matthias Köfferlein 0753aa47e4
Merge pull request #2288 from KLayout/bugfix/issue-2284
Implemented backup files for the configuration file
2026-03-01 23:25:08 +01:00
Matthias Koefferlein aaa165df32 Providing a solution for #2248
The solution is to introduce a new object, the layout handle.
A layout handle is a reference counting pointer to a layout.
It can be obtained from a cell view and stored somewhere.
If the cell view is closed, the layout will still exists
as long as a layout handle exists. A layout handle can be
used in LayoutView#show_layout in addition to the Layout
object to re-open a layout that existed in a closed view.
2026-03-01 21:13:40 +01:00
Matthias Koefferlein 992947f748 ReportDatabase#merge - a method to merge two report databases 2026-03-01 17:39:29 +01:00
Matthias Koefferlein 8a594c1626 Doc update 2026-03-01 15:32:21 +01:00
Matthias Koefferlein ca1d648917 Implementing --help as alias for -h and --version as alias for -v 2026-02-28 09:54:41 +01:00
Matthias Koefferlein f3b7146034 Added documentation to clarify constraints on the documentation parameter name 2026-02-28 09:48:54 +01:00
Matthias Koefferlein 25a6db267c Implemented backup files for the configuration file
Currently, up to 10 backups are kept.
"klayoutrc.1" is the most recent backup, "klayoutrc." the
second most recent etc.
2026-02-28 09:39:12 +01:00
Matthias Koefferlein 125f3b459f Added a marker attribute to turn off label frames: Marker#text_frame_enabled. Set it to false to disable the frame 2026-02-24 22:10:05 +01:00
Matthias Koefferlein b657cd9b57 Bugfix: double clicking an edge in partial mode opened the properties dialog, not setting a point 2026-02-24 21:44:33 +01:00
Matthias Koefferlein 3af5568663 [consider merging] Bugfix: Python did not support downcasting of PolygonWithProperties to Polygon on Shapes#polygon for example 2026-02-24 21:00:21 +01:00
Matthias Koefferlein de7ace9295 [consider merging] Bugfix: OASIS reader was not able to read S_GDS_PROPERTY from file level or under forward reference conditions 2026-02-24 19:17:14 +01:00
Matthias Koefferlein 7ae87404a0 [consider merging] Adding an option '-of|--format' to strmxor and strmclip to specify the output format instead of taking it from the suffix 2026-02-24 19:17:11 +01:00
Matthias Koefferlein 9f92c4eaa4 [consider merging] Bugfix: 'oasis_read_all_options' as always on in buddy tools. 2026-02-24 19:17:05 +01:00
Matthias Koefferlein c14d8cc877 [consider merging] proper cleanup of properties repo - this enables using user classes for names or values. Without this pre-finalization cleanup, the user class 'destroy' method may end up calling a method of an already destroyed class object. 2026-02-24 19:17:01 +01:00
Matthias Koefferlein bc49082955 Fixing a small glitch: drawing into a ghost cell is possible, but did not turn off the ghost cell flag. Now the flag is still on, but a non-empty cell is not considered a ghost cell for most purposes. 2026-02-19 23:26:48 +01:00
Matthias Koefferlein 95d6b0aca5 Fixing a potential segfault during drawing
This patch moves a lock inside the thread finishing
code such that a race condition of the finish sequence
and a random restart of the threads becomes impossible.
This problem has been observed while randomly zooming
with multiple drawing threads present. It's hard to
reproduce.
2026-02-19 22:34:10 +01:00
Matthias Koefferlein 94b84aad62 Fixing dialog title of 'round corners dialog' 2026-02-19 21:43:41 +01:00
Matthias Koefferlein 9534209240 Preparing to use C++20 atomics for thread locking, which is slightly more efficient. Right now, that's an experimental option. 2026-02-19 21:36:00 +01:00
Matthias Koefferlein a8119c5a53 Performance improvement for hierarchical processor
Problem was pushing of the results into the cell hierarchy
somehow lead to thread stalling. Likely due to bbox invalidation
and related effects. Solution is to store the results of
the operations inside the context structure (along with the
propagation information) and push it to the layout later in
a single step.
2026-02-19 00:03:25 +01:00
Matthias Koefferlein b685f89639 C++20 readiness 2026-02-16 23:49:23 +01:00
Matthias Koefferlein 3df88ae279 A small, but sometimes effective optimization of DRC check functions: if a feature is entirely covered (with interaction distance) by a box, it is enough to check against the box 2026-02-15 19:17:21 +01:00
Matthias Koefferlein 199cf1edfa Small enhancement: DRC 'profile' accepts 'true' as argument too 2026-02-15 15:17:13 +01:00
Matthias Koefferlein c3989f63e3 [consider merging] Performance improvement of netlist step (see https://www.klayout.de/forum/discussion/2839/drc-scripts-reports-and-parallelism#latest) 2026-02-14 23:39:00 +01:00
Matthias Koefferlein c1b4f97f33 Some fill tool enhancements
* It's possible to specify the fill cell origin now
  (this is the point where the first cell's lower left is placed)
* margin is taken into account when no step vectors are specified
* "No exclude" is default
2026-02-14 22:03:17 +01:00
Matthias Koefferlein ca43a6e9ce Overloaded base class methods also need to transfer ownership of arguments 2026-02-14 19:41:20 +01:00
Matthias Koefferlein cc7f049799 Fixing the Qt binding definitions to include addItem and for better alignment of Qt API 2026-02-12 23:05:08 +01:00
Matthias Koefferlein 5da83e670d Restoring drawing performance 2026-02-08 08:43:03 +01:00
Matthias Koefferlein 4a8a75f350 Updating doc. 2026-02-07 20:38:53 +01:00
Matthias Koefferlein 56fdbca1f5 Updating copyright to 2026 2026-02-07 17:12:53 +01:00
Matthias Köfferlein 31b7a5327b
Merge pull request #2271 from KLayout/bugfix/issue-2267
Bugfix/issue 2267
2026-02-07 09:46:52 +01:00
Matthias Köfferlein 887914944b
Merge pull request #2264 from KLayout/wip
Wip
2026-02-07 09:46:38 +01:00
Matthias Koefferlein 5298a99250 Fixing Python builds 2026-02-07 09:45:56 +01:00
Matthias Köfferlein 3f9d8906f9
Merge pull request #2266 from KLayout/bugfix/issue-2262
Bugfix/issue 2262
2026-02-07 09:18:03 +01:00
Matthias Koefferlein c15e24025e Experimental: do not list cells starting with underscore in library view 2026-02-06 23:24:05 +01:00
Matthias Koefferlein 2221efd96e Trying to fix Windows builds 2026-02-06 17:45:05 +01:00
Matthias Koefferlein ce877eed17 Fixed a unit test 2026-02-05 23:31:14 +01:00
Matthias Koefferlein 65fd3f3e50 Providing a fix for issue #2267
1. The script API "map_file" attribute has been changed
   to accept and supply nil (for no file), a string (for
   a file, empty is equivalent to "no file") and a list
   for multiple files which are merged. The split at "+"
   or "," has been dropped.
2. The strm* tools option ("--lefdef-map") has been changed
   to allow multiple occurances instead of split at "+" or ",".
2026-02-05 23:21:04 +01:00
Matthias Koefferlein 4e0befd8cd Trying to fix Windows builds 2026-02-05 22:16:58 +01:00
Matthias Koefferlein f68d02c6f3 Merge branch 'master' into wip 2026-02-05 22:05:24 +01:00
Matthias Koefferlein 22a197169d Trying to fix Windows builds 2026-02-05 22:04:10 +01:00
Matthias Köfferlein f53c6b8543
Merge pull request #2265 from KLayout/issue-2263
Following up on a number of Magic reader issues found in the course o…
2026-02-05 21:54:36 +01:00
Matthias Köfferlein 01d2ccbdc5
Merge pull request #2257 from KLayout/evaluate_net-enhancements
Evaluate net enhancements
2026-02-05 21:53:39 +01:00
Matthias Koefferlein 73b078003d Expression objects 'is_a' method now considers derivation 2026-02-02 23:17:15 +01:00
Matthias Koefferlein f0f2ffd714 Fixed keyword syntax in doc 2026-02-02 22:32:21 +01:00
Matthias Koefferlein 91ab72e8e5 Toolkit widget solution enhanced
- Bring text and path options to front when changing mode
- Path width and text string can be configure in toolkit widget
- Enter key finishes move and partial move
2026-02-02 22:05:45 +01:00
Matthias Koefferlein a6eb598abd Some refactoring: global editor option pages are requested from the plugins explicitly. So the generic editor options are not added automatically. 2026-02-02 00:09:29 +01:00
Matthias Koefferlein f0de3013cb Typo fixed 2026-02-01 22:56:56 +01:00
Matthias Koefferlein 0067d46541 Providing a (maybe faster, sometimes) backup implementation for cell mapping - to be used later maybe 2026-02-01 20:27:49 +01:00
Matthias Koefferlein f7870338cf [consider merging] Fixed a MT problem that can be fixed by avoiding recursive calls of Layout::update 2026-01-31 23:02:26 +01:00
Matthias Koefferlein c12942c5bc [consider merging] Fixed a MT problem that can be fixed by avoiding recursive calls of Layout::update 2026-01-31 21:53:28 +01:00
Matthias Koefferlein 6661f5b5dd WIP 2026-01-27 20:54:24 +01:00
Matthias Koefferlein 94a425da0d WIP 2026-01-26 23:55:55 +01:00
Matthias Koefferlein d326df2424 Updating shape count output format and tests 2026-01-25 21:58:44 +01:00
Matthias Koefferlein 9e0572b863 Delayed generation of outputs
In the multi-threaded case this saves some time. Still for
the sample from the issue that is a dominant runtime
component and makes a 8-core run slower than the single-core
one.
2026-01-25 19:37:13 +01:00
Matthias Koefferlein 5278b27683 Following up on a number of Magic reader issues found in the course of issue #2263
* The original issue ("sw" etc for "tri")
* Implementing "magscale"
* Interpolation of environment variables on paths
* Warnings include file positions now
* Ignoring "<< properties >>" pseudo-layer
* MAG writer uses zero-area boxes for empty ones
* New test
2026-01-25 19:30:08 +01:00
Matthias Koefferlein 23b3143451 Report flat count in deep mode, optimize hierarchy handling
1. In deep mode, the count report column will report
   hierarchical and flat counts
2. XOR is shortcut evaluated with one empty input. The
   default implementation does that internally, but at
   the cost of mapping to the internal working layout
   which spoils hierarchy.
2026-01-25 13:36:22 +01:00
Matthias Koefferlein 9e79942bb9 Proposing one part of fix 2026-01-25 10:06:58 +01:00
Matthias Koefferlein 2c65bf85e4 [consider merging] Bugfix: do not stop finder iterations when there are too many founds during text search 2026-01-24 19:32:10 +01:00
Matthias Koefferlein 11701a300e 'Apply' buttons and persistency of values for Layout+Selection 'move to', 'scale' and 'rotate by angle' 2026-01-24 16:19:11 +01:00
Matthias Koefferlein 86ddeb5970 Updating documentation 2026-01-24 14:29:19 +01:00
Matthias Koefferlein de70025316 Finish rulers by pressing the Enter key 2026-01-24 14:29:11 +01:00
Matthias Koefferlein ccd9952d49 Providing numerical move entries also for partial (handle) image and ruler moves 2026-01-22 22:34:34 +01:00
Matthias Koefferlein 8300e2ee57 Added Enter to finish shape edits, added numerical entries for paths and polygons 2026-01-19 22:41:52 +01:00
Matthias Koefferlein 280d79a02d Bug fixing the other rulers 2026-01-18 22:27:43 +01:00
Matthias Koefferlein 659feb468c Fixing a small glitch when notifications and toolbox widgets interact 2026-01-18 22:12:47 +01:00
Matthias Koefferlein ddee74ab78 Rulers: confine box/ellipse to square/circle with Ctrl, center box/ellipse with Ctrl - same as for drawing boxes 2026-01-18 21:12:26 +01:00
Matthias Koefferlein 18c2f5dfa4 [consider merging] incremental value placeholders for rulers 2026-01-18 18:27:54 +01:00
Matthias Koefferlein c2c941078d Enabling toolkit widgets for rulers 2026-01-17 01:05:56 +01:00
Matthias Koefferlein 6b5dbb1442 Enabling toolbox widgets for box service. Plus add-on: pressing Shift while dragging a box makes it centered. 2026-01-16 01:03:36 +01:00