



















































Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!




















































1
the programmer: PC and IR
bytes
x 8 bits
( i.e., 4 byte chunks)
2
Programmer’s view of the Falcon-E
Main memory
CPU
Input/Output
4
M[8]<31…0>:=M[11]©M[10]©M[9]©M[8]
( © is used to represent concatenation)
5
Falcon-E : instruction formats
Opcode
31 27
ra
26 24
rb
23 21
Displacement / Immediate
20 0
Opcode
31 27
ra
26 24
Displacement / Immediate
23 0
Opcode
31 27
Displacement / Not Used
26 0
Opcode
31 27
ra
26 24
rb
23 21
rc
20 18
Unused
17 4
func
3 0
Type A
Type D
Type C
Type B
7
Encoding for the SPRs
Register Code
SP 000
BP 001
8
Opcode
31 27 Displacement / Not Used
26 0
10
Opcode
31 27 ra
26 24 rb
23 21 Displacement / Immediate
20 0
11
If the constant is negative, this becomes a subtract instruction
Opcode
31 27 ra
26 24 rb
23 21 Immediate
20 4 func
3 0
13
FUNCTIONAL GROUPS OF
INSTRUCTIONS
Control Instructions Mnemonic
Opcode Function
Dec Bin Dec Bin
No Operation nop^0 00000 -
14
FUNCTIONAL GROUPS OF
INSTRUCTIONS
Arithmetic Instructions Mnemonic
Opcode Function
Dec Bin Dec Bin
Add add 1 00001 0 0000
Add Immediate addi 2 00010 0 0000
Subtract sub^1 00001 1
Subtract Immediate subi 2 00010 1 0001
Multiply mul 1 00001 2 0010
Multiply Immediate muli 2 00010 2 0010
Divide div 1 00001 3 0011
Divide Immediate divi 2 00010 3 0011
16
FUNCTIONAL GROUPS OF
INSTRUCTIONS
Shift and Rotate Instructions
Mnemonic
Opcode Function
Dec Bin Dec Bin
Shift Left shl 1 00001 8 1000
Shift Left Immediate Count shli 2 00010 8 1000
Rotate Left rol 1 00001 9 1001
Rotate Left Immediate Count roli^2 00010 9
Shift Right shr 1 00001 10 1010
Shift Right Immediate Count shri 2 00010 10 1010
Shift Right Arithmetic sra 1 00001 11 1011
Shift Right Arithmetic Immediate Count srai^2 00010 11
17
FUNCTIONAL GROUPS OF
INSTRUCTIONS
Data Transfer Instructions
Mnemonic
Opcode Function Dec Bin Dec Bin
Move Immediate to GPR movi 3 00011 -
Load Special Purpose Register from GPR lds 4 00100 -
Store Special Purpose Register to GPR sts 5 00101 -
Load Register from IO in 6 00110 -
Store Register to IO out 7 00111 -
Push GPR to Stack push 8 01000 -
Pop GPR from Stack pop 9 01001 -
Load GPR from Memory (Direct Addressing) ld^10 01010 -
Load GPR from Memory (Displacement Addressing) ld^11 01011 -
Store GPR to Memory (Direct Addressing) st^12 01100 -
Store GPR to Memory (Displacement Addressing) st^13 01101 -
19
FUNCTIONAL GROUPS OF
INSTRUCTIONS
Branch Instructions Mnemonic
Opcode Function
Dec Bin Dec Bin
Near Jump (Relative) jmp^18 10010 -
Far Jump (Direct) jmp 19 10011 -
Branch If Equal (Relative) bre 20 10100 0 0000
Branch If Equal (Direct) bre 21 10101 0 0000
Branch If Not Equal (Relative) bne 20 10100 1 0001
Branch If Not Equal (Direct) bne 21 10101 1 0001
Branch If Less (Relative) bl 20 10100 2 0010
Branch If Less (Direct) bl 21 10101 2 0010
Branch If Greater (Relative) bg 20 10100 3 0011
Branch If Greater (Direct) bg 21 10101 3 0011
20