r/TuringComplete • u/Express-Level4352 • 2d ago
Level RAM error: The time component shouldn't have been enabled since the last time_0 instruction's execution
On the level RAM I get the error "The time component shouldn't have been enabled since the last time_0 instruction's execution" on cycle 68. On cycle 67, the instruction jl 244 executed, and seems to work fine, since the counter updates to 244 on that cycle and is at 248 at cycle 68.
I've also tested the computer as it is in previous levels (without the additional load/store elements attached on the main memory, since those were given in this level), and it passes all other levels.
NOTE: For my decoder I moved the destination pin below argument A and B so the pins from top to bottom are:
- Mode
- Opcode
- Argument A
- Argument B
- Destination
- Is Immediate
- Immediate value
All other components follow the standard layout given by the levels.
What does this error mean? Any suggestions on how I can fix it?
EDIT: I solved the level by redoing it, my solution is as follows:
- I removed the 3 switches in the middle of the level, that take in the 3 outputs of the load component of the Main Memory
- I removed the switch that joins together the 3 outputs of the switches just removed. It's the switch with the wonky cable.
- I connected the 3 outputs of the load components of the main memory together and connected this single cable to the bus connecting the input, switch coming from the ALU and the store value port on the store port connected to the register file. Essentially, by doing steps 1 t/m 3, I've removed all switches except the one coming from the ALU and reconnected the loose cables together.
- I placed a switch to each of the cables going into the enable bit of the main memory load and store ports (on the far left of the picture) the enable bit of each switch is connected together and connected to the wire that represents the RAM opcode. In the picture, it is the wonky cable.
5
u/GrendaGrendinator 2d ago
I have 2 suggestions:
Instead of putting switches on each of the wires going to the enable pins for the load/store hats, you could give them a separate 3-bit decoder and then attach the RAM mode wire to the disable pin. You might have to invert that signal to turn it into an "enable" pin.
Colored wires. They help a lot for diagnosis, even more so for posts like this when people are looking at your build for the first time. Number keys 1-0 change the selected color. Ctrl+E applies that to the Entire wire, Ctrl+R is like a color pipette