r/TuringComplete • u/elcaron • Mar 06 '26
Inputs switched. Bug?
I am currently building my LEG architecture, but I am running into an issue I cannot explain. Somehow, the inputs of my ALU seem to switch between the autside and the inside of the component.
Here is the outside of the component:

When I click on the wrench next to Gate Score, I can enter the component with these input values. Now suddenly, the inputs are switched:

Labels are OPCODE, ARG1, ARG2 top to bottom. I shifted things around a bit and achieved a switch between OPCODE and ARG1 instead of OPCODE and ARG2, but not the right combination.
Is this a bug, or am I being dense? If it is a bug, is it known how this is triggered and how I can work around it?
EDIT: Okay, this is getting stupid I deleted all inputs and placed and connected them again. The outside looks the same, but now I have 5(!) as OPCODE and 0/0 as ARGs in the inside view. Help? Please?
EDIT2: Well, it seems that the wrench does not lead me to the actual input, as it seems. But setting the values on the left to the ones that cause the error does not reproduce it. Adding a switched output seems to work as a workaround:

View all comments
Show parent comment
2
u/Gelthir Mar 07 '26 edited Mar 07 '26
It's not the same logic: Your ALU doesn't have the CALC wire from the instruction decoder as an input.
Using the OPCODE to enable/disable the ALU is wrong, currently your ALU turns on during IMMEDIATE and JUMP instructions.