Saturday, July 09, 2005

The Shifter

OK, here's the latest version of the shifter. I've altered its carry-out behavior such that Cout holds the value of the last ball shifted off the end. This way it can be used for single-bit tests. It's going to be much faster than an ALU operation, so that might come in handy.

This shifter is basically set-up-and-flow-through. Once you've input the shift amount, shift direction, and whether the shift is arithmetic or logical, the input balls just go straight to the appropriate outputs. Balls shifted off the end get rotated all the way around, set to zero or one as appropriate to any needed sign extension, and inserted back into the byte. The only awkwardness is in the need for one extra ball input after the first bit [the MSB] of the operand; I use that to set up the sign-extension logic.

I've also made some modifications to the ALU, but haven't yet posted the new version. They're not very big mods: I've added zero-detection [which may eventually get pulled out] and changed the interface a bit. Now instead of having to pour balls into a port until being told to move on to the next phase of operation [several times], you just put one ball into each port until the last one, which always takes 11 for result readout [8 data bits, V, Z, and C].

Now I really do just have to put it all together. Yow!

0 Comments:

Post a Comment

<< Home