The attempt to learn from and improve upon my first homebuilt CPU resulted in this new design. [Original: hackaday.io/project/2630-samira] This CPU will be slightly faster, more powerful, extensible and will be able to address a larger main memory than it's predecessor! I will be using wire-wrap technique to make electrical connections on each board and connect boards with stackable pin-headers. Read the logs below to learn about the progress :)
Alright, so what did I learn from the first version of S.A.M.I.R.A. and why do I build a second one?
1) The ALU was alright, the MK-II will introduce a marginally more powerful ALU, which will not only be able to add and subtract, but also be able to perform logic operations and a left-shift operation which is otherwise hard to implement in software.
2) The sequencer will be slightly faster and more efficient.
3) The decoder will no longer be hardwired but implemented in a ROM lookup table.
4) I need a cleaner clock source and reset logic.
5) Branch logic will be improved. Branching conditions will be: Zero, Carry, NoZero, NoCarry
6) I need more memory. Version 1 is limited to 256 bytes (!) of main memory, this is due to the address bus being of the same bitwidth as the data bus, which simplified the design a lot. But if I ever want to run a more serious program, 256 bytes won't get me anywhere. The MK-II will implement a 12-bit address-bus, giving me 4kB of main memory which should be quite enough, considering that I'll be compiling the assembler code by hand ;)
6) The hardware design needs some fixing but I'll build it on perfboard again. Testing the design on breadboard might no longer be necessary because I gathered sufficient experience with digital logic and the design already works in my emulator (written in plain C). Soldering all connections did not work very well. Neither the 'traditional' way (wires go down through the holes of the breadboard and are soldered to the IC on the bottom side of the board) nor my pseudo-wire-wrap-technique (thin wires directly soldered onto the pins of the ICs on the bottom side of the board) So what I plan to do now: ICs on top, pin headers parallel to them, soldered together on the bottom, but wire-wrapped on the top. This will be easy, fast and cleaner. Pin headers are not perfect for wire-wrapping but real ones are hard to get by and pin headers work fine. The whole system will be split across multiple boards, which will be connected through one 'system bus', a stackable pin header. Extensions and peripherials can simply be added by stacking them onto the system.