From bb765e6ae3c130ba01bcb4842dde4e5dd105b67d Mon Sep 17 00:00:00 2001 From: Alex Mykyta Date: Sat, 25 Oct 2025 17:24:57 -0700 Subject: [PATCH] Add 's_' prefix to OBI port for consistency with all other cpuifs --- src/peakrdl_regblock/cpuif/obi/__init__.py | 6 +-- tests/lib/cpuifs/obi/tb_inst.sv | 52 +++++++++++----------- 2 files changed, 29 insertions(+), 29 deletions(-) diff --git a/src/peakrdl_regblock/cpuif/obi/__init__.py b/src/peakrdl_regblock/cpuif/obi/__init__.py index 98a856e..d92f000 100644 --- a/src/peakrdl_regblock/cpuif/obi/__init__.py +++ b/src/peakrdl_regblock/cpuif/obi/__init__.py @@ -8,10 +8,10 @@ class OBI_Cpuif(CpuifBase): @property def port_declaration(self) -> str: - return "obi_intf.subordinate obi" + return "obi_intf.subordinate s_obi" def signal(self, name: str) -> str: - return "obi." + name + return "s_obi." + name @property def regblock_latency(self) -> int: @@ -51,7 +51,7 @@ class OBI_Cpuif_flattened(OBI_Cpuif): return ",\n".join(lines) def signal(self, name: str) -> str: - return "obi_" + name + return "s_obi_" + name @property def parameters(self) -> List[str]: diff --git a/tests/lib/cpuifs/obi/tb_inst.sv b/tests/lib/cpuifs/obi/tb_inst.sv index f2ab297..6a723c1 100644 --- a/tests/lib/cpuifs/obi/tb_inst.sv +++ b/tests/lib/cpuifs/obi/tb_inst.sv @@ -2,40 +2,40 @@ obi_intf #( .DATA_WIDTH({{exporter.cpuif.data_width}}), .ADDR_WIDTH({{exporter.cpuif.addr_width}}) -) obi(); +) s_obi(); obi_intf_driver #( .DATA_WIDTH({{exporter.cpuif.data_width}}), .ADDR_WIDTH({{exporter.cpuif.addr_width}}) ) cpuif ( .clk(clk), .rst(rst), - .m_obi(obi) + .m_obi(s_obi) ); {% if type(cpuif).__name__.startswith("Flat") %} {% sv_line_anchor %} -wire obi_req; -wire obi_gnt; -wire [{{exporter.cpuif.addr_width - 1}}:0] obi_addr; -wire obi_we; -wire [{{exporter.cpuif.data_width_bytes - 1}}:0] obi_be; -wire [{{exporter.cpuif.data_width - 1}}:0] obi_wdata; -wire [0:0] obi_aid; -wire obi_rvalid; -wire obi_rready; -wire [{{exporter.cpuif.data_width - 1}}:0] obi_rdata; -wire obi_err; -wire [0:0] obi_rid; -assign obi_req = obi.req; -assign obi.gnt = obi_gnt; -assign obi_addr = obi.addr; -assign obi_we = obi.we; -assign obi_be = obi.be; -assign obi_wdata = obi.wdata; -assign obi_aid = obi.aid; -assign obi.rvalid = obi_rvalid; -assign obi_rready = obi.rready; -assign obi.rdata = obi_rdata; -assign obi.err = obi_err; -assign obi.rid = obi_rid; +wire s_obi_req; +wire s_obi_gnt; +wire [{{exporter.cpuif.addr_width - 1}}:0] s_obi_addr; +wire s_obi_we; +wire [{{exporter.cpuif.data_width_bytes - 1}}:0] s_obi_be; +wire [{{exporter.cpuif.data_width - 1}}:0] s_obi_wdata; +wire [0:0] s_obi_aid; +wire s_obi_rvalid; +wire s_obi_rready; +wire [{{exporter.cpuif.data_width - 1}}:0] s_obi_rdata; +wire s_obi_err; +wire [0:0] s_obi_rid; +assign s_obi_req = s_obi.req; +assign s_obi.gnt = s_obi_gnt; +assign s_obi_addr = s_obi.addr; +assign s_obi_we = s_obi.we; +assign s_obi_be = s_obi.be; +assign s_obi_wdata = s_obi.wdata; +assign s_obi_aid = s_obi.aid; +assign s_obi.rvalid = s_obi_rvalid; +assign s_obi_rready = s_obi.rready; +assign s_obi.rdata = s_obi_rdata; +assign s_obi.err = s_obi_err; +assign s_obi.rid = s_obi_rid; {% endif %}