[otbn] Use relative scope names for OTBN scopes
This isn't particularly interesting for otbn_top_sim, but it's a lot
nicer in otbn.sv (where we instantiate the model), because we no
longer need to know the exact path where otbn is instantiated in the
design.
Signed-off-by: Rupert Swarbrick <rswarbrick@lowrisc.org>
diff --git a/hw/ip/otbn/dv/verilator/otbn_top_sim.sv b/hw/ip/otbn/dv/verilator/otbn_top_sim.sv
index 22ae55e..e6d3beb 100644
--- a/hw/ip/otbn/dv/verilator/otbn_top_sim.sv
+++ b/hw/ip/otbn/dv/verilator/otbn_top_sim.sv
@@ -179,8 +179,8 @@
// This runs in parallel with the real core above. Eventually, we'll have strong consistency
// checks between the two. For now, we just check that they have the same "done" signals.
- localparam string ImemScope = "TOP.otbn_top_sim.u_imem.u_mem.gen_generic.u_impl_generic";
- localparam string DmemScope = "TOP.otbn_top_sim.u_dmem.u_mem.gen_generic.u_impl_generic";
+ localparam string ImemScope = "..u_imem.u_mem.gen_generic.u_impl_generic";
+ localparam string DmemScope = "..u_dmem.u_mem.gen_generic.u_impl_generic";
logic otbn_model_done;
diff --git a/hw/ip/otbn/rtl/otbn.sv b/hw/ip/otbn/rtl/otbn.sv
index dfd115e..6c825b7 100644
--- a/hw/ip/otbn/rtl/otbn.sv
+++ b/hw/ip/otbn/rtl/otbn.sv
@@ -424,8 +424,8 @@
assign busy_d = (busy_q | start) & ~done;
if (OTBNModel) begin : gen_impl_model
- localparam ImemScope = "TOP.top_earlgrey_verilator.top_earlgrey.u_otbn.u_imem.u_mem.gen_generic.u_impl_generic";
- localparam DmemScope = "TOP.top_earlgrey_verilator.top_earlgrey.u_otbn.u_dmem.u_mem.gen_generic.u_impl_generic";
+ localparam ImemScope = "..u_imem.u_mem.gen_generic.u_impl_generic";
+ localparam DmemScope = "..u_dmem.u_mem.gen_generic.u_impl_generic";
otbn_core_model #(
.DmemSizeByte(DmemSizeByte),