Thursday, May 07, 2009

Multiply, Mac

OK, a bit of debugging and test-code writing later, I now have functional MUL, SMUL, MAC, and SMAC instructions:


MUL 1111 1 dest srcB 0 0 srcA
SMUL 1111 1 dest srcB 1 0 srcA
MAC 1111 1 dest srcB 0 1 srcA
SMAC 1111 1 dest srcB 1 1 srcA

They all write their result's low byte back to the destination register at completion. This does take time, so it might not be a good idea for MAC/SMAC, but it was simplest to do them all the same way, and this is all going to have to be redone when I parallelize the cpu anyway.

There's currently no way to get at the top byte of the accumulator; that's going to be accessible through IO space, the one part of the machine as yet unimplemented. Most of the machinery for it is already there, though; it's sharing most of the memory access logic, state machines, and instruction decode apparatus.

Step 3 is dangerously close to complete.

0 Comments:

Post a Comment

Links to this post:

Create a Link

<< Home