@@ -112,6 +112,7 @@ module multi_warp_dispatcher import bgpu_pkg::*; #(
112112 } disp_data_t ;
113113
114114 typedef logic [WritebackWidth- 1 : 0 ] eu_valid_vec_t ;
115+ typedef logic [ DispatchWidth- 1 : 0 ] opc_valid_vec_t ;
115116
116117 // #######################################################################################
117118 // # Signals #
@@ -136,8 +137,8 @@ module multi_warp_dispatcher import bgpu_pkg::*; #(
136137 fetch_mask_t [NumWarps- 1 : 0 ] dec_decoded_unused_ibe;
137138
138139 // OPC EU Handshake Demultiplexer
139- warp_mask_t opc_eu_handshake_warp;
140- tag_t [NumWarps - 1 : 0 ] opc_eu_tag;
140+ opc_valid_vec_t [ NumWarps - 1 : 0 ] opc_eu_handshake_warp;
141+ tag_t [DispatchWidth - 1 : 0 ] opc_eu_tag;
141142
142143 // #######################################################################################
143144 // # Dispatcher per warp #
@@ -181,16 +182,20 @@ module multi_warp_dispatcher import bgpu_pkg::*; #(
181182 // OPC EU Handshake Demultiplexer
182183 always_comb begin
183184 opc_eu_handshake_warp = '0 ;
184- opc_eu_tag = '0 ;
185- for (int didx = 0 ; didx < DispatchWidth; didx++ ) begin
186- if (opc_eu_handshake_i[didx]) begin
187- opc_eu_handshake_warp[opc_eu_tag_i[didx][WidWidth- 1 : 0 ]] = 1'b1 ;
188- opc_eu_tag[opc_eu_tag_i[didx][WidWidth- 1 : 0 ]] =
189- opc_eu_tag_i[didx][WidWidth+ : TagWidth];
185+ for (int warp = 0 ; warp < NumWarps; warp++ ) begin
186+ for (int didx = 0 ; didx < DispatchWidth; didx++ ) begin
187+ opc_eu_handshake_warp[warp][didx] =
188+ opc_eu_handshake_i[didx]
189+ && (opc_eu_tag_i[didx][WidWidth- 1 : 0 ] == warp[WidWidth- 1 : 0 ]);
190190 end
191191 end
192192 end
193193
194+ // Extract OPC EU Tags
195+ for (genvar didx = 0 ; didx < DispatchWidth; didx++ ) begin : gen_opc_eu_tags
196+ assign opc_eu_tag[didx] = opc_eu_tag_i[didx][WidWidth+ : TagWidth];
197+ end : gen_opc_eu_tags
198+
194199 // Extract EU Tags
195200 for (genvar wb = 0 ; wb < WritebackWidth; wb++ ) begin : gen_eu_tags
196201 assign eu_tag[wb] = eu_tag_i[wb][WidWidth+ : TagWidth];
@@ -207,13 +212,14 @@ module multi_warp_dispatcher import bgpu_pkg::*; #(
207212 // Dispatcher per Warp
208213 for (genvar warp = 0 ; warp < NumWarps; warp++ ) begin : gen_dispatcher
209214 dispatcher # (
210- .FetchWidth ( FetchWidth ),
211- .WritebackWidth ( WritebackWidth ),
212- .NumTags ( NumTags ),
213- .PcWidth ( PcWidth ),
214- .WarpWidth ( WarpWidth ),
215- .RegIdxWidth ( RegIdxWidth ),
216- .OperandsPerInst ( OperandsPerInst )
215+ .FetchWidth ( FetchWidth ),
216+ .DispatchWidth ( DispatchWidth ),
217+ .WritebackWidth ( WritebackWidth ),
218+ .NumTags ( NumTags ),
219+ .PcWidth ( PcWidth ),
220+ .WarpWidth ( WarpWidth ),
221+ .RegIdxWidth ( RegIdxWidth ),
222+ .OperandsPerInst ( OperandsPerInst )
217223 ) i_dispatcher (
218224 .clk_i ( clk_i ),
219225 .rst_ni ( rst_ni ),
@@ -248,7 +254,7 @@ module multi_warp_dispatcher import bgpu_pkg::*; #(
248254 .disp_operands_o ( arb_in_data [warp].operands ),
249255
250256 .opc_eu_handshake_i ( opc_eu_handshake_warp[warp] ),
251- .opc_eu_tag_i ( opc_eu_tag [warp] ),
257+ .opc_eu_tag_i ( opc_eu_tag ),
252258
253259 .eu_valid_i ( eu_valid[warp] ),
254260 .eu_tag_i ( eu_tag )
@@ -267,10 +273,10 @@ module multi_warp_dispatcher import bgpu_pkg::*; #(
267273 rr_arb_tree # (
268274 .DataType ( disp_data_t ),
269275 .NumIn ( NumWarps ),
270- .ExtPrio ( 1'b0 ),
271- .AxiVldRdy ( 1'b0 ),
272- .LockIn ( 1'b0 ),
273- .FairArb ( 1'b1 )
276+ .ExtPrio ( 1'b0 ),
277+ .AxiVldRdy ( 1'b0 ),
278+ .LockIn ( 1'b0 ),
279+ .FairArb ( 1'b1 )
274280 ) i_rr_arb (
275281 .clk_i ( clk_i ),
276282 .rst_ni ( rst_ni ),
@@ -308,13 +314,6 @@ module multi_warp_dispatcher import bgpu_pkg::*; #(
308314 for (genvar other_didx = 0 ; other_didx < DispatchWidth; other_didx++ )
309315 begin : gen_out_asserts_inner
310316 if (didx != other_didx) begin : gen_diff_didx
311- // Check for OPC EU Handshake for the same warp received on multiple dispatch outputs
312- assert property (@ (posedge clk_i) disable iff (! rst_ni)
313- (opc_eu_handshake_i[didx] && opc_eu_handshake_i[other_didx]
314- - > opc_eu_tag_i[didx][WidWidth- 1 : 0 ]
315- != opc_eu_tag_i[other_didx][WidWidth- 1 : 0 ]))
316- else $error (" OPC EU Handshake for the same warp received!" );
317-
318317 // Check that no two dispatch outputs dispatch to the same warp in the same cycle
319318 assert property (@ (posedge clk_i) disable iff (! rst_ni)
320319 (disp_valid_o[didx] && opc_ready_i[didx] && disp_valid_o[other_didx]
0 commit comments