Project Machine Extensible: The ISA so far
So far I was dealing with the details of the design from a hardware perspective, hence the ReThink, and now I have to work out a model that actually works for the software end of things with general computation(like a calculator).
The instruction set I have devised is structured into two major sections. Each section is categorized based on the specific functions they perform. These sections ensure that the instructions are organized logically, making it easier to implement and understand the various operations required for the software to function efficiently. This division will help streamline the development process and ensure that both the hardware and software components work seamlessly together.
The ALU instructions
The ALU instructions are the same as the one for the ALU, with about 8 combinations for moving data.
Instruction Encoding
+---+-----------+---------------+
| 0 | CREG | OPCODE |
+---+-----------+---------------+
In this scheme of encoding the CREG feild is used to determine the sources and destination of the data being processed.
领英推荐
CREG F A B
000 A A X
001 A X A
010 A Y A
011 A D A
100 D A D
101 D X D
110 D Y D
111 D D D
So instruction like AND X will perform an AND operation on A and X and store the result in A.
The Movement Instructions
Instruction Encoding
+---+-----------+---------------+
| 1 | OPCODE | CREG |
+---+-----------+---------------+
OPCODE
000 - MOV
001 - SHM
010 - JMP
011 - LD/ST
These instructions basically move the data between registers, memory and registers. The reason jumps also are included here is because they are also data movement to and from the INSP or the instruction pointer.
A Complete Look
Now there can be many other considerations that I have skipped and I would look at a later stage when I have a functional model.