@@ -31,7 +31,7 @@ module VX_opc_unit import VX_gpu_pkg::*; #(
31
31
input reg [`UP (`NUM_OPCS - 1 )- 1 : 0 ][NUM_REGS - 1 : 0 ] pending_regs_in,
32
32
33
33
output wire [ISSUE_WIS_W - 1 : 0 ] pending_wis,
34
- output reg [NUM_REGS - 1 : 0 ] pending_regs,
34
+ output wire [NUM_REGS - 1 : 0 ] pending_regs,
35
35
36
36
VX_scoreboard_if.slave scoreboard_if,
37
37
VX_gpr_if.master gpr_if,
@@ -59,10 +59,8 @@ module VX_opc_unit import VX_gpu_pkg::*; #(
59
59
wire [SIMD_IDX_W - 1 : 0 ] simd_pid;
60
60
wire simd_sop, simd_eop;
61
61
62
- VX_elastic_buffer # (
63
- .DATAW (SCB_DATAW ),
64
- .SIZE (2 ),
65
- .OUT_REG (1 )
62
+ VX_pipe_buffer # (
63
+ .DATAW (SCB_DATAW )
66
64
) stanging_buf (
67
65
.clk (clk),
68
66
.reset (reset),
@@ -185,28 +183,30 @@ module VX_opc_unit import VX_gpu_pkg::*; #(
185
183
186
184
// output pending reqs
187
185
assign pending_wis = staging_if.data.wis;
186
+ reg [NUM_REGS - 1 : 0 ] pending_regs_r;
188
187
always @ (* ) begin
189
- pending_regs = '0 ;
188
+ pending_regs_r = '0 ;
190
189
for (integer i = 0 ; i < NUM_SRC_OPDS ; ++ i) begin
191
- if (opds_busy [i]) begin
192
- pending_regs [src_regs[i]] = 1 ;
190
+ if (staging_if.data.used_rs [i]) begin
191
+ pending_regs_r [src_regs[i]] = staging_if.valid ;
193
192
end
194
193
end
195
194
end
195
+ assign pending_regs = pending_regs_r;
196
196
197
197
// WAR dependency check
198
- reg [NUM_REGS - 1 : 0 ] opc_pending_regs ;
198
+ reg [NUM_REGS - 1 : 0 ] other_pending_regs ;
199
199
always @ (* ) begin
200
- opc_pending_regs = '0 ;
200
+ other_pending_regs = '0 ;
201
201
for (integer i = 0 ; i < `NUM_OPCS - 1 ; ++ i) begin
202
- opc_pending_regs | = pending_regs_in[i] & { NUM_REGS { pending_wis_in[i] == staging_if.data.wis}} ;
202
+ other_pending_regs = other_pending_regs | pending_regs_in[i] & { NUM_REGS { staging_if.data.wis == pending_wis_in[i] }} ;
203
203
end
204
204
end
205
- wire war_dp_check = (opc_pending_regs [rd] = = 0 );
205
+ wire war_dp_check = staging_if.data.wb && (other_pending_regs [rd] ! = 0 );
206
206
207
207
wire output_ready_w;
208
- assign output_ready = output_ready_w && war_dp_check;
209
- wire output_valid = (state == STATE_DISPATCH ) && war_dp_check;
208
+ assign output_ready = output_ready_w && ~ war_dp_check;
209
+ wire output_valid = (state == STATE_DISPATCH ) && ~ war_dp_check;
210
210
211
211
// simd iterator
212
212
VX_nz_iterator # (
0 commit comments