Conversation
There was a problem hiding this comment.
Pull request overview
This PR updates the net naming tie-break logic in the netlist generator to use traversal-based path ordering, then regenerates example KiCad netlists to reflect the new deterministic naming.
Changes:
- Add a final net-name “goodness” criterion based on
path_traverse_order/path_orderingto break remaining naming ties deterministically. - Regenerate example
.netoutputs to match the new naming and ordering.
Reviewed changes
Copilot reviewed 51 out of 51 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
edg/electronics_model/NetlistGenerator.py |
Adds traversal-order tie-breaker to deterministic net naming and updates call site. |
examples/UsbUart/UsbUart.net |
Regenerated netlist with updated net naming. |
examples/UsbKey/UsbKey.net |
Regenerated netlist with updated net naming / ordering. |
examples/UsbFpgaProgrammer/UsbFpgaProgrammer.net |
Regenerated netlist with updated net naming / ordering. |
examples/TofArray/TofArray.net |
Regenerated netlist with updated net naming / ordering. |
examples/TestLed/TestLed.net |
Regenerated netlist with updated net naming. |
examples/TestBlinkyWithSchematicImport/TestBlinkyWithSchematicImport.net |
Regenerated netlist with updated net naming / ordering. |
examples/TestBlinkyWithModeledSchematicImport/TestBlinkyWithModeledSchematicImport.net |
Regenerated netlist with updated net naming / ordering. |
examples/TestBlinkyWithLibraryExport/TestBlinkyWithLibraryExport.net |
Regenerated netlist with updated net naming / ordering. |
examples/TestBlinkyWithLibrary/TestBlinkyWithLibrary.net |
Regenerated netlist with updated net naming / ordering. |
examples/TestBlinkyPacked/TestBlinkyPacked.net |
Regenerated netlist with updated net naming / ordering. |
examples/TestBlinkyMicro/TestBlinkyMicro.net |
Regenerated netlist with updated net naming / ordering. |
examples/TestBlinkyImplicit/TestBlinkyImplicit.net |
Regenerated netlist with updated net naming / ordering. |
examples/TestBlinkyExpanded/TestBlinkyExpanded.net |
Regenerated netlist with updated net naming / ordering. |
examples/TestBlinkyComplete/TestBlinkyComplete.net |
Regenerated netlist with updated net naming / ordering. |
examples/TestBlinkyChain/TestBlinkyChain.net |
Regenerated netlist with updated net naming / ordering. |
examples/TestBlinkyBasicBattery/TestBlinkyBasicBattery.net |
Regenerated netlist with updated net naming / ordering. |
examples/TestBlinkyBasic/TestBlinkyBasic.net |
Regenerated netlist with updated net naming. |
examples/TestBlinkyArray/TestBlinkyArray.net |
Regenerated netlist with updated net naming / ordering. |
examples/SwdDebugger/SwdDebugger.net |
Regenerated netlist with updated net naming / ordering. |
examples/Simon/Simon.net |
Regenerated netlist with updated net naming / ordering. |
examples/SevenSegment/SevenSegment.net |
Regenerated netlist with updated net naming / ordering. |
examples/RobotOwl/RobotOwl.net |
Regenerated netlist with updated net naming / ordering. |
examples/RobotDriver/RobotDriver.net |
Regenerated netlist with updated net naming / ordering. |
examples/RobotCrawler/RobotCrawler.net |
Regenerated netlist with updated net naming / ordering. |
examples/ProtectedCharger/ProtectedCharger.net |
Regenerated netlist with updated net naming / ordering. |
examples/PicoProbe/PicoProbe.net |
Regenerated netlist with updated net naming / ordering. |
examples/PcbBot/PcbBot.net |
Regenerated netlist with updated net naming / ordering. |
examples/Multimeter/Multimeter.net |
Regenerated netlist with updated net naming / ordering. |
examples/LedMatrix/LedMatrix.net |
Regenerated netlist with updated net naming. |
examples/Keyboard/Keyboard.net |
Regenerated netlist with updated net naming. |
examples/JacdacKeyswitch/JacdacKeyswitch.net |
Regenerated netlist with updated net naming / ordering. |
examples/IotThermalCamera/IotThermalCamera.net |
Regenerated netlist with updated net naming / ordering. |
examples/IotRollerBlinds/IotRollerBlinds.net |
Regenerated netlist with updated net naming / ordering. |
examples/IotLedDriver/IotLedDriver.net |
Regenerated netlist with updated net naming / ordering. |
examples/IotKnob/IotKnob.net |
Regenerated netlist with updated net naming / ordering. |
examples/IotIron/IotIron.net |
Regenerated netlist with updated net naming / ordering. |
examples/IotFan/IotFan.net |
Regenerated netlist with updated net naming / ordering. |
examples/IotDisplay/IotDisplay.net |
Regenerated netlist with updated net naming / ordering. |
examples/IotCurtainCrawler/IotCurtainCrawler.net |
Regenerated netlist with updated net naming / ordering. |
examples/HighSwitch/HighSwitch.net |
Regenerated netlist with updated net naming / ordering. |
examples/Fcml/Fcml.net |
Regenerated netlist with updated net naming / ordering. |
examples/EspProgrammer/EspProgrammer.net |
Regenerated netlist with updated net naming. |
examples/EspLora/EspLora.net |
Regenerated netlist with updated net naming / ordering. |
examples/DeskController/DeskController.net |
Regenerated netlist with updated net naming / ordering. |
examples/Datalogger/Datalogger.net |
Regenerated netlist with updated net naming / ordering. |
examples/CanAdapter/CanAdapter.net |
Regenerated netlist with updated net naming / ordering. |
examples/BleJoystick/BleJoystick.net |
Regenerated netlist with updated net naming / ordering. |
examples/BldcController/BldcController.net |
Regenerated netlist with updated net naming / ordering. |
examples/BasicKeyboard/BasicKeyboard.net |
Regenerated netlist with updated net naming. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
271
to
+275
| lambda pin: len(pin.links), # prefer longer link paths | ||
| lambda pin: -len(pin.ports), # prefer shorter (or no) port lengths | ||
| lambda pin: not (pin.ports and pin.ports[-1].isnumeric()), # disprefer number-only ports | ||
| lambda pin: -path_ordering.get( | ||
| pin.port_component(must_have_port=False), len(path_ordering) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds a final net naming good-ness criteria based on path ordering, so there should be no more ties.
Updates netlists.