Skip to content

Commit c0df37e

Browse files
committed
branchign logic updated
1 parent 02f9734 commit c0df37e

File tree

6 files changed

+140
-113
lines changed

6 files changed

+140
-113
lines changed

pipelined/modules/id_ex_register.v

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@ module id_ex_register (
44
input wire clk,
55
input wire reset,
66
input wire en,
7-
input wire [230:0] d,
8-
output reg [230:0] q
7+
input wire [295:0] d,
8+
output reg [295:0] q
99
);
1010

1111
always @(posedge clk or posedge reset) begin
1212
if (reset)
13-
q <= {231{1'b0}};
13+
q <= {296{1'b0}};
1414
else if (en)
1515
q <= d;
1616
end

pipelined/modules/if_id_register.v

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@ module if_id_register (
44
input wire clk,
55
input wire reset,
66
input wire en,
7-
input wire [96:0] d,
8-
output reg [96:0] q
7+
input wire [161:0] d,
8+
output reg [161:0] q
99
);
1010

1111
always @(posedge clk or posedge reset) begin
1212
if (reset)
13-
q <= {97{1'b0}};
13+
q <= {162{1'b0}};
1414
else if (en)
1515
q <= d;
1616
end

pipelined/testcases/6.s

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,8 @@
1-
begin:
2-
addi x1, x0, 10
3-
addi x2, x1, 5
4-
addi x3, x1, 20
5-
add x4, x2, x3
6-
addi x5, x4, 5
7-
addi x6, x0, 100
8-
sub x7, x5, x6
9-
nop
1+
begin:
2+
addi x1, x0, 5
3+
addi x2, x1, 1
4+
add x3, x0, x1
5+
addi x4, x1, 1
6+
107
end:
11-
nop
12-
8+
nop

pipelined/testcases/7.s

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ begin:
33
addi x7, x0, 4
44
addi x8, x0, 5
55
addi x9, x0, 6
6+
addi x10, x0 , 10
67

78
L1:
89
addi x5, x0, 4

0 commit comments

Comments
 (0)