Wednesday, March 09, 2005

The [almost-]complete ALU

I've just posted imagemaps of the latest revision of my ALU. It understands 5 opcodes [ADD, SUB, AND, OR, XOR] and produces both unsigned [C] and signed [V] overflow signals. What it currently lacks is the ability to make use of a carry in. Without that, you can't do 16-bit ADDs or SUBs efficiently. I'll get there, but I wanted to put this up to show some progress.

I've also got two different versions of the shifter [nearly] done. I'll probably put one of them up next. The reason that I'm not fully satisfied with either of them is, again, the carry stuff. Do they need to take a carry in? It's really useful if you want to do a 16-bit-wide, one-bit shift. However, since my shifters are capable of doing 0-7-bit shifts, what does a carry [in or out] mean? I figure I'll want to set the carry out flag by the first bit that comes out, no matter how far you shift [as long as that's at least one bit]. But what about the carry in, when you shift by more than one bit?

There's another problem there, though--I've already written the instruction set, and I don't have a bit left for "does the shift take a carry in". Oops...any thoughts on how important that is?

Of course, that question would be easier to answer if you knew the rest of the instruction set. I'll post it soon. It's not set in stone, but it is guiding my design of the computer, and I'd love to get feedback on it.

0 Comments:

Post a Comment

Links to this post:

Create a Link

<< Home