Closed dkilfoyle closed 4 months ago
Some further investigation suggests the issue arises because sel[0]=nx
is indistinguishable from sel=nx
and the connection is therefore not wrapped in an InSubBus. A not very elegant possible solution is to add a subbed0 boolean to PinSide which is true when PinParts.start = 0 rather than undefined. Chip.wireInPin can then detect this with:
// Wrap the partPin in an InBus when the part side is dimensioned
if (to.start > 0 || to.width !== chipPin.width || to.subbed0) {
partPin = new InSubBus(partPin, to.start, to.width);
}
Sorry, I don't know enough about the build system to know how to test this or submit as a PR.
Program
Hardware Simulator
Interface
Website (https://nand2tetris.github.io/web-ide)
Contact Details
No response
What happened?
Hi. The following snippet produces errors purely dependent on the order in which inputs are set in a test statement.
This anomaly does not occur in the Java version.
Additional Comments
No response
Do you want to try to fix this bug?
Code of Conduct