Skip to content

Commit 14a52e6

Browse files
committed
[dv] Remove the IfName parameter from clk_rst_if
Having the parameter is problematic because it's not technically correct to assign one of these interfaces to a variable of type "virtual clk_rst_if". It turns out that there is exactly on place where the parameter is supplied (and copy-pasted into Darjeeling). I think this change will have no effect. In particular, there are no hits when searching for "ExtClkDriver". The only use I can find for IfName in this interface is the computation of msg_id. These identifiers will already be distinct (and hopefully helpfully named) because they are derived with %m. Signed-off-by: Rupert Swarbrick <rswarbrick@lowrisc.org>
1 parent 697c06a commit 14a52e6

File tree

3 files changed

+4
-7
lines changed

3 files changed

+4
-7
lines changed

hw/dv/sv/common_ifs/clk_rst_if.sv

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,7 @@
1212
// inout clk
1313
// inout rst_n
1414

15-
interface clk_rst_if #(
16-
parameter string IfName = "main"
17-
) (
15+
interface clk_rst_if (
1816
inout clk,
1917
inout rst_n
2018
);
@@ -101,8 +99,7 @@ interface clk_rst_if #(
10199
// If true, this is the only clock in the system; there is no need to add initial jitter.
102100
bit sole_clock = 1'b0;
103101

104-
// use IfName as a part of msgs to indicate which clk_rst_vif instance
105-
string msg_id = $sformatf("[%m(clk_rst_if):%s]", IfName);
102+
string msg_id = $sformatf("[%m(clk_rst_if)]");
106103

107104
clocking cb @(posedge clk);
108105
endclocking

hw/top_darjeeling/dv/env/chip_if.sv

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -463,7 +463,7 @@ interface chip_if;
463463
// Functional (muxed) interface: external clock source.
464464
//
465465
// The reset port is passive only.
466-
clk_rst_if#("ExtClkDriver") ext_clk_if(
466+
clk_rst_if ext_clk_if(
467467
.clk (mios[top_darjeeling_pkg::MioPadMio11]),
468468
.rst_n(dios[top_darjeeling_pkg::DioPadPorN])
469469
);

hw/top_earlgrey/dv/env/chip_if.sv

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -620,7 +620,7 @@ interface chip_if;
620620
// Functional (muxed) interface: external clock source.
621621
//
622622
// The reset port is passive only.
623-
clk_rst_if#("ExtClkDriver") ext_clk_if(
623+
clk_rst_if ext_clk_if(
624624
.clk (mios[top_earlgrey_pkg::MioPadIoc6]),
625625
.rst_n(dios[top_earlgrey_pkg::DioPadPorN])
626626
);

0 commit comments

Comments
 (0)