8 bit computer, microcode challenges

8 bit computer, microcode challenges

My 8 bit instructions can have up to 8 microcode steps each; I defined up to 24 control signals (thus needing 3 bytes per step); So in the Arduino Nano I’m using, I have to define them as uint32_t variables (which are 4 bytes long).

The EEPROMs have 8 bit values, so to hold one control words, I need 3 EEPROMs in parallel; I named those 3 EEPROMs CU02, CU01 and CU00, from msb to lsb. Control word CW is spread over the EEPROMs as follows:

  • CU02 receives (CW >> 16) & 0xFF
  • CU01 receives (CW >> 8) & 0xFF
  • CU00 receives CW & 0xFF

so:

  • CU02 contains bits 23 to 16
  • CU01 contains bits 15 to 08
  • CU00 contains bits 07 to 00

That’s the plan.

But…

The complete microcode consists of 256 instructions x 8 steps x 4 bytes per step. this amounts to 8192 bytes of storage for the microcode. Alas, this will not fit in Arduino Nano’s memory… If I choose to go along this path, I have to chop the data up in 8 (eight) parts to be able to program the EEPROMs. The nasty disadvantage is that when the code has to change, I would have to do that 8 times… Being an old-school programmer, I hate that.

So, what now?

Should I choose to program one EEPROM at a time, I would need only byte-sized variables, 256 * 8 of them, which would need 2K bytes of memory. Even this wouldn’t fit, The Nano can only process half of that…

I’m thinking about some other way…