Skip to content

Commit bd7ad85

Browse files
author
Maurus Item
committed
Fixed lock width passing to opgroup.
1 parent ce009bc commit bd7ad85

File tree

2 files changed

+20
-7
lines changed

2 files changed

+20
-7
lines changed

src/fpnew_opgroup_block.sv

+10-3
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ module fpnew_opgroup_block #(
2828
parameter logic TrueSIMDClass = 1'b0,
2929
parameter logic CompressedVecCmpResult = 1'b0,
3030
parameter fpnew_pkg::rsr_impl_t StochasticRndImplementation = fpnew_pkg::DEFAULT_NO_RSR,
31+
parameter int unsigned LockRepetition = 1,
3132
// Do not change
3233
localparam int unsigned NUM_FORMATS = fpnew_pkg::NUM_FP_FORMATS,
3334
localparam int unsigned NUM_OPERANDS = fpnew_pkg::num_operands(OpGroup),
@@ -61,7 +62,7 @@ module fpnew_opgroup_block #(
6162
// Output handshake
6263
output logic out_valid_o,
6364
input logic out_ready_i,
64-
input logic out_lock_i,
65+
input logic [LockRepetition-1:0] out_lock_i,
6566
// Indication of valid data in flight
6667
output logic busy_o
6768
);
@@ -223,15 +224,21 @@ module fpnew_opgroup_block #(
223224
// ------------------
224225
output_t arbiter_output;
225226

227+
logic [LockRepetition-1:0] flush;
228+
for (genvar r = 0; r < LockRepetition; r++) begin: gen_rr_flush
229+
assign flush[r] = flush_i;
230+
end
231+
226232
// Round-Robin arbiter to decide which result to use
227233
rr_arb_tree_lock #(
228234
.NumIn ( NUM_FORMATS ),
229235
.DataType ( output_t ),
230-
.AxiVldRdy ( 1'b1 )
236+
.AxiVldRdy ( 1'b1 ),
237+
.InternalRedundancy ( LockRepetition > 1 )
231238
) i_arbiter (
232239
.clk_i,
233240
.rst_ni,
234-
.flush_i,
241+
.flush_i ( flush ),
235242
.rr_i ( '0 ),
236243
.lock_rr_i ( out_lock_i ),
237244
.req_i ( fmt_out_valid ),

src/fpnew_top.sv

+10-4
Original file line numberDiff line numberDiff line change
@@ -310,8 +310,8 @@ module fpnew_top #(
310310
logic [NUM_OPGROUPS-1:0] in_opgrp_ready, out_opgrp_valid, out_opgrp_ready, out_opgrp_ext, opgrp_busy;
311311
rr_stacked_t [NUM_OPGROUPS-1:0] out_opgrp_data;
312312

313-
localparam int REP = RedundancyFeatures.TripplicateRepetition ? 3 : 1;
314-
logic [REP-1:0] out_rr_lock;
313+
localparam int LockRepetition = RedundancyFeatures.TripplicateRepetition ? 3 : 1;
314+
logic [LockRepetition-1:0] out_rr_lock;
315315

316316
logic [NUM_FORMATS-1:0][NUM_OPERANDS-1:0] is_boxed;
317317

@@ -372,7 +372,8 @@ module fpnew_top #(
372372
.TagType ( submodules_stacked_t ),
373373
.TrueSIMDClass ( TrueSIMDClass ),
374374
.CompressedVecCmpResult ( CompressedVecCmpResult ),
375-
.StochasticRndImplementation ( StochasticRndImplementation )
375+
.StochasticRndImplementation ( StochasticRndImplementation ),
376+
.LockRepetition (LockRepetition)
376377
) i_opgroup_block (
377378
.clk_i,
378379
.rst_ni,
@@ -412,6 +413,11 @@ module fpnew_top #(
412413
logic out_redundant_valid, out_redundant_ready;
413414
rr_stacked_t out_redundant_data;
414415

416+
logic [LockRepetition-1:0] flush;
417+
for (genvar r = 0; r < LockRepetition; r++) begin: gen_rr_flush
418+
assign flush[r] = flush_i;
419+
end
420+
415421
// Round-Robin arbiter to decide which result to use
416422
rr_arb_tree_lock #(
417423
.NumIn ( NUM_OPGROUPS ),
@@ -422,7 +428,7 @@ module fpnew_top #(
422428
) i_arbiter (
423429
.clk_i,
424430
.rst_ni,
425-
.flush_i,
431+
.flush_i ( flush ),
426432
.rr_i ( '0 ),
427433
.lock_rr_i ( out_rr_lock ),
428434
.req_i ( out_opgrp_valid ),

0 commit comments

Comments
 (0)