Sunday, March 27, 2005

The biggest ROM ever built.

Well, it will be, anyway, if I do manage to build it. This ROM is 256 words of 16 bits each: 0.5KB. It will probably also comprise more than a ton of building materials. It uses about 9180 gates and nearly 14000 connections. Of course, you could remove 4096 gates and 8192 connections if you don't mind programming it by moving connections around, instead of just flipping gates. If you rarely reprogram it, that might be a big win; it'd be just like the old electronic computers which were programmed by plugging wires into switchboards.

This diagram is scaled way down from the others, and is the first that I've chosen to post with full-depth drawing turned on [so that you can see inside each of the smaller 16x16 ROM cells].

Incidentally, speaking of scaling: I realized the other day that I've been posting mostly full-scale images. The code that dumps out screen shots was supposed to have been putting out images scaled down to 60% of regular size, but it turned out that it was only scaling down the top-level diagram, and that all of the other images linked from there are full-scale. I may go back and fix that up [now that I've fixed my code], but it's a bit of a pain to get it all set up, so that may take a while. While the tool dumps out images and image maps for me, it's still a bit of manual scutwork to get it all into blogger + photobucket.

[Image] ROM cell 256x16

Click on the yellow boxes to see inside them.

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.

[Image] ALU test

Click on the yellow boxes to see inside them.

[Image] ALU

Click on the yellow boxes to see inside them.

[Image] 8-bit adder

Click on the yellow boxes to see inside them.

[Image] 1 to 16

Click on the yellow boxes to see inside them.