Fix hierarchical netlist processing #546
Merged
Conversation
The procedure returns a list of all component pins in a schematic.
This also prevents possible conflicts with the operator/function '_' used both by gettext and (ice-9 match).
The crashes appeared in page-list->hierarchical-subschematic() due to wrong result (#<unspecified) by hierarchy-down-schematic() when no source file was found, e.g., in the case where an appropriate source-library() call was missing in gafrc files.
It is intended to contain the component the subschematic belongs to, if any, otherwise #f.
It returns simple (non-hierarchical) refdes of a <schematic-component> object.
Additionally, the commit adds a couple of new checks: - If inner port component has no pins. - If there are several components that could represent a port for a pin.
The procedure returns hierarchical (IOW, port, or vertical) connections of a subschematic.
The procedure chooses best name option for hierarchical connections.
The function get-rename-list() has been fixed to reflect this
change.
Tests modified for passing 'make check' shows changes as follows:
- the geda backend no longer displays intermediate renamings the
same way it is used for unnamed nets shown in netlists. Renamed
unnamed nets of a subschematic are shown by the geda backend
differently, e.g., "hierarchical/net/unnamed_net_at_XxY", where
X and Y are coords of one of their members.
- If a net has more than one preferred attribute attached ("net="
or "netname="), the lowest one is chosen by means of the
predicate refdes<?().
- The sequence numbers of unconnected pins and unnamed nets have
been reduced due to eliminating of internal ones from the
list.
<pin-net> records no longer used in netlisting.
The only function left has been merged with deprecated gnetlist:get-renamed-nets().
… nets. The test schematic was compiled from test schematics provided by Karl Hammar.
When building with guile-2.0, the procedure sort() conflicts with the module name '(netlist sort)' with the error as follows: ERROR: In procedure #<directory (netlist sort) 23163f0>: ERROR: Wrong type to apply: #<directory (netlist sort) 23163f0> Since the module (netlist sort) is, generally, not about sorting, it has been renamed to avoid the conflict (instead of using of another sort function). Other procedures (especially those working with duplicates, e.g., from symcheck code base) can go there in future.
|
I'll merge the commits since Nicklas confirmed it works as expected (please see our today's conversation on the geda-user list). |
vzh
added a commit
that referenced
this pull request
Feb 25, 2020
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
The patch-set includes changes as follows:
Added docstrings and comments for several functions.
The module
(netlist rename)has been removed. All previous renamingfunctionality has been wholly thrown away.
The module
(netlist pin-net)has been removed.<pin-net>recordsare no longer used in netlisting.
Introduced hierarchical (over-port, or vertical)
connections which are used to produce net names for schematics
with subcircuits. This resulted in the following changes in
output netlists:
The
gedabackend no longer displays intermediate renamingsthe same way it is used for unnamed nets shown in netlists.
Renamed unnamed nets of a subschematic are shown by the geda
backend differently, e.g.,
"hierarchical/subciruit/name/unnamed_net_at_XxY", where X and
Y are coords of one of their members.
If a net has more than one preferred attribute attached
("net=" or "netname="), the lowest one by means of
the predicate refdes<?() is chosen then.
The sequence numbers of unconnected pins and unnamed nets have
been reduced due to removing of internal ones from the
sequence.
The record now contains a new field,
port-connection, which holds a hierarchical<schematic-connection>a pin belongs to.Added new tests for a hierarchical schematic with toplevel
unnamed nets (thanks to Karl Hammar who provided initial test
schematics the schematic was compiled from).
Added new checks for the
<schematic-port>records:If inner port component has no pins.
If there are several components that could represent a port
for a pin.
The
<subschematic>record now contains a new field,parent.It is intended to contain the component the subschematic belongs
to, if any.
Avoid crashes when source file cannot be found.
error()has been replaced withnetlist-errorin several places.Closes #528