07-16-2016, 07:09 PM
Hello,
I am making an isa.
My goal is to make it very easy for the computer to decode,
it only contains 16 operations: 8 math 4 branch 3 data 1 control.
But maybe you are thinking, that is not a lot, but wait, if you have only 4 bits for the opcode and 9 for the A, B, C arguments, you left over 3 bits of D arguments so you can have a lot of options in one operations which is very cool!
you need a smal decoder for the instructions
for the instructions i used a lot of the same format, and all extra stuf can be decoded in the specific hardware itself.
this ''/'' means there is an option (load/store
"stack" means ther is an option to use the stack instead of register 7
Here is my isa:
Opcode
Input A
Input B
Extra
Output C
0Addition
ADD
RA
RB
Carry
increment
stack
RC
1Subtraction
SUB
RA
RB
Carry
Decrement
stack
RC
2Multiply
MUL
RA
RB
stack
RC
3Divide
DIV
RA
RB
stack
RC
4Bitwise or
OR
RA
RB
1=invert out
stack
RC
5Bitwise nand
NND
RA
RB
1=invert out
stack
RC
6Bitwise xor
XOR
RA
RB
1=invert out
stack
RC
7Left/Right shift
SFT
RA
Amount shifting
Shift L/shift R
Rotate on/off
stack
RC
Jump if
JMP
RA
Invert
4 bit flag address
4 bit flag address
Offset/Jump
x
Set one if
STO
x
Invert
4 bit flag address
4 bit flag address
Offset/Jump
RC
Monitor flag
MTF
RA
Invert
First 4 flags
4 bit flag address
Offset/Jump
Branch when store to RC
Call
CLL
RA
RB
stack
x
Load constant
CON
1st and 2nd part
8 bit numb
8 bit numb
8 bit numb
RC
Load store IO ports
IOP
RA/RC
RB
Load/store
stack
Internal registers
Load/store reg
LSR
RA/RC
RB
Load/Store
Ram/IO
Stack
0 port+dat
1 port
2 port+latch
3 data+data
Control
CRT
RA
Message to UI
x
0 shutdown
1 exit bios program
2 return from subroutine
3 nop
4 end interrupt
5 halt
6 mode
7 End file
Modes:
0. Normal
1. fpu
2. simd
3. immediate
return form subroutine:
RC return value
On word it looks like beter but maybe you can see what i mean with my isa and you als can download it.
If you have any question or something i can add because there are a lot of empty spaces, tell me. My computer isn't don yet.
(I am dutch so maybe my enlish is not so good)
Mattthijs (MCMatthijs)
I am making an isa.
My goal is to make it very easy for the computer to decode,
it only contains 16 operations: 8 math 4 branch 3 data 1 control.
But maybe you are thinking, that is not a lot, but wait, if you have only 4 bits for the opcode and 9 for the A, B, C arguments, you left over 3 bits of D arguments so you can have a lot of options in one operations which is very cool!
you need a smal decoder for the instructions
for the instructions i used a lot of the same format, and all extra stuf can be decoded in the specific hardware itself.
this ''/'' means there is an option (load/store
"stack" means ther is an option to use the stack instead of register 7
Here is my isa:
Opcode
Input A
Input B
Extra
Output C
0Addition
ADD
RA
RB
Carry
increment
stack
RC
1Subtraction
SUB
RA
RB
Carry
Decrement
stack
RC
2Multiply
MUL
RA
RB
stack
RC
3Divide
DIV
RA
RB
stack
RC
4Bitwise or
OR
RA
RB
1=invert out
stack
RC
5Bitwise nand
NND
RA
RB
1=invert out
stack
RC
6Bitwise xor
XOR
RA
RB
1=invert out
stack
RC
7Left/Right shift
SFT
RA
Amount shifting
Shift L/shift R
Rotate on/off
stack
RC
Jump if
JMP
RA
Invert
4 bit flag address
4 bit flag address
Offset/Jump
x
Set one if
STO
x
Invert
4 bit flag address
4 bit flag address
Offset/Jump
RC
Monitor flag
MTF
RA
Invert
First 4 flags
4 bit flag address
Offset/Jump
Branch when store to RC
Call
CLL
RA
RB
stack
x
Load constant
CON
1st and 2nd part
8 bit numb
8 bit numb
8 bit numb
RC
Load store IO ports
IOP
RA/RC
RB
Load/store
stack
Internal registers
Load/store reg
LSR
RA/RC
RB
Load/Store
Ram/IO
Stack
0 port+dat
1 port
2 port+latch
3 data+data
Control
CRT
RA
Message to UI
x
0 shutdown
1 exit bios program
2 return from subroutine
3 nop
4 end interrupt
5 halt
6 mode
7 End file
Modes:
0. Normal
1. fpu
2. simd
3. immediate
return form subroutine:
RC return value
On word it looks like beter but maybe you can see what i mean with my isa and you als can download it.
If you have any question or something i can add because there are a lot of empty spaces, tell me. My computer isn't don yet.
(I am dutch so maybe my enlish is not so good)
Mattthijs (MCMatthijs)