File tree 3 files changed +7
-8
lines changed
3 files changed +7
-8
lines changed Original file line number Diff line number Diff line change @@ -5,6 +5,8 @@ module serv_bufreg2
5
5
input wire i_en,
6
6
input wire i_init,
7
7
input wire i_cnt7,
8
+ input wire i_cnt_done,
9
+ input wire i_sh_right,
8
10
input wire [1 :0 ] i_lsb,
9
11
input wire [1 :0 ] i_bytecnt,
10
12
output wire o_sh_done,
@@ -42,7 +44,7 @@ module serv_bufreg2
42
44
43
45
wire shift_en = i_shift_op ? (i_en & i_init & (i_bytecnt == 2'b00 )) : (i_en & byte_valid);
44
46
45
- wire cnt_en = (i_shift_op & ! i_init);
47
+ wire cnt_en = (i_shift_op & ( ! i_init | (i_cnt_done & i_sh_right)) );
46
48
47
49
/* The dat register has three different use cases for store, load and
48
50
shift operations.
Original file line number Diff line number Diff line change @@ -59,7 +59,6 @@ module serv_state
59
59
input wire i_rf_ready,
60
60
output wire o_rf_rd_en);
61
61
62
- reg stage_two_req;
63
62
reg init_done;
64
63
wire misalign_trap_sync;
65
64
@@ -101,7 +100,7 @@ module serv_state
101
100
// Right shift. o_sh_done
102
101
// Mem ops. i_dbus_ack
103
102
// MDU ops. i_mdu_ready
104
- assign o_rf_wreq = (i_shift_op & (i_sh_right ? (i_sh_done & ! o_cnt_en & init_done) : last_init)) |
103
+ assign o_rf_wreq = (i_shift_op & (i_sh_right ? (i_sh_done & (last_init | ! o_cnt_en & init_done) ) : last_init)) |
105
104
i_dbus_ack | (MDU & i_mdu_ready) |
106
105
(i_branch_op & (last_init & ! trap_pending)) |
107
106
(i_rd_alu_en & i_alu_rd_sel1 & last_init);
@@ -126,7 +125,7 @@ module serv_state
126
125
for the first cycle after init). Shift out during phase 2
127
126
*/
128
127
129
- assign o_bufreg_en = (o_cnt_en & (o_init | ((o_ctrl_trap | i_branch_op) & i_two_stage_op))) | (i_shift_op & init_done & (i_sh_right ? ! stage_two_req : i_sh_done));
128
+ assign o_bufreg_en = (o_cnt_en & (o_init | ((o_ctrl_trap | i_branch_op) & i_two_stage_op))) | (i_shift_op & init_done & (i_sh_right | i_sh_done));
130
129
131
130
assign o_ibus_cyc = ibus_cyc & ! i_rst;
132
131
@@ -152,14 +151,10 @@ module serv_state
152
151
o_ctrl_jump <= o_init & take_branch;
153
152
end
154
153
155
- // Need a strobe for the first cycle in the IDLE state after INIT
156
- stage_two_req <= o_cnt_done & o_init;
157
-
158
154
if (i_rst) begin
159
155
if (RESET_STRATEGY != "NONE" ) begin
160
156
init_done <= 1'b0 ;
161
157
o_ctrl_jump <= 1'b0 ;
162
- stage_two_req <= 1'b0 ;
163
158
end
164
159
end
165
160
end
Original file line number Diff line number Diff line change @@ -400,6 +400,8 @@ module serv_top
400
400
.i_en (cnt_en),
401
401
.i_init (init),
402
402
.i_cnt7 (cnt7),
403
+ .i_cnt_done (cnt_done),
404
+ .i_sh_right (sh_right),
403
405
.i_lsb (lsb),
404
406
.i_bytecnt (mem_bytecnt),
405
407
.o_sh_done (sh_done),
You can’t perform that action at this time.
0 commit comments