With the usual slow but steady speed finally the main module wiring has been completed!
And all functionalities tested worked as expected! There were just a few wiring errors but all of them cought during build time (one wire during the initial two bits test of the ALU, while all the others during immediate recheck of the step work done).
Below the result:
This is the main unit, missing "just" the random access memory module and the punched tape reader to be a complete system.
This unit contains: 2 registries, a complete 8 bits ALU with carry bit in and out (able to perform all 16 logic operations, additions, and shifts in both directions), all the bus access interfaces required and the "halt" and "jump" management circuits to control the code flow.
Below some details regarding the implemented halt and branching management circuits (the one for ALU and Q register were detailed also here https://hackaday.io/project/167879-optimized-alus-for-relay-based-computers/log/186329-super-micro-relay-computer-cabling).
BRANCH MANAGEMENT CIRCUIT
The branch execution circuit is activated when one of the signal of jump "go through" the correspondent condition and activates the jump relay.
Before the jump, Q should be set with the negative value of the numbers of labels to skip, and the circuit stops when Q is zero.
During the jump execution the current is removed from "normal" tape signals and given to a section of tape dedicated to jump instruction where at each label there is:
1. load R with Q+1
2. load Q from R
When Q will become 0 the signal will automatically go back to the standard instructions side of the tape and instructions signals might also be written "longer" in order to be able to execute at faster tape rotor speed.
1. jump side signals and standard signals cannot be put on the same "line" since even if not active they might interfere in terms of connections.
2. since the number of labels to skip is parametric call/return can be easily implemented (one memory location can be used for the return address) and also indirect jumps are supported by design
3. backward jumps can be transformed into forward jumps if the paper tape is connected in a loop (buth the only forward mechanics should be much easier)
4. to implement a real backward jump another relay should be required to invert the engine poles and to select a second side track that will do Q-1 instead of Q+1 (and with instructions in reverse order since the tape will move backward); this additional switch can be controlled by the higher bit of Q so effectively allowing a -127 to +127 range (instead of the current 1 to 255 labels)
The halt circuitry is optional but very useful since apart at the end of the program can be used for example to input multiple values (or parts of a single larger input) with a cycle:
1. halt (to allow input switches reconfiguration)
2. move switches value to proper memory location
3. go to 1 for the number of times required
The configuration avoids that a single keypress skips more than a single halt since the press will advance tape until the halt signal on the tape will stop and to continue the button have to be released.