Sunday, October 23, 2005

First light!

Two weeks ago, on the evening of Friday, October seventh, the Ball Computer executed its first full instruction [an "addi"]. Whee! That includes reading the program counter, fetching the instruction from ROM, reading a value from a register, adding a constant to it, dealing with the CCR, doing the register writeback, incrementing the PC, and getting ready to run the next instruction.

I was quite pleased to find that it only took a few hours of debugging to get it working, and that the errors were pretty minor: one place where I'd swapped bit 12 and 14 of the opcode, and a number of connections that I'd just forgotten to hook up [all but one of them just the ball return for junk outputs].

I'm now taking a break from debugging ALU ops in order to improve visibility into values within bcd. This should make it much faster and easier to debug the rest of the opcodes.

Incidentally, the instruction took a whopping 1600 gate delays [and therefore 1600 wire delays] to execute. If each of those delays is on the order of 0.5 seconds in real hardware, we're talking about 25 minutes per instruction! However, I'm pretty sure I can improve on that by a factor of 10 with fast gates and the parallelization of processing that I've got planned for version 2.0 of the CPU.


Post a Comment

Links to this post:

Create a Link

<< Home