90 lines
27 KiB
Plaintext
90 lines
27 KiB
Plaintext
╔════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════╗
|
|
║ Foot ISA ║
|
|
╠═══════════════════════════════════════════════════════════════════════════════════════════════════════════════════╦══╦═════════════════════════════════╣
|
|
║ Instruction Format ║ ║ Addressing Modes ║
|
|
╠══════════╦═════════════════════════╦══════════════════════╦═══════════════════════════════════════════════════════╣ ╠═══════╦═════════════════════════╣
|
|
║ ║ ║ ║ Encoding ║ ║ 000 ║ Immediate ║
|
|
║ Mnemonic ║ Description ║ Semantics ╠═════════════╦═════════════╦═════════════╦═════════════╣ ╠═══════╬═════════════════════════╣
|
|
║ ║ ║ ║ 24-31 ║ 16-23 ║ 8-15 ║ 0-7 ║ ║ 001 ║ Direct ║
|
|
╠══════════╬═════════════════════════╬══════════════════════╬══════╦══════╬══════╦══════╬══════╦══════╬══════╦══════╣ ╠═══════╬═════════════════════════╣
|
|
║ CNST ║ Immediate ║ D = I ║ CCCR ║ 0000 ║ DDDd ║ dddd ║ iiii ║ iiii ║ iiii ║ iiii ║ ║ 010 ║ Indirect Auto-increment ║
|
|
╠══════════╬═════════════════════════╬══════════════════════╬══════╬══════╬══════╬══════╬══════╬══════╬══════╬══════╣ ╠═══════╬═════════════════════════╣
|
|
║ CMPR ║ Compare ║ C = A <=> B ║ CCCR ║ 0001 ║ BBBb ║ bbbb ║ 0000 ║ 0000 ║ AAAa ║ aaaa ║ ║ 011 ║ Indirect Auto-decrement ║
|
|
╠══════════╬═════════════════════════╬══════════════════════╬══════╬══════╬══════╬══════╬══════╬══════╬══════╬══════╣ ╠═══════╬═════════════════════════╣
|
|
║ BWNG ║ Bitwise negate ║ D = ~A ║ CCCR ║ 0001 ║ DDDd ║ dddd ║ 0000 ║ 0001 ║ AAAa ║ aaaa ║ ║ 100 ║ Indirect ║
|
|
╠══════════╬═════════════════════════╬══════════════════════╬══════╬══════╬══════╬══════╬══════╬══════╬══════╬══════╣ ╠═══════╬═════════════════════════╣
|
|
║ ARNG ║ Arithmetic negate ║ D = -A ║ CCCR ║ 0001 ║ DDDd ║ dddd ║ 0000 ║ 0010 ║ AAAa ║ aaaa ║ ║ 101 ║ Indirect 1-word offset ║
|
|
╠══════════╬═════════════════════════╬══════════════════════╬══════╬══════╬══════╬══════╬══════╬══════╬══════╬══════╣ ╠═══════╬═════════════════════════╣
|
|
║ LONG ║ Logical negate ║ D = !A ║ CCCR ║ 0001 ║ DDDd ║ dddd ║ 0000 ║ 0011 ║ AAAa ║ aaaa ║ ║ 110 ║ Indirect 2-word offset ║
|
|
╠══════════╬═════════════════════════╬══════════════════════╬══════╬══════╬══════╬══════╬══════╬══════╬══════╬══════╣ ╠═══════╬═════════════════════════╣
|
|
║ CONF ║ Configure processor ║ ║ CCCR ║ 0001 ║ DDDd ║ dddd ║ 0000 ║ 0100 ║ AAAa ║ aaaa ║ ║ 111 ║ Indirect 3-word offset ║
|
|
╠══════════╬═════════════════════════╬══════════════════════╬══════╬══════╬══════╬══════╬══════╬══════╬══════╬══════╣ ╠═══════╩═════════════════════════╣
|
|
║ BWOR ║ Bitwise or ║ D = A | B ║ CCCR ║ 0010 ║ DDDd ║ dddd ║ BBBb ║ bbbb ║ AAAa ║ aaaa ║ ║ Conditional Execution Flags ║
|
|
╠══════════╬═════════════════════════╬══════════════════════╬══════╬══════╬══════╬══════╬══════╬══════╬══════╬══════╣ ╠═══════╦═════════════════════════╣
|
|
║ BAND ║ Bitwise and ║ D = A & B ║ CCCR ║ 0011 ║ DDDd ║ dddd ║ BBBb ║ bbbb ║ AAAa ║ aaaa ║ ║ 000 ║ Always ║
|
|
╠══════════╬═════════════════════════╬══════════════════════╬══════╬══════╬══════╬══════╬══════╬══════╬══════╬══════╣ ╠═══════╬═════════════════════════╣
|
|
║ BXOR ║ Bitwise xor ║ D = A ^ B ║ CCCR ║ 0100 ║ DDDd ║ dddd ║ BBBb ║ bbbb ║ AAAa ║ aaaa ║ ║ 001 ║ A < B ║
|
|
╠══════════╬═════════════════════════╬══════════════════════╬══════╬══════╬══════╬══════╬══════╬══════╬══════╬══════╣ ╠═══════╬═════════════════════════╣
|
|
║ RESERVED ║ ║ ║ CCCR ║ 0101 ║ DDDd ║ dddd ║ BBBb ║ bbbb ║ AAAa ║ aaaa ║ ║ 010 ║ A <= B ║
|
|
╠══════════╬═════════════════════════╬══════════════════════╬══════╬══════╬══════╬══════╬══════╬══════╬══════╬══════╣ ╠═══════╬═════════════════════════╣
|
|
║ SRSH ║ Signed right shift ║ D = A >> B ║ CCCR ║ 0110 ║ DDDd ║ dddd ║ BBBb ║ bbbb ║ AAAa ║ aaaa ║ ║ 011 ║ A = B ║
|
|
╠══════════╬═════════════════════════╬══════════════════════╬══════╬══════╬══════╬══════╬══════╬══════╬══════╬══════╣ ╠═══════╬═════════════════════════╣
|
|
║ ZLSH ║ Pad zero left shift ║ D = A << B ║ CCCR ║ 0111 ║ DDDd ║ dddd ║ BBBb ║ bbbb ║ AAAa ║ aaaa ║ ║ 100 ║ A >= B ║
|
|
╠══════════╬═════════════════════════╬══════════════════════╬══════╬══════╬══════╬══════╬══════╬══════╬══════╬══════╣ ╠═══════╬═════════════════════════╣
|
|
║ CLSH ║ Circular left shift ║ D = A << B ║ CCCR ║ 1000 ║ DDDd ║ dddd ║ BBBb ║ bbbb ║ AAAa ║ aaaa ║ ║ 101 ║ A > B ║
|
|
╠══════════╬═════════════════════════╬══════════════════════╬══════╬══════╬══════╬══════╬══════╬══════╬══════╬══════╣ ╠═══════╬═════════════════════════╣
|
|
║ ADDI ║ Addition ║ D = A + B ║ CCCR ║ 1001 ║ DDDd ║ dddd ║ BBBb ║ bbbb ║ AAAa ║ aaaa ║ ║ 110 ║ A != B ║
|
|
╠══════════╬═════════════════════════╬══════════════════════╬══════╬══════╬══════╬══════╬══════╬══════╬══════╬══════╣ ╠═══════╬═════════════════════════╣
|
|
║ SUBT ║ Subtraction ║ D = A - B ║ CCCR ║ 1010 ║ DDDd ║ dddd ║ BBBb ║ bbbb ║ AAAa ║ aaaa ║ ║ 111 ║ Reserved ║
|
|
╠══════════╬═════════════════════════╬══════════════════════╬══════╬══════╬══════╬══════╬══════╬══════╬══════╬══════╣ ╠═══════╩═════════════════════════╣
|
|
║ MULT ║ Multiplication ║ D = A * B >> shift ║ CCCR ║ 1011 ║ DDDd ║ dddd ║ BBBb ║ bbbb ║ AAAa ║ aaaa ║ ║ Processor configuration bits ║
|
|
╠══════════╬═════════════════════════╬══════════════════════╬══════╬══════╬══════╬══════╬══════╬══════╬══════╬══════╣ ╠═══════╦═════════════════════════╣
|
|
║ RESERVED ║ ║ ║ CCCR ║ 1100 ║ DDDd ║ dddd ║ BBBb ║ bbbb ║ AAAa ║ aaaa ║ ║ 3-0 ║ Multiplication shift ║
|
|
╠══════════╬═════════════════════════╬══════════════════════╬══════╬══════╬══════╬══════╬══════╬══════╬══════╬══════╣ ╠═══════╬═════════════════════════╣
|
|
║ RESERVED ║ ║ ║ CCCR ║ 1101 ║ DDDd ║ dddd ║ BBBb ║ bbbb ║ AAAa ║ aaaa ║ ║ 7-4 ║ Reserved ║
|
|
╠══════════╬═════════════════════════╬══════════════════════╬══════╬══════╬══════╬══════╬══════╬══════╬══════╬══════╣ ╠═══════╬═════════════════════════╣
|
|
║ DIVI ║ Division ║ D = (A << shift) / B ║ CCCR ║ 1110 ║ DDDd ║ dddd ║ BBBb ║ bbbb ║ AAAa ║ aaaa ║ ║ 11-8 ║ Reserved ║
|
|
╠══════════╬═════════════════════════╬══════════════════════╬══════╬══════╬══════╬══════╬══════╬══════╬══════╬══════╣ ╠═══════╬═════════════════════════╣
|
|
║ MODU ║ Modulus ║ D = (A << shift) % B ║ CCCR ║ 1111 ║ DDDd ║ dddd ║ BBBb ║ bbbb ║ AAAa ║ aaaa ║ ║ 15-12 ║ Reserved ║
|
|
╚══════════╩═════════════════════════╩══════════════════════╩══════╩══════╩══════╩══════╩══════╩══════╩══════╩══════╩══╩═══════╩═════════════════════════╝
|
|
|
|
╔═════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════╗
|
|
║ Foot ISA Table Key ║
|
|
╠══════════════════════════════════════════════════════════════╦══╦════════════════════════════════════════╦══╦══════════════════════════════════════════════════╦══╦═════════════════════════════════╣
|
|
║ Addressing Modes ║ ║ Conditional Execution Flags ║ ║ Processor Configuration Bits ║ ║ Instruction Bits ║
|
|
╠═════════════════╦════════════════════════════════════════════╣ ╠════════╦═══════════════════════════════╣ ╠══════════════════════╦═══════════════════════════╣ ╠═══╦═════════════════════════════╣
|
|
║ Immediate ║ Use register index as operand or ║ ║ Always ║ Always run ║ ║ Multiplication shift ║ Bit-shift for fixed-point ║ ║ C ║ Conditional Execution Flags ║
|
|
║ ║ Discard result ║ ║ ║ ║ ║ ║ multiplication operations ║ ║ ║ ║
|
|
╠═════════════════╬════════════════════════════════════════════╣ ╠════════╬═══════════════════════════════╣ ╠══════════════════════╩═══════════════════════════╣ ╠═══╬═════════════════════════════╣
|
|
║ Direct ║ Use register contents as operand or ║ ║ A < B ║ Run if last CMPR instruction ║ ║ ║ ║ R ║ Repeat Flag ║
|
|
║ ║ Store to register ║ ║ ║ indicated A is less than B ║ ║ ║ ║ ║ ║
|
|
╠═════════════════╬════════════════════════════════════════════╣ ╠════════╬═══════════════════════════════╣ ║ ║ ╠═══╬═════════════════════════════╣
|
|
║ Indirect ║ Use register contents as memory address, ║ ║ A <= B ║ Run if last CMPR instruction ║ ║ ║ ║ D ║ Destination Addressing Mode ║
|
|
║ Auto-increment ║ then use memory contents as operand ║ ║ ║ indicated A is less than or ║ ║ ║ ║ ║ ║
|
|
║ ║ or store to memory. ║ ║ ║ equal to B ║ ║ ║ ║ ║ ║
|
|
║ ║ Then, increment register contents by 1. ║ ║ ║ ║ ║ ║ ║ ║ ║
|
|
╠═════════════════╬════════════════════════════════════════════╣ ╠════════╬═══════════════════════════════╣ ║ ║ ╠═══╬═════════════════════════════╣
|
|
║ Indirect ║ Use register contents as memory address, ║ ║ A = B ║ Run if last CMPR instruction ║ ║ ║ ║ d ║ Destination Register Index ║
|
|
║ Auto-decrement ║ then use memory contents as operand ║ ║ ║ indicated A equal to B ║ ║ ║ ║ ║ ║
|
|
║ ║ or store to memory. ║ ║ ║ ║ ║ ║ ║ ║ ║
|
|
║ ║ Then, decrement register contents by 1. ║ ║ ║ ║ ║ ║ ║ ║ ║
|
|
╠═════════════════╬════════════════════════════════════════════╣ ╠════════╬═══════════════════════════════╣ ║ ║ ╠═══╬═════════════════════════════╣
|
|
║ Indirect ║ Use register contents as memory address, ║ ║ A >= B ║ Run if last CMPR instruction ║ ║ ║ ║ A ║ Operand A Addressing Mode ║
|
|
║ ║ then use memory contents as operand ║ ║ ║ indicated A is greater than ║ ║ ║ ║ ║ ║
|
|
║ ║ or store to memory. ║ ║ ║ or equal to B ║ ║ ║ ║ ║ ║
|
|
╠═════════════════╬════════════════════════════════════════════╣ ╠════════╬═══════════════════════════════╣ ║ ║ ╠═══╬═════════════════════════════╣
|
|
║ Indirect 1-word ║ Use register contents as memory address, ║ ║ A > B ║ Run if last CMPR instruction ║ ║ ║ ║ a ║ Operand A Register Index ║
|
|
║ Offset ║ add 1 to address, then use memory contents ║ ║ ║ indicated A is greater than B ║ ║ ║ ║ ║ ║
|
|
║ ║ as operand or store to memory. ║ ║ ║ ║ ║ ║ ║ ║ ║
|
|
╠═════════════════╬════════════════════════════════════════════╣ ╠════════╬═══════════════════════════════╣ ║ ║ ╠═══╬═════════════════════════════╣
|
|
║ Indirect 2-word ║ Use register contents as memory address, ║ ║ A != B ║ Run if last CMPR instruction ║ ║ ║ ║ B ║ Operand B Addressing Mode ║
|
|
║ Offset ║ add 2 to address, then use memory contents ║ ║ ║ indicated A is not equal to B ║ ║ ║ ║ ║ ║
|
|
║ ║ as operand or store to memory. ║ ║ ║ ║ ║ ║ ║ ║ ║
|
|
╠═════════════════╬════════════════════════════════════════════╣ ╠════════╩═══════════════════════════════╣ ║ ║ ╠═══╬═════════════════════════════╣
|
|
║ Indirect 3-word ║ Use register contents as memory address, ║ ║ ║ ║ ║ ║ b ║ Operand B Register Index ║
|
|
║ Offset ║ add 3 to address, then use memory contents ║ ║ ║ ║ ║ ║ ║ ║
|
|
║ ║ as operand or store to memory. ║ ║ ║ ║ ║ ║ ║ ║
|
|
╠═════════════════╩════════════════════════════════════════════╣ ║ ║ ║ ║ ╠═══╬═════════════════════════════╣
|
|
║ ║ ║ ║ ║ ║ ║ i ║ Immediate Integer ║
|
|
╚══════════════════════════════════════════════════════════════╩══╩════════════════════════════════════════╩══╩══════════════════════════════════════════════════╩══╩═══╩═════════════════════════════╝
|