Docsity

Falcon E Notation - Computer Architecture - Lecture Slides, Slides of Introduction to Database Management Systems

Toggle sidebar
bg1
1
Falcon-E : Introduction
• Eight GPRs: R0, R1, …, R7; 32-bits each
•Two 32-bit special purpose registers:
BP and SP
•Two 32-bit system registers transparent to
the programmer: PC and IR
•Memory word size: 32 bits
•Memory space size: 232 bytes
•Memory organization: 232 x 8 bits
•Memory accessed in 32 bit words
( i.e., 4 byte chunks)
•Little-endian byte storage
Docsity.com
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16
pf17
pf18
pf19
pf1a
pf1b
pf1c
pf1d
pf1e
pf1f
pf20
pf21
pf22
pf23
pf24
pf25
pf26
pf27
pf28
pf29
pf2a
pf2b
pf2c
pf2d
pf2e
pf2f
pf30
pf31
pf32
pf33
pf34
pf35
pf36
pf37
pf38
pf39
pf3a
pf3b

Partial preview of the text

Download Falcon E Notation - Computer Architecture - Lecture Slides and more Slides Introduction to Database Management Systems in PDF only on Docsity!

1

Falcon-E : Introduction

  • Eight GPRs: R0, R1, …, R7; 32-bits each
  • Two 32-bit special purpose registers:

 BP and SP

  • Two 32-bit system registers transparent to

the programmer: PC and IR

  • Memory word size: 32 bits
  • Memory space size: 2

bytes

  • Memory organization: 2

x 8 bits

  • Memory accessed in 32 bit words

( i.e., 4 byte chunks)

  • Little-endian byte storage Docsity.com

2

Programmer’s view of the Falcon-E

Main memory

R
R
R
Register file
IR
PC

CPU

SP
BP

Input/Output

4

Falcon-E Notation

  • Special notation for 32-bit memory words

M[8]<31…0>:=M[11]©M[10]©M[9]©M[8]

( © is used to represent concatenation)

M[8]
M[9]
M[10]
M[11]
M[11] M[10] M[9] M[8]
MS Byte LS Byte

8^ One memory “word”

Memory addresses

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

to be used in place of rb in lds and sts instructions

Register Code

SP 000

BP 001

8

Type A

 nop (op-code = 0)

useful in pipelining

 ret (op-code = 15)

 iret (op-code = 17)

 near jmp (op-code = 18)

Opcode

31 27 Displacement / Not Used

26 0

10

Type C

 lds (op-code = 4) load special purpose register

lds SP, R1 R[1] SP

 sts (op-code = 5) store special purpose register

sts R3, BP BP R[3]

 in (op-code = 6) load register from IO device

in R5, R4(100) R[5] IO[R[4]+100]

 out (op-code = 7) store register to IO device

out R8, R6(36) IO[R[6]+36] R[8]

Opcode

31 27 ra

26 24 rb

23 21 Displacement / Immediate

20 0

11

Type C

 addi (op-code = 2) immediate 2’s complement addition

addi R3, R4, 56 R[3] R[4] + 56

 andi (op-code = 2) immediate logical AND

andi R3, R4, 56 R[3] R[4] & 56

 ori (op-code = 2) immediate logical OR

ori R3, R4, 56 R[3] R[4] ~ 56

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