Initial commit
This commit is contained in:
commit
464ea876d1
89
DOCS.txt
Normal file
89
DOCS.txt
Normal file
@ -0,0 +1,89 @@
|
||||
╔══════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════╗
|
||||
║ 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 ║
|
||||
╠══════════╬═════════════════════════╬════════════════════╬══════╬══════╬══════╬══════╬══════╬══════╬══════╬══════╣ ╠═══════╬═════════════════════════╣
|
||||
║ URSH ║ Unsigned right shift ║ D = A >> B ║ 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 ║
|
||||
╠══════════╬═════════════════════════╬════════════════════╬══════╬══════╬══════╬══════╬══════╬══════╬══════╬══════╣ ╠═══════╩═════════════════════════╣
|
||||
║ MULS ║ Signed multiplication ║ D = A * B >> shift ║ CCCR ║ 1011 ║ DDDd ║ dddd ║ BBBb ║ bbbb ║ AAAa ║ aaaa ║ ║ Processor configuration bits ║
|
||||
╠══════════╬═════════════════════════╬════════════════════╬══════╬══════╬══════╬══════╬══════╬══════╬══════╬══════╣ ╠═══════╦═════════════════════════╣
|
||||
║ MULU ║ Unsigned multiplication ║ D = A * B >> shift ║ CCCR ║ 1100 ║ DDDd ║ dddd ║ BBBb ║ bbbb ║ AAAa ║ aaaa ║ ║ 3-0 ║ Multiplication shift ║
|
||||
╠══════════╬═════════════════════════╬════════════════════╬══════╬══════╬══════╬══════╬══════╬══════╬══════╬══════╣ ╠═══════╬═════════════════════════╣
|
||||
║ MULR ║ Integer multiplication ║ D = A * B ║ CCCR ║ 1101 ║ DDDd ║ dddd ║ BBBb ║ bbbb ║ AAAa ║ aaaa ║ ║ 7-4 ║ Reserved ║
|
||||
╠══════════╬═════════════════════════╬════════════════════╬══════╬══════╬══════╬══════╬══════╬══════╬══════╬══════╣ ╠═══════╬═════════════════════════╣
|
||||
║ DIVI ║ Division ║ D = A / B ║ CCCR ║ 1110 ║ DDDd ║ dddd ║ BBBb ║ bbbb ║ AAAa ║ aaaa ║ ║ 11-8 ║ Reserved ║
|
||||
╠══════════╬═════════════════════════╬════════════════════╬══════╬══════╬══════╬══════╬══════╬══════╬══════╬══════╣ ╠═══════╬═════════════════════════╣
|
||||
║ MODU ║ Modulus ║ D = A % 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 ║
|
||||
╚══════════════════════════════════════════════════════════════╩══╩════════════════════════════════════════╩══╩══════════════════════════════════════════════════╩══╩═══╩═════════════════════════════╝
|
20
LICENSE.txt
Normal file
20
LICENSE.txt
Normal file
@ -0,0 +1,20 @@
|
||||
Copyright (c) 2025 shylie
|
||||
|
||||
This software is provided ‘as-is’, without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
arising from the use of this software.
|
||||
|
||||
Permission is granted to anyone to use this software for any purpose,
|
||||
including commercial applications, and to alter it and redistribute it
|
||||
freely, subject to the following restrictions:
|
||||
|
||||
1. The origin of this software must not be misrepresented; you must not
|
||||
claim that you wrote the original software. If you use this software
|
||||
in a product, an acknowledgment in the product documentation would be
|
||||
appreciated but is not required.
|
||||
|
||||
2. Altered source versions must be plainly marked as such, and must not be
|
||||
misrepresented as being the original software.
|
||||
|
||||
3. This notice may not be removed or altered from any source
|
||||
distribution.
|
Loading…
x
Reference in New Issue
Block a user