Instruction encoding
From TriPU
[edit]
Instruction encoding
| Instruction type | 31 | 30 | 29 | 28 | 27 | 26 | 25 | 24 | 23 | 22 | 21 | 20 | 19 | 18 | 17 | 16 | 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ALU operation | 0 | 0 | 0 | operation (s.b.) | srcReg2 | srcReg1 | targetReg | |||||||||||||||||||||||||
| 0 | 0 | 1 | operation (s.b.) | imm8 | srcReg1 | targetReg | ||||||||||||||||||||||||||
| memory access | 0 | 1 | R/W | cond | imm8 | addrReg | srcReg/targetReg | |||||||||||||||||||||||||
| branch | 1 | 0 | 0 | cond (s.b.) | addrReg | |||||||||||||||||||||||||||
| 1 | 0 | 1 | cond (s.b.) | relative imm24 | ||||||||||||||||||||||||||||
| call | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | addrReg | |||||||||||||||||||||||
| callrel | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 1 | relative imm24 | |||||||||||||||||||||||
| interrupt | 1 | 1 | 0 | 0 | 0 | 0 | 1 | 0 | imm8 | |||||||||||||||||||||||
| return | 1 | 1 | 0 | 0 | 0 | 0 | 1 | 1 | ||||||||||||||||||||||||
| ret. from interrupt | 1 | 1 | 0 | 0 | 0 | 1 | 0 | 0 | ||||||||||||||||||||||||
| load MCR | 1 | 1 | 0 | 0 | 0 | 1 | 0 | 1 | targetReg | |||||||||||||||||||||||
| store MCR | 1 | 1 | 0 | 0 | 0 | 1 | 1 | 0 | srcReg | |||||||||||||||||||||||
[edit]
ALU operation encoding
To be determined...
| value | operation |
|---|
[edit]
branch condition encoding
To be determined...
| value | condition |
|---|
