Writing, Iguanas, and Electronics

MOV Instruction - 4-bit Device IDs

I will start with the plan for 4-bit device identification. This allows a source and destination to each be a single hex digit, making it much more human readable. Peripherals can be identified by their own 4-bit identifiers, with the leading instruction providing content. This means more leading instructions, but I believe it will be worth it... and sixteen devices will be sufficient to start anyway.

Device      Binary     Hex
   0         0000       0
   1         0001       1

   2         0010       2
   3         0011       3
   4         0100       4
   5         0101       5
   6         0110       6
   7         0111       7
   8         1000       8
   9         1001       9
  10         1010       A
  11         1011       B
  12         1100       C
  13         1101       D
  14         1110       E
  15         1111       F

I have three completed registers now, so it is possible to start prototyping the Instruction Register and the control logic for a MOV instruction to copy values from one register to the next. In the prototype, the IR can actually be 16-lane dip switches. To that end, I need to actually pick a code for the MOV instruction.

If the highest order bit is the instruction mode (1 for firmware address, 0 for microcode), that means that the first hex digit must be a 7 or less. Any value of 8 or higher will indicate that the remaining 15-bits are an address in the EEPROM bank.

OP Code       Example      Instruction         Description
 0A{sd}    0A1F    MOV S, D     Move a value from source to destination.

The control logic needs to decode this in parts. For now, I will assume the decoding is in 4-bit chunks.

0000 - Ignore
1010 - MOV
0001 - Source Device
1111 - Destination Device


Login to post comments.