I am grinning like an idiot
Oh yea, and the instructions are now being converted to 11 bit opcodes for the alu, it includes mode toggling and timing bits. The conversion still takes the same amount of time though (3 tick sync). I factor the decode/encode delay in to the timing section though, so the overall speed should still be pretty good.
IS update:
Oh yea, and the instructions are now being converted to 11 bit opcodes for the alu, it includes mode toggling and timing bits. The conversion still takes the same amount of time though (3 tick sync). I factor the decode/encode delay in to the timing section though, so the overall speed should still be pretty good.
IS update:
Code:
[{ifT}{3-bit flag adr}] [{jmp adr}] 01001xxx aaaaaaaa
[{ifF}{3-bit flag adr}] [{jmp adr}] 01000xxx aaaaaaaa
[{jump}] [{jump address}] 01010--- aaaaaaaa
[{call}] [{function address}] 01011--- aaaaaaaa
[{prog}{prog number}] 00010xxx
[{return}] 00011---
[{halt}] 00000---
[{read}{periph adr}] [{adr}] 01100xxx aaaaaaaa
[{ptrR}{ptr address}] 00111xxx
[{regread}{reg address}] 10000xxx
[{const}] [{imm}] 01111--- aaaaaaaa
[{pop}] 10010111
[{add}{to reg address}] 10100xxx
[{a-b}{to reg address}] 10101xxx
[{b-a}{to reg address}] 10110xxx
[{SHR}{to reg address}] 10111xxx
[{xor}{to reg address}] 11000xxx
[{xnor}{to reg address}] 11001xxx
[{or}{to reg address}] 11010xxx
[{nor}{to reg address}] 11011xxx
[{and}{to reg address}] 11100xxx
[{nand}{to reg address}] 11101xxx
[{!a}{to reg address}] 11110xxx
[{a}{to reg adr}] 11111xxx
[{ptrE}{ptr address}] 10011xxx
[{ptrW}{ptr address}] 00100xxx
[{write}{periph adr}] [{adr}] 01101xxx aaaaaaaa
ALU microcode:
12 bit opcode: [if mode][3-bit control code][!a][!b][3-bit alu opcode][3-bit reg address]
the control codes with 0 as the msb are timing codes.
the other control codes are specific to the ops involved.
a/!a: 0 001 x0 001 aaa
nor/and: 0 001 xx 010 aaa
or/nand: 0 001 xx 011 aaa
xor/xnor: 0 010 x0 100 aaa
add/sub: 0 011 xx 101 aaa
SHR: 0 010 00 110 aaa
regread: 0 100 00 000 aaa
pop: 0 101 00 000 111
const: 0 110 00 000 ---
ptrE: 0 111 00 001 aaa
IFT/IFF: 1 000 00 000 aaa