Skip to content

Commit bfa2753

Browse files
author
Maurus Item
committed
Updated Redundancy Cells dependency and used new features.
1 parent 502d10d commit bfa2753

File tree

3 files changed

+35
-15
lines changed

3 files changed

+35
-15
lines changed

Bender.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ package:
88
dependencies:
99
common_cells: {git: "https://github.com/pulp-platform/common_cells.git", version: 1.21.0}
1010
fpu_div_sqrt_mvp: {git: "https://github.com/pulp-platform/fpu_div_sqrt_mvp.git", version: 1.0.4}
11-
redundancy_cells: { git: "[email protected]:Lynx005F/redundancy_cells.git", rev: d1bc37491a9ca17383ded5c17eb2f40a6e42674a}
11+
redundancy_cells: { git: "[email protected]:Lynx005F/redundancy_cells.git", rev: 68e741c2628db25825d0545de7f13fc0366e3854}
1212

1313
sources:
1414
- src/fpnew_pkg.sv

src/fpnew_pkg.sv

+6-5
Original file line numberDiff line numberDiff line change
@@ -327,11 +327,12 @@ package fpnew_pkg;
327327

328328
// Different kinds of Redundancy that might be used
329329
typedef enum logic [2:0] {
330-
NONE, // No redundancy module is generated - redundancy can not be enabled
331-
TMR_FAST, // Operands will be tripplicated in time - if nothing goes wrong output after 2 cycles (longer critical path)
332-
TMR_SMALL, // Operands will be tripplicated in time - always output after 3 cycles (shorter critical path)
333-
DMR, // Operands will be duplicated in time and are retried on failure
334-
DMR_INORDER // Operands will be duplicated in time and are retried on failure - always keeps the order of outputs the same
330+
NONE, // No redundancy module is generated - redundancy can not be enabled
331+
TMR_FAST, // Operands will be tripplicated in time - if nothing goes wrong output after 2 cycles (longer critical path)
332+
TMR_SMALL, // Operands will be tripplicated in time - always output after 3 cycles (shorter critical path)
333+
DMR, // Operands will be duplicated in time and are retried on failure
334+
DMR_INORDER, // Operands will be duplicated in time and are retried on failure - always keeps the order of outputs the same
335+
TMR_TINY // Operands will be tripplicated in time, storage is deferred to handshake (might cause stalls)
335336
} redundancy_type_t;
336337

337338
// FPU configuration: redundancy

src/fpnew_top.sv

+28-9
Original file line numberDiff line numberDiff line change
@@ -83,8 +83,13 @@ module fpnew_top #(
8383
$clog2(MAX_DELAY) +
8484
// In case of a TMR approach we add extra ID Bits for the Division since it can take up to 12 cycles
8585
// For DMR this is not needed as we stall the unit instead
86-
((RedundancyFeatures.RedundancyType == fpnew_pkg::TMR_FAST || RedundancyFeatures.RedundancyType == fpnew_pkg::TMR_SMALL)
87-
&& fpnew_pkg::division_enabled(Implementation.UnitTypes)
86+
(
87+
(
88+
RedundancyFeatures.RedundancyType == fpnew_pkg::TMR_FAST ||
89+
RedundancyFeatures.RedundancyType == fpnew_pkg::TMR_SMALL ||
90+
RedundancyFeatures.RedundancyType == fpnew_pkg::TMR_TINY
91+
) &&
92+
fpnew_pkg::division_enabled(Implementation.UnitTypes)
8893
) ? 4 : 0
8994
);
9095

@@ -162,7 +167,11 @@ module fpnew_top #(
162167
// Stall Handshake when a division is going on and DMR is enabled
163168
logic division_stall;
164169

165-
if (RedundancyFeatures.RedundancyType == fpnew_pkg::TMR_FAST || RedundancyFeatures.RedundancyType == fpnew_pkg::TMR_SMALL) begin: gen_no_division_stall
170+
if (
171+
RedundancyFeatures.RedundancyType == fpnew_pkg::TMR_FAST ||
172+
RedundancyFeatures.RedundancyType == fpnew_pkg::TMR_SMALL ||
173+
RedundancyFeatures.RedundancyType == fpnew_pkg::TMR_TINY
174+
) begin: gen_no_division_stall
166175
assign division_stall = 0;
167176
end else begin: gen_division_stall
168177
logic division_busy_q;
@@ -206,11 +215,16 @@ module fpnew_top #(
206215
assign retry_ready = fpnew_pkg::DONT_CARE;
207216
assign retry_replacement_id = fpnew_pkg::DONT_CARE;
208217

209-
end else if (RedundancyFeatures.RedundancyType == fpnew_pkg::TMR_FAST || RedundancyFeatures.RedundancyType == fpnew_pkg::TMR_SMALL) begin: gen_in_tmr
218+
end else if (
219+
RedundancyFeatures.RedundancyType == fpnew_pkg::TMR_FAST ||
220+
RedundancyFeatures.RedundancyType == fpnew_pkg::TMR_SMALL ||
221+
RedundancyFeatures.RedundancyType == fpnew_pkg::TMR_TINY
222+
) begin: gen_in_tmr
210223
time_TMR_start #(
211-
.DataType ( tmr_in_stacked_t ),
212-
.IDSize ( ID_SIZE ),
213-
.InternalRedundancy ( RedundancyFeatures.TripplicateRepetition )
224+
.DataType ( tmr_in_stacked_t ),
225+
.IDSize ( ID_SIZE ),
226+
.InternalRedundancy ( RedundancyFeatures.TripplicateRepetition ),
227+
.EarlyReadyEnable ( (RedundancyFeatures.RedundancyType != fpnew_pkg::TMR_TINY) ? 1 : 0 )
214228
) i_time_TMR_start (
215229
.clk_i,
216230
.rst_ni,
@@ -274,7 +288,8 @@ module fpnew_top #(
274288
.DataType ( tmr_in_stacked_t ),
275289
.IDSize ( ID_SIZE ),
276290
.InternalRedundancy ( RedundancyFeatures.TripplicateRepetition ),
277-
.UseExternalId ( 1 )
291+
.UseExternalId ( 1 ),
292+
.EarlyReadyEnable ( 1 ) // Low area overhead, always enable (If retry gets it as feature remove here)
278293
) i_time_DMR_start (
279294
.clk_i,
280295
.rst_ni,
@@ -439,7 +454,11 @@ module fpnew_top #(
439454
assign retry_valid = fpnew_pkg::DONT_CARE;
440455
assign retry_lock = fpnew_pkg::DONT_CARE;
441456

442-
end else if (RedundancyFeatures.RedundancyType == fpnew_pkg::TMR_FAST || RedundancyFeatures.RedundancyType == fpnew_pkg::TMR_SMALL) begin : gen_out_tmr
457+
end else if (
458+
RedundancyFeatures.RedundancyType == fpnew_pkg::TMR_FAST ||
459+
RedundancyFeatures.RedundancyType == fpnew_pkg::TMR_SMALL ||
460+
RedundancyFeatures.RedundancyType == fpnew_pkg::TMR_TINY
461+
) begin : gen_out_tmr
443462
time_TMR_end #(
444463
.DataType ( tmr_out_stacked_t ),
445464
.LockTimeout ( LOCK_TIMEOUT ),

0 commit comments

Comments
 (0)