Random findings and tweaks from testing

While I am nearing completion of a CPU test suite, there are some findings I would like to share here, as they changed some of my previous assumptions. Besides, they are important aspects for future programming, so I need to remember these. Carry/borrow flag. First thing is how the ‘181 ALU handles the carry flag ...

Assembler

No more hand assembling. I created a simple assembler using flex and bison. It is another piece of software I wrote from scratch for the sake of building the computer. The hobby hardware project so far has been only around software. It’s been several months now since I started all this, and I’ve been coding, ...

Multiphase clock

Multiphase clock
I have found an interesting bug in my design that opened my eyes to one important aspect. The problem is related to the memory chips’ /WE (write enable) signal which should be asserted when I want to store data in memory. With nearly every TTL device in my design being synchronous, altering their states on ...

Gate-level simulator

Gate-level simulator
The simulator is ready and running first simulations of my CPU, proving for the first time that the envisioned mesh of wires and chips may actually work. Writing the simulator was not easy, but I think it was a great exercise. Not using Verilog for this purpose was not a bad idea at all. The ...

Microcode pre-release

I decided to stop at this point and declare the initial version of the microcode complete (although the machine has not been simulated yet and the microcode is still untested). I have not yet completed faults and interrupts microcode, because I don’t know how I am going to do user/supervisor mode context switching and which ...

Bitwise shifts – here comes the shifter

Bitwise shifts – here comes the shifter
I have added yet another component to the high level design. It is a shifter and its role is to… shift. More specifically, it is a right shifter which will allow me to perform bitwise right shift in just one clock cycle. Until now, the design was lacking this ability. Doing left shifts is fairly ...