My implementation of the Nano-1 processor can be found in nano.circ.
The evaluation template is eval.txt
To use this implementation:
1. Enter a 9 bit instruction in the instruction register (IR). This is tricky due to confusion I caused in my specification. A typical instruction has the binary format:
rst.uvw.xyz
Where
rst = opcode
uvw = arg0 = principle source register
and destination register (loads bus0 and bus2)
xyz = arg1 = secondary source register
(loads bus1)
Each of these numbers is between 0 and 7.
However, in hex this number will have the format:
r.stuv.wxyz
If a 16 bit IR is used, then the format will be:
0000.000r.stuv.wxyz
2. Click twice on the clock that loads the status register.
3. Click twice on the clock that loads the data registers.
before
R2 = 0x0029
R3 = 0x0018
IR9 = 000.011.010 = 0.0001.1010 = 0x01a = 072
IR16 = 0000.0011.1010 = 0x003a
after
R2 = 0x0029
R3 = 0x0041
status = 0x0000
before
R4 = 0x0e38 = 0000.1110.0011.10000
R6 = 0xaaaa = 1010.1010.1010.1010
IR9 = 110.100.110 = 1.1010.0110 = 0x1a6
IR16 = 0000.0001.1010.0110 = 0x01a6
after
R4 = 0x0a28 = 0000.1010.0010.1000
R6 = 0xaaaa
status = 0x0000
before
R5 = 0x0f0f = 0000.1111.0000.1111
IR9 = 111.101.000 = 1.1110.1000 = 0x1e8 // any 3 last digits will
work since they are ignored
IR16 = 0x0178
after
R5 = 0xf0f0 = 1111.0000.1111.0000
status = 0x0000
before
R5 = 0xffff = 1111.1111.1111.1111
IR9 = 100.101.000 = 1.0010.1000 = 0x128
IR16 = 0x0128
after
R5 = 0xfffe = 1111.1111.1111.1110
status = 0x0001
before
R1 = 0x002d = 45
R7 = 0x0006 = 6
IR9 = 011.001.111 = 0.1100.1111 = 0x0cf
IR16 = 0x00cf
after
R1 = 0x0007 = 7
status = 0x0003 = 3