Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix hierarchical netlist processing #546

Merged
merged 61 commits into from Jan 18, 2020

Conversation

@vzh
Copy link
Member

@vzh vzh commented Jan 17, 2020

The patch-set includes changes as follows:

  • Added docstrings and comments for several functions.

  • The module (netlist rename) has been removed. All previous renaming
    functionality has been wholly thrown away.

  • The module (netlist pin-net) has been removed. <pin-net> records
    are 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 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/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 with netlist-error in several places.

Closes #528

vzh added 30 commits Nov 12, 2019
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.
vzh added 22 commits Jan 13, 2020
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.
@vzh
Copy link
Member Author

@vzh vzh commented Jan 18, 2020

I'll merge the commits since Nicklas confirmed it works as expected (please see our today's conversation on the geda-user list).

@vzh vzh merged commit f59b3b7 into lepton-eda:master Jan 18, 2020
1 check passed
1 check passed
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@vzh vzh added this to the 1.9.10 milestone Jan 18, 2020
@vzh vzh deleted the vzh:fix-hierarchical-netlist-processing branch Jan 18, 2020
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
Labels
None yet
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

1 participant