Skip to content

Commit 176b04c

Browse files
anujickgugala
authored andcommitted
Controller: rebase fixes
Signed-off-by: Angelo Nujic <anujic@antmicro.com>
1 parent 67aa14a commit 176b04c

48 files changed

Lines changed: 2088 additions & 1056 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎.github/workflows/tests-and-docs.yml‎

Lines changed: 108 additions & 64 deletions
Large diffs are not rendered by default.

‎.gitmodules‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,7 @@
33
url = https://github.com/chipsalliance/caliptra-rtl.git
44
[submodule "third_party/cocotbext-i3c"]
55
path = third_party/cocotbext-i3c
6-
url = ../i3c-host-mode-cocotbext-i3c.git
7-
branch = i3c-host-mode-support
6+
url = https://github.com/antmicro/cocotbext-i3c.git
87
[submodule "third_party/axi-vip"]
98
path = third_party/axi-vip
109
url = https://github.com/antmicro/axi-vip.git

‎Makefile‎

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -169,15 +169,10 @@ tests-axi-hc: ## Run all verification/cocotb/* RTL tests for AXI bus HC configur
169169
export TARGET_SUPPORT=0 && \
170170
cd $(COCOTB_VERIF_DIR) && CFG_NAME=axi_hc $(PYTHON) -m nox -R -t "axi_hc" --no-venv --forcecolor
171171

172-
tests-axi-controller-short: ## Run all verification/cocotb/* RTL tests for the controller without coverage
173-
export CONTROLLER_SUPPORT=1 && \
174-
export TARGET_SUPPORT=1 && \
175-
cd $(COCOTB_VERIF_DIR) && CFG_NAME=axi_ctrl_and_target_short $(PYTHON) -m nox -R -t "controller-axi" --no-venv --forcecolor
176-
177172
tests-axi-controller: ## Run all verification/cocotb/* RTL tests for the controller without coverage
178173
export CONTROLLER_SUPPORT=1 && \
179174
export TARGET_SUPPORT=1 && \
180-
cd $(COCOTB_VERIF_DIR) && CFG_NAME=axi_ctrl_and_target $(PYTHON) -m nox -R -t "controller-axi" --no-venv --forcecolor
175+
cd $(COCOTB_VERIF_DIR) && CFG_NAME=axi-controller $(PYTHON) -m nox -R -t "axi-controller" --no-venv --forcecolor
181176

182177
tests: tests-axi tests-ahb ## Run all verification/cocotb/* RTL tests fro AHB and AXI bus configurations without coverage
183178

‎i3c_core_configs.yaml‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ ahb:
1111
RespFifoDepth: 64
1212
IbiFifoDepth: 64
1313
IbiFifoExtSize: False
14+
IbiBufferDepth: 8
1415
DatDepth: 32
1516
DctDepth: 32
1617
FrontendBusInterface: "AHB"
@@ -27,6 +28,7 @@ axi:
2728
RespFifoDepth: 64
2829
IbiFifoDepth: 64
2930
IbiFifoExtSize: False
31+
IbiBufferDepth: 8
3032
DatDepth: 32
3133
DctDepth: 32
3234
FrontendBusInterface: "AXI"
@@ -63,7 +65,7 @@ axi_hc:
6365
ControllerSupport: True
6466
TargetSupport: False
6567

66-
axi_ctrl_and_target:
68+
axi-controller:
6769
CmdFifoDepth: 64
6870
RxFifoDepth: 64
6971
TxFifoDepth: 64
@@ -93,6 +95,7 @@ axi_bypass:
9395
RespFifoDepth: 64
9496
IbiFifoDepth: 64
9597
IbiFifoExtSize: False
98+
IbiBufferDepth: 8
9699
DatDepth: 32
97100
DctDepth: 32
98101
FrontendBusInterface: "AXI"

