Skip to content

Commit 06f44d0

Browse files
committed
[hw,pwrmgr,dv] Determine clk ratio in assertion based on top
Signed-off-by: Robert Schilling <[email protected]>
1 parent 80590e0 commit 06f44d0

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

hw/ip_templates/pwrmgr/dv/sva/pwrmgr_rstreqs_sva_if.sv renamed to hw/ip_templates/pwrmgr/dv/sva/pwrmgr_rstreqs_sva_if.sv.tpl

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,14 @@ interface pwrmgr_rstreqs_sva_if
3333
// The timing of the escalation reset is determined by the slow clock, but will not propagate if
3434
// the non-slow clock is off. We use the regular clock and multiply the clock cycles times the
3535
// clock ratio.
36+
% if topname in ["earlgrey", "englishbreakfast"]:
3637
localparam int FastToSlowFreqRatio = 120;
38+
% elif topname == "darjeeling":
39+
// Darjeeling has a 16x clock ratio between the slow and fast clocks. (1GHz / 62.5MHz = 16)
40+
localparam int FastToSlowFreqRatio = 16;
41+
% else:
42+
<% assert False, f"Unsupported top: {topname}" %>\
43+
% endif
3744

3845
localparam int MinEscRstCycles = 0;
3946
localparam int MaxEscRstCycles = 4 * FastToSlowFreqRatio;

hw/top_darjeeling/ip_autogen/pwrmgr/dv/sva/pwrmgr_rstreqs_sva_if.sv

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,8 @@ interface pwrmgr_rstreqs_sva_if
3333
// The timing of the escalation reset is determined by the slow clock, but will not propagate if
3434
// the non-slow clock is off. We use the regular clock and multiply the clock cycles times the
3535
// clock ratio.
36-
localparam int FastToSlowFreqRatio = 120;
36+
// Darjeeling has a 16x clock ratio between the slow and fast clocks. (1GHz / 62.5MHz = 16)
37+
localparam int FastToSlowFreqRatio = 16;
3738

3839
localparam int MinEscRstCycles = 0;
3940
localparam int MaxEscRstCycles = 4 * FastToSlowFreqRatio;

0 commit comments

Comments
 (0)