-
Notifications
You must be signed in to change notification settings - Fork 108
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
[EDIF] Fixes rare bus renaming collision #1065
Conversation
Signed-off-by: Chris Lavin <[email protected]>
Signed-off-by: Chris Lavin <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So it looks like the common (non-collision) path now has an extra:
EDIFPort.getBusName(/*keepOpenBracket*/ false)
(instead oftrue
) which involves constructing a new sub-String
that strips any[
:RapidWright/src/com/xilinx/rapidwright/edif/EDIFPort.java
Lines 157 to 159 in 8797324
if (!keepOpenBracket && busName.charAt(busName.length() - 1) == '[') { return busName.substring(0, busName.length() - 1); } - An extra
EDIFCell.getPort()
hash lookup (or two; see below)
I can see that EDIFCell.getPort()
also has some logic with [
:
RapidWright/src/com/xilinx/rapidwright/edif/EDIFCell.java
Lines 280 to 288 in 8797324
public EDIFPort getPort(String name) { | |
if (ports == null) return null; | |
EDIFPort port = ports.get(name); | |
// For callers who have a port name and its unknown if its a bus, attempt a check with adding the '[' suffix | |
if (port == null && name.charAt(name.length() - 1) != '[') { | |
port = ports.get(name + "["); | |
} | |
return port; | |
} |
Am I right in interpreting that 1. will strip the
[
suffix, and then 2. will try and lookup with this (unfortunate_name
in this test, which will fail) and then it will do a second lookup (with a new string) back on unfortunate_name[
and find a hit)?
…tGenerator Signed-off-by: Chris Lavin <[email protected]>
Signed-off-by: Chris Lavin <[email protected]>
That is correct. This is the mechanics used to avoid the root bus name collision problem with single bit ports of the same root name. To be clear, this PR only modifies how the legalization of the EDIF name on export is handled. The internal mechanics/storage/retrieval remain the same. |
My analysis here was to see if we can explain where the 5% performance impact comes from. Could this be reduced now with your latest changes? |
Co-authored-by: eddieh-xlnx <[email protected]> Signed-off-by: Chris Lavin <[email protected]>
Signed-off-by: Chris Lavin <[email protected]>
* [EDIF] Fixes rare bus renaming collision Signed-off-by: Chris Lavin <[email protected]> * Work-around for both issues, adds test for rare case Signed-off-by: Chris Lavin <[email protected]> * Minimizes bus suffix usage and resolves incorrect connectivity in MultGenerator Signed-off-by: Chris Lavin <[email protected]> * Fix comment Signed-off-by: Chris Lavin <[email protected]> * Update test/src/com/xilinx/rapidwright/edif/TestEDIFNetlist.java Co-authored-by: eddieh-xlnx <[email protected]> Signed-off-by: Chris Lavin <[email protected]> * Fix typo Signed-off-by: Chris Lavin <[email protected]> --------- Signed-off-by: Chris Lavin <[email protected]> Co-authored-by: eddieh-xlnx <[email protected]>
* [RWRoute] Replace LightweightRouteNode with RouterHelper inner classes Signed-off-by: Eddie Hung <[email protected]> * Fix typo Signed-off-by: Eddie Hung <[email protected]> * More renaming Signed-off-by: Eddie Hung <[email protected]> * Insert sink node into visited set Signed-off-by: Eddie Hung <[email protected]> * Revert RapidWrightDCP Signed-off-by: Eddie Hung <[email protected]> * Fix broken tests Signed-off-by: Eddie Hung <[email protected]> * Try removing RouteNode.equals(Node) too Signed-off-by: Eddie Hung <[email protected]> * Remove unused RouteNode.flags Signed-off-by: Eddie Hung <[email protected]> * Remove unused RouterHelper.isInvertibleDSPBELPin() Signed-off-by: Eddie Hung <[email protected]> * Fix broken assumption with INUSE nodes Signed-off-by: Eddie Hung <[email protected]> * Cleanup, use ArrayDeque not LinkedList Signed-off-by: Eddie Hung <[email protected]> * Fix testRouteStaticNet() to avoid site pins, and fix golden values Signed-off-by: Eddie Hung <[email protected]> * Static router to check INUSE/GND/CC before push, and ... ... check for unused LUT outputs on pop Signed-off-by: Eddie Hung <[email protected]> * Much fewer static GND sources, fewer PIPs Signed-off-by: Eddie Hung <[email protected]> * Fix testRouteStaticNet() to avoid site pins, and fix golden values Signed-off-by: Eddie Hung <[email protected]> * Fix value Signed-off-by: Eddie Hung <[email protected]> * Remove equals() overrides Signed-off-by: Eddie Hung <[email protected]> * GlobalSignalRouting to not use NodeWithPrev Signed-off-by: Eddie Hung <[email protected]> * Remove use of RouterHelper.NodeWithDelay Signed-off-by: Eddie Hung <[email protected]> * Revert "Remove equals() overrides" This reverts commit 3809009. Signed-off-by: Eddie Hung <[email protected]> * Remove commented code Signed-off-by: Eddie Hung <[email protected]> * Handle case where sink node is already used Signed-off-by: Eddie Hung <[email protected]> * Revert "Remove commented code" This reverts commit 4af0d8e. Signed-off-by: Eddie Hung <[email protected]> * Uncomment code Signed-off-by: Eddie Hung <[email protected]> * More refactoring/opt Signed-off-by: Eddie Hung <[email protected]> * Further reduction in static sources/PIPs Signed-off-by: Eddie Hung <[email protected]> * Check for routing errors too Signed-off-by: Eddie Hung <[email protected]> * Allow terminating on routed BOUNCE/BYPASS nodes Signed-off-by: Eddie Hung <[email protected]> * Sort sinks to be routed by tile Signed-off-by: Eddie Hung <[email protected]> * Improve re-use further Signed-off-by: Eddie Hung <[email protected]> * Do not place any static sources in the queue Signed-off-by: Eddie Hung <[email protected]> * Clarity Signed-off-by: Eddie Hung <[email protected]> * Add a NodeStatus.PRESERVED, static router to ignore those for now FIXME: Use those nodes as a last resort, if we can see the need Signed-off-by: Eddie Hung <[email protected]> * [PartialRouter] Disable ripup in global/static routing Signed-off-by: Eddie Hung <[email protected]> * Use net.getPins() Signed-off-by: Eddie Hung <[email protected]> * Move static net preserving into RouteNodeGraph Signed-off-by: Eddie Hung <[email protected]> * Add an extra assert Signed-off-by: Eddie Hung <[email protected]> * Revert "Add a NodeStatus.PRESERVED, static router to ignore those for now" This reverts commit 9b49488. Signed-off-by: Eddie Hung <[email protected]> * [EDIF] Fixes rare bus renaming collision (#1065) * [EDIF] Fixes rare bus renaming collision Signed-off-by: Chris Lavin <[email protected]> * Work-around for both issues, adds test for rare case Signed-off-by: Chris Lavin <[email protected]> * Minimizes bus suffix usage and resolves incorrect connectivity in MultGenerator Signed-off-by: Chris Lavin <[email protected]> * Fix comment Signed-off-by: Chris Lavin <[email protected]> * Update test/src/com/xilinx/rapidwright/edif/TestEDIFNetlist.java Co-authored-by: eddieh-xlnx <[email protected]> Signed-off-by: Chris Lavin <[email protected]> * Fix typo Signed-off-by: Chris Lavin <[email protected]> --------- Signed-off-by: Chris Lavin <[email protected]> Co-authored-by: eddieh-xlnx <[email protected]> * [PartialRouter] Disable ripup in global/static routing Signed-off-by: Eddie Hung <[email protected]> * Move static net preserving into RouteNodeGraph Signed-off-by: Eddie Hung <[email protected]> * Update src/com/xilinx/rapidwright/rwroute/RouteNodeGraph.java Signed-off-by: eddieh-xlnx <[email protected]> --------- Signed-off-by: Eddie Hung <[email protected]> Signed-off-by: Chris Lavin <[email protected]> Signed-off-by: eddieh-xlnx <[email protected]> Co-authored-by: Chris Lavin <[email protected]>
commit 9538212 Author: eddieh-xlnx <[email protected]> Date: Fri Sep 20 17:01:46 2024 -0700 [RWRoute] Cleanup static router and RouterHelper (#1059) * [RWRoute] Replace LightweightRouteNode with RouterHelper inner classes Signed-off-by: Eddie Hung <[email protected]> * Fix typo Signed-off-by: Eddie Hung <[email protected]> * More renaming Signed-off-by: Eddie Hung <[email protected]> * Insert sink node into visited set Signed-off-by: Eddie Hung <[email protected]> * Revert RapidWrightDCP Signed-off-by: Eddie Hung <[email protected]> * Fix broken tests Signed-off-by: Eddie Hung <[email protected]> * Try removing RouteNode.equals(Node) too Signed-off-by: Eddie Hung <[email protected]> * Remove unused RouteNode.flags Signed-off-by: Eddie Hung <[email protected]> * Remove unused RouterHelper.isInvertibleDSPBELPin() Signed-off-by: Eddie Hung <[email protected]> * Fix broken assumption with INUSE nodes Signed-off-by: Eddie Hung <[email protected]> * Cleanup, use ArrayDeque not LinkedList Signed-off-by: Eddie Hung <[email protected]> * Fix testRouteStaticNet() to avoid site pins, and fix golden values Signed-off-by: Eddie Hung <[email protected]> * Static router to check INUSE/GND/CC before push, and ... ... check for unused LUT outputs on pop Signed-off-by: Eddie Hung <[email protected]> * Much fewer static GND sources, fewer PIPs Signed-off-by: Eddie Hung <[email protected]> * Fix testRouteStaticNet() to avoid site pins, and fix golden values Signed-off-by: Eddie Hung <[email protected]> * Fix value Signed-off-by: Eddie Hung <[email protected]> * Remove equals() overrides Signed-off-by: Eddie Hung <[email protected]> * GlobalSignalRouting to not use NodeWithPrev Signed-off-by: Eddie Hung <[email protected]> * Remove use of RouterHelper.NodeWithDelay Signed-off-by: Eddie Hung <[email protected]> * Revert "Remove equals() overrides" This reverts commit 3809009. Signed-off-by: Eddie Hung <[email protected]> * Remove commented code Signed-off-by: Eddie Hung <[email protected]> * Handle case where sink node is already used Signed-off-by: Eddie Hung <[email protected]> * Revert "Remove commented code" This reverts commit 4af0d8e. Signed-off-by: Eddie Hung <[email protected]> * Uncomment code Signed-off-by: Eddie Hung <[email protected]> * More refactoring/opt Signed-off-by: Eddie Hung <[email protected]> * Further reduction in static sources/PIPs Signed-off-by: Eddie Hung <[email protected]> * Check for routing errors too Signed-off-by: Eddie Hung <[email protected]> * Allow terminating on routed BOUNCE/BYPASS nodes Signed-off-by: Eddie Hung <[email protected]> * Sort sinks to be routed by tile Signed-off-by: Eddie Hung <[email protected]> * Improve re-use further Signed-off-by: Eddie Hung <[email protected]> * Do not place any static sources in the queue Signed-off-by: Eddie Hung <[email protected]> * Clarity Signed-off-by: Eddie Hung <[email protected]> * Add a NodeStatus.PRESERVED, static router to ignore those for now FIXME: Use those nodes as a last resort, if we can see the need Signed-off-by: Eddie Hung <[email protected]> * [PartialRouter] Disable ripup in global/static routing Signed-off-by: Eddie Hung <[email protected]> * Use net.getPins() Signed-off-by: Eddie Hung <[email protected]> * Move static net preserving into RouteNodeGraph Signed-off-by: Eddie Hung <[email protected]> * Add an extra assert Signed-off-by: Eddie Hung <[email protected]> * Revert "Add a NodeStatus.PRESERVED, static router to ignore those for now" This reverts commit 9b49488. Signed-off-by: Eddie Hung <[email protected]> * [EDIF] Fixes rare bus renaming collision (#1065) * [EDIF] Fixes rare bus renaming collision Signed-off-by: Chris Lavin <[email protected]> * Work-around for both issues, adds test for rare case Signed-off-by: Chris Lavin <[email protected]> * Minimizes bus suffix usage and resolves incorrect connectivity in MultGenerator Signed-off-by: Chris Lavin <[email protected]> * Fix comment Signed-off-by: Chris Lavin <[email protected]> * Update test/src/com/xilinx/rapidwright/edif/TestEDIFNetlist.java Co-authored-by: eddieh-xlnx <[email protected]> Signed-off-by: Chris Lavin <[email protected]> * Fix typo Signed-off-by: Chris Lavin <[email protected]> --------- Signed-off-by: Chris Lavin <[email protected]> Co-authored-by: eddieh-xlnx <[email protected]> * [PartialRouter] Disable ripup in global/static routing Signed-off-by: Eddie Hung <[email protected]> * Move static net preserving into RouteNodeGraph Signed-off-by: Eddie Hung <[email protected]> * Update src/com/xilinx/rapidwright/rwroute/RouteNodeGraph.java Signed-off-by: eddieh-xlnx <[email protected]> --------- Signed-off-by: Eddie Hung <[email protected]> Signed-off-by: Chris Lavin <[email protected]> Signed-off-by: eddieh-xlnx <[email protected]> Co-authored-by: Chris Lavin <[email protected]> commit 04e7c3c Author: eddieh-xlnx <[email protected]> Date: Fri Sep 20 14:48:12 2024 -0700 [PartialRouter] Disable ripup in global/static routing (#1067) * [PartialRouter] Disable ripup in global/static routing Signed-off-by: Eddie Hung <[email protected]> * Move static net preserving into RouteNodeGraph Signed-off-by: Eddie Hung <[email protected]> * Update src/com/xilinx/rapidwright/rwroute/RouteNodeGraph.java Signed-off-by: eddieh-xlnx <[email protected]> --------- Signed-off-by: Eddie Hung <[email protected]> Signed-off-by: eddieh-xlnx <[email protected]> commit ef2a82d Author: Chris Lavin <[email protected]> Date: Fri Sep 20 09:44:54 2024 -0600 [EDIF] Fixes rare bus renaming collision (#1065) * [EDIF] Fixes rare bus renaming collision Signed-off-by: Chris Lavin <[email protected]> * Work-around for both issues, adds test for rare case Signed-off-by: Chris Lavin <[email protected]> * Minimizes bus suffix usage and resolves incorrect connectivity in MultGenerator Signed-off-by: Chris Lavin <[email protected]> * Fix comment Signed-off-by: Chris Lavin <[email protected]> * Update test/src/com/xilinx/rapidwright/edif/TestEDIFNetlist.java Co-authored-by: eddieh-xlnx <[email protected]> Signed-off-by: Chris Lavin <[email protected]> * Fix typo Signed-off-by: Chris Lavin <[email protected]> --------- Signed-off-by: Chris Lavin <[email protected]> Co-authored-by: eddieh-xlnx <[email protected]> commit e298a18 Author: eddieh-xlnx <[email protected]> Date: Thu Sep 19 19:20:58 2024 -0700 [RWRoute] Always clear prev pointer of unpreserved RouteNode-s (#1056) * Use upload-artifact v4 for checks Signed-off-by: Wenhao Lin <[email protected]> * Make each uploaded artifact have a unique name Signed-off-by: Eddie Hung <[email protected]> * Try again Signed-off-by: Eddie Hung <[email protected]> * [RWRoute] Always clear prev pointer of unpreserved RouteNode-s Signed-off-by: Eddie Hung <[email protected]> * Tidy Signed-off-by: Eddie Hung <[email protected]> * Apply suggestions from code review Signed-off-by: eddieh-xlnx <[email protected]> * Update src/com/xilinx/rapidwright/rwroute/PartialRouter.java Signed-off-by: eddieh-xlnx <[email protected]> --------- Signed-off-by: Wenhao Lin <[email protected]> Signed-off-by: Eddie Hung <[email protected]> Signed-off-by: eddieh-xlnx <[email protected]> Co-authored-by: Wenhao Lin <[email protected]>
commit 9538212 Author: eddieh-xlnx <[email protected]> Date: Fri Sep 20 17:01:46 2024 -0700 [RWRoute] Cleanup static router and RouterHelper (#1059) * [RWRoute] Replace LightweightRouteNode with RouterHelper inner classes Signed-off-by: Eddie Hung <[email protected]> * Fix typo Signed-off-by: Eddie Hung <[email protected]> * More renaming Signed-off-by: Eddie Hung <[email protected]> * Insert sink node into visited set Signed-off-by: Eddie Hung <[email protected]> * Revert RapidWrightDCP Signed-off-by: Eddie Hung <[email protected]> * Fix broken tests Signed-off-by: Eddie Hung <[email protected]> * Try removing RouteNode.equals(Node) too Signed-off-by: Eddie Hung <[email protected]> * Remove unused RouteNode.flags Signed-off-by: Eddie Hung <[email protected]> * Remove unused RouterHelper.isInvertibleDSPBELPin() Signed-off-by: Eddie Hung <[email protected]> * Fix broken assumption with INUSE nodes Signed-off-by: Eddie Hung <[email protected]> * Cleanup, use ArrayDeque not LinkedList Signed-off-by: Eddie Hung <[email protected]> * Fix testRouteStaticNet() to avoid site pins, and fix golden values Signed-off-by: Eddie Hung <[email protected]> * Static router to check INUSE/GND/CC before push, and ... ... check for unused LUT outputs on pop Signed-off-by: Eddie Hung <[email protected]> * Much fewer static GND sources, fewer PIPs Signed-off-by: Eddie Hung <[email protected]> * Fix testRouteStaticNet() to avoid site pins, and fix golden values Signed-off-by: Eddie Hung <[email protected]> * Fix value Signed-off-by: Eddie Hung <[email protected]> * Remove equals() overrides Signed-off-by: Eddie Hung <[email protected]> * GlobalSignalRouting to not use NodeWithPrev Signed-off-by: Eddie Hung <[email protected]> * Remove use of RouterHelper.NodeWithDelay Signed-off-by: Eddie Hung <[email protected]> * Revert "Remove equals() overrides" This reverts commit 3809009. Signed-off-by: Eddie Hung <[email protected]> * Remove commented code Signed-off-by: Eddie Hung <[email protected]> * Handle case where sink node is already used Signed-off-by: Eddie Hung <[email protected]> * Revert "Remove commented code" This reverts commit 4af0d8e. Signed-off-by: Eddie Hung <[email protected]> * Uncomment code Signed-off-by: Eddie Hung <[email protected]> * More refactoring/opt Signed-off-by: Eddie Hung <[email protected]> * Further reduction in static sources/PIPs Signed-off-by: Eddie Hung <[email protected]> * Check for routing errors too Signed-off-by: Eddie Hung <[email protected]> * Allow terminating on routed BOUNCE/BYPASS nodes Signed-off-by: Eddie Hung <[email protected]> * Sort sinks to be routed by tile Signed-off-by: Eddie Hung <[email protected]> * Improve re-use further Signed-off-by: Eddie Hung <[email protected]> * Do not place any static sources in the queue Signed-off-by: Eddie Hung <[email protected]> * Clarity Signed-off-by: Eddie Hung <[email protected]> * Add a NodeStatus.PRESERVED, static router to ignore those for now FIXME: Use those nodes as a last resort, if we can see the need Signed-off-by: Eddie Hung <[email protected]> * [PartialRouter] Disable ripup in global/static routing Signed-off-by: Eddie Hung <[email protected]> * Use net.getPins() Signed-off-by: Eddie Hung <[email protected]> * Move static net preserving into RouteNodeGraph Signed-off-by: Eddie Hung <[email protected]> * Add an extra assert Signed-off-by: Eddie Hung <[email protected]> * Revert "Add a NodeStatus.PRESERVED, static router to ignore those for now" This reverts commit 9b49488. Signed-off-by: Eddie Hung <[email protected]> * [EDIF] Fixes rare bus renaming collision (#1065) * [EDIF] Fixes rare bus renaming collision Signed-off-by: Chris Lavin <[email protected]> * Work-around for both issues, adds test for rare case Signed-off-by: Chris Lavin <[email protected]> * Minimizes bus suffix usage and resolves incorrect connectivity in MultGenerator Signed-off-by: Chris Lavin <[email protected]> * Fix comment Signed-off-by: Chris Lavin <[email protected]> * Update test/src/com/xilinx/rapidwright/edif/TestEDIFNetlist.java Co-authored-by: eddieh-xlnx <[email protected]> Signed-off-by: Chris Lavin <[email protected]> * Fix typo Signed-off-by: Chris Lavin <[email protected]> --------- Signed-off-by: Chris Lavin <[email protected]> Co-authored-by: eddieh-xlnx <[email protected]> * [PartialRouter] Disable ripup in global/static routing Signed-off-by: Eddie Hung <[email protected]> * Move static net preserving into RouteNodeGraph Signed-off-by: Eddie Hung <[email protected]> * Update src/com/xilinx/rapidwright/rwroute/RouteNodeGraph.java Signed-off-by: eddieh-xlnx <[email protected]> --------- Signed-off-by: Eddie Hung <[email protected]> Signed-off-by: Chris Lavin <[email protected]> Signed-off-by: eddieh-xlnx <[email protected]> Co-authored-by: Chris Lavin <[email protected]> commit 04e7c3c Author: eddieh-xlnx <[email protected]> Date: Fri Sep 20 14:48:12 2024 -0700 [PartialRouter] Disable ripup in global/static routing (#1067) * [PartialRouter] Disable ripup in global/static routing Signed-off-by: Eddie Hung <[email protected]> * Move static net preserving into RouteNodeGraph Signed-off-by: Eddie Hung <[email protected]> * Update src/com/xilinx/rapidwright/rwroute/RouteNodeGraph.java Signed-off-by: eddieh-xlnx <[email protected]> --------- Signed-off-by: Eddie Hung <[email protected]> Signed-off-by: eddieh-xlnx <[email protected]> commit ef2a82d Author: Chris Lavin <[email protected]> Date: Fri Sep 20 09:44:54 2024 -0600 [EDIF] Fixes rare bus renaming collision (#1065) * [EDIF] Fixes rare bus renaming collision Signed-off-by: Chris Lavin <[email protected]> * Work-around for both issues, adds test for rare case Signed-off-by: Chris Lavin <[email protected]> * Minimizes bus suffix usage and resolves incorrect connectivity in MultGenerator Signed-off-by: Chris Lavin <[email protected]> * Fix comment Signed-off-by: Chris Lavin <[email protected]> * Update test/src/com/xilinx/rapidwright/edif/TestEDIFNetlist.java Co-authored-by: eddieh-xlnx <[email protected]> Signed-off-by: Chris Lavin <[email protected]> * Fix typo Signed-off-by: Chris Lavin <[email protected]> --------- Signed-off-by: Chris Lavin <[email protected]> Co-authored-by: eddieh-xlnx <[email protected]> commit e298a18 Author: eddieh-xlnx <[email protected]> Date: Thu Sep 19 19:20:58 2024 -0700 [RWRoute] Always clear prev pointer of unpreserved RouteNode-s (#1056) * Use upload-artifact v4 for checks Signed-off-by: Wenhao Lin <[email protected]> * Make each uploaded artifact have a unique name Signed-off-by: Eddie Hung <[email protected]> * Try again Signed-off-by: Eddie Hung <[email protected]> * [RWRoute] Always clear prev pointer of unpreserved RouteNode-s Signed-off-by: Eddie Hung <[email protected]> * Tidy Signed-off-by: Eddie Hung <[email protected]> * Apply suggestions from code review Signed-off-by: eddieh-xlnx <[email protected]> * Update src/com/xilinx/rapidwright/rwroute/PartialRouter.java Signed-off-by: eddieh-xlnx <[email protected]> --------- Signed-off-by: Wenhao Lin <[email protected]> Signed-off-by: Eddie Hung <[email protected]> Signed-off-by: eddieh-xlnx <[email protected]> Co-authored-by: Wenhao Lin <[email protected]> Signed-off-by: Eddie Hung <[email protected]>
There are two competing issues relevant to this fix.
EDIFCell
can have twoEDIFPort
objects, a single bit port and a bussed port with the same name, for examplemy_signal
andmy_signal[1:0]
. We resolve this naming collision by storing the bussed version with a[
suffix,my_signal[
.EDIFPort
objects belonging to the sameEDIFCell
such that when one bussed name is EDIF legalized, it collides with another validEDIFPort
name. For example,phy_ctrl[1:0]
andphy_ctrl_[13:0]
. Due to the possible naming collision issues from issue 1, all bussed ports are given a[
suffix to the name and thus the legal names of busses are all extended by one character,phy_ctrl
(original) ->phy_ctrl[
(stored) ->phy_ctrl_
(legalized EDIF name). This leads to ambiguity for the other bused port on the cell and leads to reading problems of the netlist (see test added in the PR to illustrate).This PR attempts to resolve both of these issue by removing the trailing
[
before legalization and also checking to see if there is indeed a colliding single-bit port name that collides with the bussed port name, if there is, it is given an additional suffix during EDIF naming legalization and stored in a separate map, otherwise, the renaming proceeds as normal. This has a small impact to runtime (~5% EDIF write time). This does not impact EDIF read.This also fixes a connectivity issue when generating multipliers (
MultGenerator
) where it was blindly connecting all signals as busses. This now detects if it is a bus or single bit port and connects accordingly.