Skip to content

Commit 05b4f69

Browse files
committed
config: add possibility to disable bypass functionality
Default AXI config disables loopback Signed-off-by: Karol Gugala <[email protected]>
1 parent 02c2a22 commit 05b4f69

File tree

6 files changed

+36
-2
lines changed

6 files changed

+36
-2
lines changed

i3c_core_configs.yaml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,25 @@ axi:
4949
FrontendBusIdFiltering: True
5050
NumPrivIds: 4
5151
DisableInputFF: True
52+
DisableLoopback: True
53+
54+
axi_bypass:
55+
CmdFifoDepth: 64
56+
RxFifoDepth: 64
57+
TxFifoDepth: 64
58+
RespFifoDepth: 64
59+
IbiFifoDepth: 64
60+
IbiFifoExtSize: False
61+
DatDepth: 128
62+
DctDepth: 128
63+
FrontendBusInterface: "AXI"
64+
FrontendBusAddrWidth: 12
65+
FrontendBusDataWidth: 32
66+
FrontendBusUserWidth: 32
67+
FrontendBusIdWidth: 8
68+
FrontendBusIdFiltering: True
69+
NumPrivIds: 4
70+
DisableInputFF: True
5271

5372
axi_ff:
5473
CmdFifoDepth: 64

src/i3c.sv

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -553,7 +553,11 @@ module i3c
553553
I3CCSR_pkg::I3CCSR__I3C_EC__SecFwRecoveryIf__in_t hwif_rec_inp;
554554

555555
logic bypass_i3c_core;
556+
`ifndef DISABLE_LOOPBACK
556557
assign bypass_i3c_core = hwif_out.I3C_EC.SoCMgmtIf.REC_INTF_CFG.REC_INTF_BYPASS.value;
558+
`else
559+
assign bypass_i3c_core = '0;
560+
`endif
557561

558562
controller #(
559563
.DatAw(DatAw),

src/i3c_defines.svh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,5 +20,6 @@
2020
`define AXI_ID_FILTERING 1
2121
`define NUM_PRIV_IDS 4
2222
`define DISABLE_INPUT_FF 1
23+
`define DISABLE_LOOPBACK 1
2324

2425
`endif // I3C_CONFIG

tools/i3c_config/common.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,12 @@ def __init__(self, cfg: I3CGenericConfig) -> None:
7878
self._defines["DISABLE_INPUT_FF"] = 1
7979
continue
8080

81+
# Map "DisableLoopback"
82+
if name == "DisableLoopback":
83+
if bool(value):
84+
self._defines["DISABLE_LOOPBACK"] = 1
85+
continue
86+
8187
# For those parameters that map directly, change the name format:
8288
# PascalCase -> UPPER_SNAKE_CASE
8389
new_name = self._format_name(name).replace("FRONTEND_BUS", bus)

tools/i3c_config/i3c_core_config.schema.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,10 @@
103103
"DisableInputFF": {
104104
"description": "Disable input synchronization flip-flops on SDA and SCL lines.",
105105
"type": "boolean"
106+
},
107+
"DisableLoopback": {
108+
"description": "Disable recovery loopback mode allowing perforing OCP recovery flow from internal bus (instead of I3C).",
109+
"type": "boolean"
106110
}
107111
},
108112
"if": {
@@ -181,4 +185,4 @@
181185
}
182186
]
183187
}
184-
}
188+
}

verification/cocotb/top/i3c_axi/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ TEST_FILES = $(sort $(wildcard test_*.py))
1111

1212
MODULE ?= $(subst $(space),$(comma),$(subst .py,,$(TEST_FILES)))
1313
TOPLEVEL = i3c_test_wrapper
14-
CFG_NAME = axi
14+
CFG_NAME = axi_bypass
1515

1616
# Set appropriate bus interface via Cocotb's PLUSARGS:
1717
override PLUSARGS := $(strip +FrontendBusInterface=AXI $(PLUSARGS))

0 commit comments

Comments
 (0)