Wednesday, March 20, 2013

Design goals (or, hold the electric pony)

In which our protagonist's dreams of an 8-bit supercomputer are cut down to size and he figures out how to make sane design choices.

When you start thinking about your own computer, you dream big. It just has to have that VGA output, a keyboard, an interface to SD-cards, a TCP/IP-stack, an Ethernet connection, and of course its own, a self-built Memory Management Unit (MMU) for all that virtual memory. And a pony. An electric pony, of course.

After studying other people's projects for a while, it not only starts to dawn on you that any computer like that is going to be an incredible amount of work. You also notice everybody keeps recommending one thing over and over again: Dude, start simple.

Which makes you go to the other extreme: Wanting to build the most basic computer possible. Just the CPU, one RAM chip, one EEPROM chip as ROM, a clock can, and some simple I/O such as the 65c51 ACIA to provide one single serial port as terminal access. No interrupts. Not even a power LED! And no electric horseshoes, let alone an electric pony. You can always build a second computer immediately afterwards, right?

Which takes you back to the part about all the work -- maybe too much work to do twice. So for a while you bounce back and forth between the extremes.

In a situation like this, bouts of insomnia are amazingly useful. You stare at the dark ceiling, listen to some song on your iPod -- say, "Suspended in Gaffa" by Kate Bush -- and figure out your real goals for the project. It's well and good to talk about "a childhood dream" and "bragging rights", but we need something more concrete than "make sure it actually works" to provide us with design parameters.

This is what I came up with.

  • Find out what parts of the project I enjoy. This is to explore what elements -- if any -- could develop into a long-term hobby. Programming in assembler is fun, of course. But what about digital electronics? The circuit design? The actual soldering? If I only enjoy some of this, there probably won't be a second computer. If it's mainly the circuit design, for instance, I might get serious about that homebrew CPU, but in VDHL on a FPGA. Cliché time: This computer is about the path, not the destination.
  • Test and experiment with basic features. Include interrupts, because any second computer will have to have them. Include the standard VIA 65c22 Versatile Interface Adapter chip so we get to know it.
  • Build a platform for building a second computer. This sounds like a Deep Thought joke in the making. Still, building an 8-bit computer is lot easier if you have already have one around -- a EEPROM programmer, for example, is not that hard to put together if you have a working machine with those VIA chips. You can use it to experiment with SD-card interfaces, LCD displays, and all the other far-out dreams we just dumped.
  • Make sure it actually works. And of course there is always that.

So now we have guidelines for the design process. In the next entry, we'll (finally) get down to the actual design.