Comments (3)
@fpw The reason why this happens is that Antares doesn't store the port names when connecting wires to subcircuit pins. This is because it would break when renaming pins. Instead, it uses the internal index of the port, such as 1, 2, 3 and so forth.
Now, until a couple of releases ago, this principle worked fine even when adding additional ports to a subcircuit. Because the user had to manually add these ports to the symbol, the additional ports received higher port numbers, and the existing one were untouched.
This changed when we introduced the "Generate Symbol" feature. A symbol is automatically laid-out again whenever a port is added or removed. The algorithm first removes all ports, then adds all inputs to the left side and all outputs to the right side of the symbol, leading to new port IDs. This is why in your example, the LED, which was previously connected with former port 2 (the O1 output), is now connected to I2, because that is now the port 2 (because it is the second port after the relayout.
I have to think about how to change the layout algorithms to make the port assignments more robust with these use cases.
from antares.
Thanks for the explanation of the internals! Not sure if it helps, but my first idea would be this:
- modify the "Generate Symbol" algorithm to optionally get a mapping from name to id as input
- when a port is added to a "Generate Symbol" circuit, retrieve the name-to-id mapping of the current symbol
- delete all ports (like now)
- call the "Generate Symbol" algorithm with the mapping retrieved in step 2
- now the algorithm can assign old IDs to old names and use new IDs for ports that aren't in the old mapping (i.e. the new ports that were just added)
- create only those ports that appear in the new assignment, using the former port IDs from the table
from antares.
@fpw Yes that helps, I'll do it along these lines.
from antares.
Related Issues (20)
- Width of "Hierarchy" sidebar cannot be reduced
- DSL scripts produce unexpected error when comparing undefined values
- False positive test results with undefined signals
- False positive test result with ports of type "inout"
- Error while creating junction from small wire
- Pan animation towards copy/pasted components
- Errors occurring during "Save" can lead to corrupt files
- Components draw propDelay expression instead of value during single-step simulation
- Wire tooltip "Press ALT to create junction" displayed on read-only circuits
- Capacitor component (analog)
- Monostable multivibrator (Monoflop) using capacitor
- New DSL scripting function "triggerAfter()"
- Error in DSL exec script when using integer numbers in analog circuit
- Analog "Current flow animation" speed independent of system speed
- Error when opening analog circuit containing a circuit parameter
- Cannot start Antares with German locale
- Display time/value in oscilloscope when hovering with mouse over curve
- Issue while using 8-bit architecture modules HOT 5
- Subcircuit opened during simulation has wrong simulation state
- Open project in Antares Web
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from antares.