-
Notifications
You must be signed in to change notification settings - Fork 0
/
programs_v.txt
112 lines (98 loc) · 5.07 KB
/
programs_v.txt
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
///////// PROGRAM ONE
mem[0] = {`NOP, 1'b0, 4'b1, 4'd1 ,18'd1600}; // NOP
mem[1] = {`LDW, 1'b0, 4'b1, 4'd1 ,18'd0}; // LWD R1,mem[1]
mem[2] = {`LDW, 1'b0, 4'd2, 4'd2 ,18'd0}; // LDW R2,mem[2]
mem[3] = {`LDW, 1'b0, 4'd3, 4'd3 , 18'd0}; // LDW R3,mem[3]
mem[4] = {`LDW, 1'b0, 4'd4, 4'd4, 18'd0}; // LDW R4,mem[4]
mem[5] = {`LDW, 1'b0, 4'd5, 4'd5, 5'd12, 13'd0}; // LDW R5,mem[5]
mem[6] = {`MUL, 1'b0, 4'd1, 4'd2, 4'd3, 14'd0}; // MUL R1,R2,R3
mem[7] = {`ADD, 1'b1, 4'd3, 4'd4 ,18'd16}; // ADDi R3, R4, #16
mem[8] = {`SUB, 1'b1, 4'd1, 4'd7 ,18'd444}; // SUBi R1, R7, #444
mem[9] = {`STR, 1'b0, 4'd2, 4'd5 ,18'd0};
mem[10] = {`NOP, 1'b1, 4'd3, 4'd4 ,18'd16};
mem[11] = {`NOP, 1'b1, 4'd3, 4'd4 ,18'd16};
mem[12] = {`SUB, 1'b1, 4'd2, 4'd3 ,18'd6}; // SUBi R2, R3, #6
mem[13] = {`NOP, 1'b0, 8'b0, 5'd6, 13'd0};
mem[14] = {`ADD, 1'b1, 4'd10, 4'd4 ,18'd16}; // ADDi, R10,R4, #16
mem[15] = {`NOP, 1'b0, 4'b0 ,4'd1, 4'd2 ,14'd16};
mem[16] = {`NOP, 1'b0, 4'b0 ,4'd3, 4'd4 ,14'd16};
mem[17] = {`NOP, 1'b0, 4'b0 ,4'd5, 4'd6 ,14'd16};
mem[18] = {`NOP, 1'b0, 4'b0 ,4'd7, 4'd8 ,14'd16};
mem[19] = {`NOP, 1'b0, 4'b0 ,4'd9, 4'd10 ,14'd16};
mem[20] = {`NOP, 1'b0, 4'b0 ,4'd11, 4'd12 ,14'd16};
mem[21] = {`NOP, 1'b0, 4'b0 ,4'd13, 4'd14 ,14'd16};
mem[22] = {`JMP, 1'b0, 4'd1, 4'd1 ,5'd14, 13'd16};
mem[23] = {`NOP, 1'b1, 4'd1, 4'd1 ,18'd16};
mem[24] = {`NOP, 1'b1, 4'd3, 4'd4 ,18'd16};
mem[25] = {`NOP, 1'b1, 4'd3, 4'd4 ,18'd16};
mem[26] = {`NOP, 1'b1, 4'd3, 4'd4 ,18'd16};
mem[27] = {`NOP, 1'b1, 4'd3, 4'd4 ,18'd16};
mem[28] = {`NOP, 1'b1, 4'd3, 4'd4 ,18'd16};
mem[29] = {`NOP, 1'b1, 4'd3, 4'd4 ,18'd16};
mem[30] = {`NOP, 1'b1, 4'd3, 4'd4 ,18'd16};
mem[31] = 32'b00000000000000000000000000000000;
///////// PROGRAM TWO
mem[0] = {`NOP, 1'b0, 4'b1, 4'd1, 18'd1600};
mem[1] = {`LDW, 1'b0, 4'b1, 4'd1, 18'd0}; // LWD R1,mem[1]
mem[2] = {`LDW, 1'b0, 4'd2, 4'd2, 18'd0}; // LDW R2,mem[2]
mem[3] = {`LDW, 1'b0, 4'd3, 4'd3, 18'd0}; // LDW R3,mem[3]
mem[4] = {`LDW, 1'b0, 4'd4, 4'd4, 18'd0}; // LDW R4,mem[4]
mem[5] = {`LDW, 1'b0, 4'd5, 4'd5, 5'd12, 13'd0}; // LDW R5,mem[5]
mem[6] = {`LDW, 1'b1, 4'd6, 4'bx, 18'd10}; // LWD R6,mem[6]
mem[7] = {`BRQ, 5'bx, 4'd1, 4'd6, 5'd15, 9'bx}; // BRQ R1, R6, INSTR_15
mem[8] = {`ADD, 1'b1, 4'd3, 4'd2, 18'd10}; // ADDi R3, R2, 10
mem[9] = {`MUL, 1'b1, 4'd4, 4'd5, 18'd3}; // MULi R4, R5, 3
mem[10] = {`NOP, 1'b1, 4'd3, 4'd4, 18'd16};
mem[11] = {`JMP, 1'b1, 12'bx, 5'd7, 9'bx}; // JMP INSTR_7
mem[12] = {`NOP, 27'bx};
mem[13] = {`NOP, 27'bx};
mem[14] = {`NOP, 27'bx};
mem[15] = {`STR, 1'b0, 4'd1 ,4'd1, 18'bx}; // STR mem[1], R1
mem[16] = {`STR, 1'b0, 4'd2 ,4'd2, 18'bx}; // STR mem[2], R2
mem[17] = {`STR, 1'b0, 4'd3 ,4'd3, 18'bx}; // STR mem[3], R3
mem[18] = {`STR, 1'b0, 4'd4 ,4'd4, 18'bx}; // STR mem[4], R4
mem[19] = {`STR, 1'b0, 4'd5 ,4'd5, 18'bx}; // STR mem[5], R5
mem[20] = {`NOP, 1'b0, 4'b0 ,4'd11, 4'd12 ,14'd16};
mem[21] = {`NOP, 1'b0, 4'b0 ,4'd13, 4'd14 ,14'd16};
mem[22] = {`NOP, 1'b0, 4'd1, 4'd1 ,5'd14, 13'd16};
mem[23] = {`NOP, 1'b1, 4'd1, 4'd1 ,18'd16};
mem[24] = {`NOP, 1'b1, 4'd3, 4'd4 ,18'd16};
mem[25] = {`NOP, 1'b1, 4'd3, 4'd4 ,18'd16};
mem[26] = {`NOP, 1'b1, 4'd3, 4'd4 ,18'd16};
mem[27] = {`NOP, 1'b1, 4'd3, 4'd4 ,18'd16};
mem[28] = {`NOP, 1'b1, 4'd3, 4'd4 ,18'd16};
mem[29] = {`NOP, 1'b1, 4'd3, 4'd4 ,18'd16};
mem[30] = {`NOP, 1'b1, 4'd3, 4'd4 ,18'd16};
mem[31] = 32'b00000000000000000000000000000000;
mem[0] = {`NOP, 1'b0, 4'b1, 4'd1, 18'd1600};
mem[1] = {`LDW, 1'b0, 4'b1, 4'd1, 18'd0}; // LWD R1,mem[1]
mem[2] = {`LDW, 1'b1, 4'd2, 4'd0, 18'd4}; // LDW R2,mem[2]
mem[3] = {`LDW, 1'b0, 4'd3, 4'd3, 18'd0}; // LDW R3,mem[3]
mem[4] = {`LDW, 1'b0, 4'd4, 4'd4, 18'd0}; // LDW R4,mem[4]
mem[5] = {`LDW, 1'b0, 4'd5, 4'd5, 5'd12, 13'd0}; // LDW R5,mem[5]
mem[6] = {`LDW, 1'b1, 4'd6, 4'b0, 18'd3}; // LWD R6,mem[6]
mem[10] = {`BRQ, 5'd0, 4'd1, 4'd2, 5'd15, 9'bx}; // BRQ R1, R6, INSTR_15
mem[11] = {`ADD, 1'b1, 4'd3, 4'd2, 18'd10}; // ADDi R3, R2, 10
mem[12] = {`MUL, 1'b1, 4'd4, 4'd5, 18'd3}; // MULi R4, R5, 3
mem[13] = {`SUB, 1'b1, 4'd1, 4'd0, 18'd1};
mem[14] = {`JMP, 1'b0, 12'bx, 5'd7, 9'bx}; // JMP INSTR_7
mem[7] = {`NOP, 27'bx};
mem[8] = {`NOP, 27'bx};
mem[9] = {`NOP, 27'bx};
mem[15] = {`STR, 1'b0, 4'd1 ,4'd1, 18'bx}; // STR mem[1], R1
mem[16] = {`STR, 1'b0, 4'd2 ,4'd2, 18'bx}; // STR mem[2], R2
mem[17] = {`STR, 1'b0, 4'd3 ,4'd3, 18'bx}; // STR mem[3], R3
mem[18] = {`STR, 1'b0, 4'd4 ,4'd4, 18'bx}; // STR mem[4], R4
mem[19] = {`STR, 1'b0, 4'd5 ,4'd5, 18'bx}; // STR mem[5], R5
mem[20] = {`NOP, 1'b0, 4'b0 ,4'd11, 4'd12 ,14'd16};
mem[21] = {`NOP, 1'b0, 4'b0 ,4'd13, 4'd14 ,14'd16};
mem[22] = {`NOP, 1'b0, 4'd1, 4'd1 ,5'd14, 13'd16};
mem[23] = {`NOP, 1'b1, 4'd1, 4'd1 ,18'd16};
mem[24] = {`NOP, 1'b1, 4'd3, 4'd4 ,18'd16};
mem[25] = {`NOP, 1'b1, 4'd3, 4'd4 ,18'd16};
mem[26] = {`NOP, 1'b1, 4'd3, 4'd4 ,18'd16};
mem[27] = {`NOP, 1'b1, 4'd3, 4'd4 ,18'd16};
mem[28] = {`NOP, 1'b1, 4'd3, 4'd4 ,18'd16};
mem[29] = {`NOP, 1'b1, 4'd3, 4'd4 ,18'd16};
mem[30] = {`NOP, 1'b1, 4'd3, 4'd4 ,18'd16};
mem[31] = 32'b00000000000000000000000000000000;