-
Notifications
You must be signed in to change notification settings - Fork 2
/
imem.data
executable file
·35 lines (28 loc) · 1.29 KB
/
imem.data
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
// ECE:3350 sisc processor project
// This program tests arithmetic instructions from Part 1.
// These are the same instructions in sisc_tb_p1.v
//
00000000 //00: NOP
88010001 //01: ADDI R1 <- R0 + (0x0000)0001
80112001 //02: ADD R2 <- R1 + R1
8022300B //03: SHFL R3 <- R2 << [R2]
80124002 //04: SUB R4 <- R1 - R2
8043400A //05: SHFR R4 <- R4 >> [R3]
80342007 //06: XOR R2 <- R3 ^ R4
80202004 //07: NOT R2 <- ~R2
80214009 //08: ROTL R4 <- R2 <.< [R1]
80245005 //09: OR R5 <- R2 | R4
80243006 //0A: AND R3 <- R2 & R4
// ECE:3350 sisc processor project
// This program tests branch instructions with two nested loops
//
00000000 //0B: NOP
88010001 //0C: ADD R1 <- R0 + 0x(0000)0001 Set R1 = 1
88020004 //0D: ADD R2 <- R0 + 0x(0000)0004 Set R2 = 4
80212002 //0E: SUB R2 <- R2 - R1 L1 Decrement R2
53000004 //0F: BRR PC <- (PC+1) + 0x0004 If R2 < 0, branch to end
88230000 //10: ADD R3 <- R2 + 0x(0000)0000 Set R3 = R2
80313002 //11: SUB R3 <- R3 - R1 L2 Decrement R3
61000011 //12: BNE PC <- 0x0011 if [R3]!=0 If R3 != 0, branch to L2
4000000E //13: BRA PC <- 0x000E (unconditional) Branch to L1
F0000000 //14: HALT Halt program