Submitted by alexios on

In implementing 32-bit division, it dawned on me that the design is pretty klunky in a number of unforeseen and annoying ways. Some can be fixed by simply adjusting the microcode, but it looks like a major revision is necessary for two reasons. One, I need an Overflow flag. Yes, at this late stage I realised it would be a lot of help to have that available in hardware. CFT has precious few facilities for two's complement arithmetic as it is. Two, I need some new OP1/OP2 instructions to help with some aspects of arithmetic.

Overflow Flag

Having an Overflow flag, something that calculates it, and skip instructions that act on it is a must if the CFT is to support signed arithmetic in any realistic way. Since the ALU is ROM-based, calculation is child's play, especially using ROMtools with Python. The rest will be a bit hairier than that.

Additional Instructions

While I'm changing microcode, I will need a couple of minor operations to simplify two's complement arithmetic a little bit. Ideally, I'd like to be able to increment the Accumulator if L is set. This should be an OP1 facility. To do this, I'll need to bring at least the FL signal to the microcode ROMs and make it an input. While I'm at it, I should also give it access to the other three flags. The microcode is using 13 bits and I'm using 19-bit Flash RAMs. There's space.

To Do List

This is going to be annoying. What I need to do:

  • Update the ALU binary ROM table.
  • Rearrange the OP1 instruction to make space for SSV (skip on overflow) and SNV minor operations.
  • Think about the order of execution and add appropriate minor operations to OP1.
  • Amend the microcode accordingly.
  • Update the emulator.
  • Update the Verilog source.
  • Add a Control Bus pin assignment for the V flag signal.
  • Change the Control Unit schematics to bring the V signal to the Skip/Branch Unit and all four flags (?) to Microcode ROM address pins. The reset and interrupt pins may have to be moved, if this is feasible on the already very cluttered Control Unit board.
  • Route the changed traces on the Control Unit board.
  • (Eventually) change the ALU schematics.
  • Update the programming documentation (including the datapath diagram and instruction table).
  • Update the bus documentation.

Tags: 


Add new comment

Leave a comment