Skip to content

Commit bb765e6

Browse files
committed
Add 's_' prefix to OBI port for consistency with all other cpuifs
1 parent dafd693 commit bb765e6

File tree

2 files changed

+29
-29
lines changed

2 files changed

+29
-29
lines changed

src/peakrdl_regblock/cpuif/obi/__init__.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@ class OBI_Cpuif(CpuifBase):
88

99
@property
1010
def port_declaration(self) -> str:
11-
return "obi_intf.subordinate obi"
11+
return "obi_intf.subordinate s_obi"
1212

1313
def signal(self, name: str) -> str:
14-
return "obi." + name
14+
return "s_obi." + name
1515

1616
@property
1717
def regblock_latency(self) -> int:
@@ -51,7 +51,7 @@ def port_declaration(self) -> str:
5151
return ",\n".join(lines)
5252

5353
def signal(self, name: str) -> str:
54-
return "obi_" + name
54+
return "s_obi_" + name
5555

5656
@property
5757
def parameters(self) -> List[str]:

tests/lib/cpuifs/obi/tb_inst.sv

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -2,40 +2,40 @@
22
obi_intf #(
33
.DATA_WIDTH({{exporter.cpuif.data_width}}),
44
.ADDR_WIDTH({{exporter.cpuif.addr_width}})
5-
) obi();
5+
) s_obi();
66
obi_intf_driver #(
77
.DATA_WIDTH({{exporter.cpuif.data_width}}),
88
.ADDR_WIDTH({{exporter.cpuif.addr_width}})
99
) cpuif (
1010
.clk(clk),
1111
.rst(rst),
12-
.m_obi(obi)
12+
.m_obi(s_obi)
1313
);
1414
{% if type(cpuif).__name__.startswith("Flat") %}
1515
{% sv_line_anchor %}
1616

17-
wire obi_req;
18-
wire obi_gnt;
19-
wire [{{exporter.cpuif.addr_width - 1}}:0] obi_addr;
20-
wire obi_we;
21-
wire [{{exporter.cpuif.data_width_bytes - 1}}:0] obi_be;
22-
wire [{{exporter.cpuif.data_width - 1}}:0] obi_wdata;
23-
wire [0:0] obi_aid;
24-
wire obi_rvalid;
25-
wire obi_rready;
26-
wire [{{exporter.cpuif.data_width - 1}}:0] obi_rdata;
27-
wire obi_err;
28-
wire [0:0] obi_rid;
29-
assign obi_req = obi.req;
30-
assign obi.gnt = obi_gnt;
31-
assign obi_addr = obi.addr;
32-
assign obi_we = obi.we;
33-
assign obi_be = obi.be;
34-
assign obi_wdata = obi.wdata;
35-
assign obi_aid = obi.aid;
36-
assign obi.rvalid = obi_rvalid;
37-
assign obi_rready = obi.rready;
38-
assign obi.rdata = obi_rdata;
39-
assign obi.err = obi_err;
40-
assign obi.rid = obi_rid;
17+
wire s_obi_req;
18+
wire s_obi_gnt;
19+
wire [{{exporter.cpuif.addr_width - 1}}:0] s_obi_addr;
20+
wire s_obi_we;
21+
wire [{{exporter.cpuif.data_width_bytes - 1}}:0] s_obi_be;
22+
wire [{{exporter.cpuif.data_width - 1}}:0] s_obi_wdata;
23+
wire [0:0] s_obi_aid;
24+
wire s_obi_rvalid;
25+
wire s_obi_rready;
26+
wire [{{exporter.cpuif.data_width - 1}}:0] s_obi_rdata;
27+
wire s_obi_err;
28+
wire [0:0] s_obi_rid;
29+
assign s_obi_req = s_obi.req;
30+
assign s_obi.gnt = s_obi_gnt;
31+
assign s_obi_addr = s_obi.addr;
32+
assign s_obi_we = s_obi.we;
33+
assign s_obi_be = s_obi.be;
34+
assign s_obi_wdata = s_obi.wdata;
35+
assign s_obi_aid = s_obi.aid;
36+
assign s_obi.rvalid = s_obi_rvalid;
37+
assign s_obi_rready = s_obi.rready;
38+
assign s_obi.rdata = s_obi_rdata;
39+
assign s_obi.err = s_obi_err;
40+
assign s_obi.rid = s_obi_rid;
4141
{% endif %}

0 commit comments

Comments
 (0)