‎pyproject.toml‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,13 @@ dependencies = [
1313
"attrs==23.2.0",
1414
"black==24.4.2",
1515
"click==8.1.7",
16-
"cocotb==1.9.0",
16+
"cocotb==1.9.2",
1717
"cocotb-ahb",
1818
"cocotb-bus==0.2.1",
1919
"cocotb-coverage==1.2.0",
2020
"cocotb-helpers",
2121
"cocotb-test==0.2.5",
22-
"cocotbext-axi==0.1.24",
22+
"cocotbext-axi==0.1.26",
2323
"cocotbext-i2c",
2424
"cocotbext-i3c",
2525
"colorama==0.4.6",

‎src/csr/I3CCSR.sv‎

Lines changed: 360 additions & 222 deletions
Large diffs are not rendered by default.

‎src/csr/I3CCSR_uvm.sv‎

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5397,6 +5397,16 @@ package I3CCSR_uvm;
53975397

53985398
this.T_IDLE_REG.build();
53995399
this.default_map.add_reg(this.T_IDLE_REG, 'h88);
5400+
this.HDR_TIMEOUT_EN_REG = new("HDR_TIMEOUT_EN_REG");
5401+
this.HDR_TIMEOUT_EN_REG.configure(this);
5402+
5403+
this.HDR_TIMEOUT_EN_REG.build();
5404+
this.default_map.add_reg(this.HDR_TIMEOUT_EN_REG, 'h8c);
5405+
this.T_HDR_TIMEOUT_REG = new("T_HDR_TIMEOUT_REG");
5406+
this.T_HDR_TIMEOUT_REG.configure(this);
5407+
5408+
this.T_HDR_TIMEOUT_REG.build();
5409+
this.default_map.add_reg(this.T_HDR_TIMEOUT_REG, 'h90);
54005410
endfunction : build
54015411
endclass : I3CCSR__I3C_EC__SoCMgmtIf
54025412

@@ -5558,12 +5568,12 @@ package I3CCSR_uvm;
55585568
this.CtrlCfg = new("CtrlCfg");
55595569
this.CtrlCfg.configure(this);
55605570
this.CtrlCfg.build();
5561-
this.default_map.add_submap(this.CtrlCfg.default_map, 'h190);
5571+
this.default_map.add_submap(this.CtrlCfg.default_map, 'h298);
55625572
this.TERMINATION_EXTCAP_HEADER = new("TERMINATION_EXTCAP_HEADER");
55635573
this.TERMINATION_EXTCAP_HEADER.configure(this);
55645574

55655575
this.TERMINATION_EXTCAP_HEADER.build();
5566-
this.default_map.add_reg(this.TERMINATION_EXTCAP_HEADER, 'h198);
5576+
this.default_map.add_reg(this.TERMINATION_EXTCAP_HEADER, 'h2a0);
55675577
endfunction : build
55685578
endclass : I3CCSR__I3C_EC
55695579

‎src/ctrl/bus_timers.sv‎

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,10 @@ module bus_timers
2525
(
2626
input logic clk_i,
2727
input logic rst_ni,
28-
input logic enable_i,
29-
input logic reset_counter_ni,
28+
input logic enable_i, // Module enable (i3c_standby_en)
29+
input logic bus_start_i, // Bus START/RSTART detected
30+
input logic bus_stop_i, // Bus STOP detected
31+
input logic in_hdr_mode_i, // Currently in HDR mode
3032
input logic [i3c_pkg::TimingWidth-1:0] t_bus_free_i, // CSR: Time to free
3133
input logic [i3c_pkg::TimingWidth-1:0] t_bus_idle_i, // CSR: Time to idle
3234
input logic [i3c_pkg::TimingWidth-1:0] t_bus_available_i, // CSR: Time to available
@@ -45,7 +47,7 @@ module bus_timers
4547
// Track if we've seen STOP (and should be counting)
4648
always_ff @(posedge clk_i or negedge rst_ni) begin : proc_count_enable
4749
if (!rst_ni) begin
48-
count_enable <= '0;
50+
count_enable <= 1'b1;
4951
end else begin
5052
// Stop counting when bus_idle since this is always the largest counter
5153
// We need to stop to avoid counter overflow issues.
@@ -73,6 +75,6 @@ module bus_timers
7375
assign bus_idle_o = bus_state_counter > {12'b0, (t_bus_idle_i - 1'b1)};
7476
assign bus_available_o = bus_state_counter > {12'b0, (t_bus_available_i - 1'b1)};
7577
// Asserted only if all of the above are low
76-
assign bus_busy_o = ~(bus_free_o | bus_idle_o | bus_available_o);
78+
assign bus_busy_o = ~(bus_free_o | bus_idle_o | bus_available_o);
7779

7880
endmodule

‎src/ctrl/configuration.sv‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ module configuration (
141141
assign hc_intr = hwif_out_i.I3CBase.INTR_STATUS.intr;
142142
`else
143143
assign bus_enable = hwif_out_i.I3C_EC.SoCMgmtIf.SOC_PAD_CONF.INPUT_ENABLE.value;
144-
assign resume = '0;
144+
assign resume_o = '0;
145145
assign abort = '0;
146146
assign hc_intr = 1'b0;
147147
`endif // CONTROLLER_SUPPORT
@@ -257,7 +257,7 @@ module configuration (
257257
hwif_out_i.I3C_EC.TTI.INTERRUPT_STATUS.PENDING_IBI.value,
258258
2'b11, // Unable to do Handoff
259259
hwif_out_i.I3C_EC.TTI.STATUS.PROTOCOL_ERROR.value,
260-
1'b0, // Reserved
260+
1'b0, // Reserved
261261
hwif_out_i.I3C_EC.TTI.INTERRUPT_STATUS.PENDING_INTERRUPT.value
262262
};
263263

@@ -290,8 +290,8 @@ module configuration (
290290
assign target_ibi_addr_valid_o = target_sta_addr_valid_o || target_dyn_addr_valid_o;
291291

292292
// Configuration: Target IBI
293-
assign ibi_enable_o = hwif_out_i.I3C_EC.TTI.CONTROL.IBI_EN.value;
294-
assign ibi_retry_num_o = hwif_out_i.I3C_EC.TTI.CONTROL.IBI_RETRY_NUM.value;
293+
assign ibi_enable_o = hwif_out_i.I3C_EC.TTI.CONTROL.IBI_EN.value;
294+
assign ibi_retry_num_o = hwif_out_i.I3C_EC.TTI.CONTROL.IBI_RETRY_NUM.value;
295295
assign ibi_retry_ctr_rst_o = hwif_out_i.I3C_EC.TTI.RESET_CONTROL.IBI_RETRY_CTR_RST.value;
296296

297297
endmodule

0 commit comments

Comments
 (0)