Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
ff5ad02
[src] Remove RxPWriteData in i3c_target_fsm
Feb 10, 2026
c22c37d
[src] update tx_host_nack_o comment and usage
Feb 10, 2026
2dac94d
[src] remove target_transmitting_o from design
Feb 10, 2026
9910e6b
[src] change TODO for I3C events
Feb 10, 2026
4402ae9
[src] _r is just for arbitrary - removing TODO
Feb 10, 2026
d70c925
[src] update TODO reguarding i3c_fsm_en_i
Feb 10, 2026
99553ab
[src] remove TODO
Feb 10, 2026
432d86e
[src] Replace TODO with FUTUREFIX for unused err output
Feb 10, 2026
e4452ca
[src] update TODO comment for interrupts
Feb 10, 2026
3d5b6f1
[src] remove incomplete TODO comment in hci.sv
Feb 10, 2026
bc7a1b6
[src] replace TODO with FUTUREFIX in queue threshold comments
Feb 10, 2026
46972d1
[src] remove unused req_error signal in bus_tx_flow
Feb 10, 2026
cabc2b7
[src] remove unused target_hot_join_addr and daa_unique_response signals
Feb 10, 2026
9b90504
[src] replace TODO with FUTUREFIX for rx_queue_flush race condition
Feb 10, 2026
aba43e4
[src] change unused CCC TODO to FUTUREFIX
Feb 10, 2026
f2592e7
[src] wire qualified IBI queue signals to controller_standby_i3c
Feb 10, 2026
6f26f33
[src] replace all TODOs with FUTUREFIX in flow_active.sv
Feb 10, 2026
de5ded6
[src] replace all TODOs with FUTUREFIX in controller_active.sv
Feb 10, 2026
d3304ec
[src] replace all TODOs with FUTUREFIX in controller_standby_i2c.sv
Feb 10, 2026
8113094
[src] replace all TODOs with FUTUREFIX in flow_standby_i2c.sv
Feb 10, 2026
d532470
[src] replace all TODOs with FUTUREFIX in i2c_target_fsm.sv
Feb 10, 2026
dd27069
[src] replace all TODOs with FUTUREFIX in i2c_controller_fsm.sv
Feb 10, 2026
a4bd04e
[src] replace TODO with FUTUREFIX in i3c_controller_fsm.sv
Feb 10, 2026
6f3cec7
[src] replace TODO with FUTUREFIX in controller.sv
Feb 10, 2026
199268a
[src] replace TODO with FUTUREFIX in controller_pkg.sv
Feb 10, 2026
eaaf370
[src] rename dasa_o/set_dasa_o ports for consistency
Feb 10, 2026
42f489b
[src/rdl] remove endianness TODO; little-endian verified correct
Feb 10, 2026
b0c0ad0
[src/rdl] replace controller parameter TODOs with FUTUREFIX in regist…
Feb 10, 2026
7798392
[src/ctrl] fix spurious tx_queue_flush on DWORD-aligned reads; add pr…
Feb 11, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 2 additions & 10 deletions src/ctrl/bus_tx_flow.sv
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,6 @@ module bus_tx_flow import i3c_pkg::*; (

logic tx_done; // Indicates finished bit write
logic bus_tx_done; // Feedback to requester that transfer is done
logic req_error;

// TODO Can probably be removed
assign req_error = 1'b0;

typedef enum logic [2:0] {
Idle,
Expand Down Expand Up @@ -289,15 +285,11 @@ module bus_tx_flow import i3c_pkg::*; (
end
default: begin end
endcase

// Allow to abort and go back to Idle if needed
if (req_error) begin
state_d = Idle;
end
end

assign tx_rsp_o = '{
error: req_error,
// FUTUREFIX: error is unused; available for future bus error reporting
error: 1'b0,
idle: (state_q == Idle),
done: bus_tx_done
};
Expand Down
10 changes: 5 additions & 5 deletions src/ctrl/ccc.sv
Original file line number Diff line number Diff line change
Expand Up @@ -215,8 +215,8 @@ module ccc
// -------------------------------------------------------------------------
// SETDASA/SETAASA: Set Dynamic Address from Static Address
// -------------------------------------------------------------------------
output logic [6:0] dasa_o,
output logic set_dasa_o,
output logic [6:0] set_dasa_o,
output logic set_dasa_valid_o,
output logic set_dasa_virtual_device_o,
output logic set_aasa_o,
output logic set_aasa_virt_o,
Expand Down Expand Up @@ -1400,8 +1400,8 @@ module ccc
// ===========================================================================
// SETDASA/SETAASA OUTPUT ASSIGNMENTS
// ===========================================================================
assign dasa_o = set_dasa_addr;
assign set_dasa_o = set_dasa_valid;
assign set_dasa_o = set_dasa_addr;
assign set_dasa_valid_o = set_dasa_valid;
assign set_dasa_virtual_device_o = target_addr_matches_virt ? set_dasa_valid : 1'b0;
assign set_aasa_o = set_aasa_valid;
assign set_aasa_virt_o = set_aasa_virt_valid;
Expand Down Expand Up @@ -1738,7 +1738,7 @@ module ccc
// ===========================================================================
// UNSUPPORTED/OPTIONAL CCC OUTPUTS (tied to defaults)
// ===========================================================================
// TODO: Implement these when the following optional CCCs are added:
// FUTUREFIX: Implement these when the following optional CCCs are added:
// * ENTTM - Enter Test Mode
// * SETBRGTGT - Set Bridge Targets
// * ENTAS[0-3] - Enter Activity State
Expand Down
9 changes: 0 additions & 9 deletions src/ctrl/configuration.sv
Original file line number Diff line number Diff line change
Expand Up @@ -52,12 +52,6 @@ module configuration (
output logic [6:0] target_ibi_addr_o,
output logic target_ibi_addr_valid_o,

// Hot-Join address is always valid
output logic [6:0] target_hot_join_addr_o,

// Response for ENTDAA
output logic [63:0] daa_unique_response_o,

// Target IBI
output logic ibi_enable_o,
output logic [2:0] ibi_retry_num_o,
Expand Down Expand Up @@ -201,13 +195,10 @@ module configuration (
};

assign virtual_dcr_o = hwif_out_i.I3C_EC.StdbyCtrlMode.STBY_CR_VIRTUAL_DEVICE_CHAR.DCR.value;
assign daa_unique_response_o = {pid_o, bcr_o, dcr_o};

assign target_ibi_addr_o = target_dyn_addr_valid_o ? target_dyn_addr_o : target_sta_addr_o;
assign target_ibi_addr_valid_o = target_sta_addr_valid_o || target_dyn_addr_valid_o;

assign target_hot_join_addr_o = 7'h02;

// Configuration: Target IBI
assign ibi_enable_o = hwif_out_i.I3C_EC.TTI.CONTROL.IBI_EN.value;
assign ibi_retry_num_o = hwif_out_i.I3C_EC.TTI.CONTROL.IBI_RETRY_NUM.value;
Expand Down
8 changes: 1 addition & 7 deletions src/ctrl/controller.sv
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: Apache-2.0

// TODO: Consider arbitration difference from i2c:
// FUTUREFIX: Consider arbitration difference from i2c:
// Section 5.1.4
// 48b provisioned id and bcr, dcr are used.
// This is to enable dynamic addressing.
Expand Down Expand Up @@ -307,8 +307,6 @@ module controller
logic virtual_target_dyn_addr_valid;
logic [6:0] target_ibi_addr;
logic target_ibi_addr_valid;
logic [6:0] target_hot_join_addr;
logic [63:0] daa_unique_response;
logic set_mwl, set_mrl, set_ibil;
logic [15:0] mwl, mrl;
logic [7:0] ibil;
Expand Down Expand Up @@ -411,8 +409,6 @@ module controller
.virtual_target_dyn_addr_valid_o (virtual_target_dyn_addr_valid),
.target_ibi_addr_o (target_ibi_addr),
.target_ibi_addr_valid_o (target_ibi_addr_valid),
.target_hot_join_addr_o (target_hot_join_addr),
.daa_unique_response_o (daa_unique_response),
.ibi_enable_o (ibi_enable),
.ibi_retry_num_o (ibi_retry_num),
.set_mwl_i (set_mwl),
Expand Down Expand Up @@ -598,10 +594,8 @@ module controller
.virtual_target_dyn_addr_valid_i(virtual_target_dyn_addr_valid),
.target_ibi_addr_i(target_ibi_addr),
.target_ibi_addr_valid_i(target_ibi_addr_valid),
.target_hot_join_addr_i(target_hot_join_addr),
.ibi_enable_i(ibi_enable),
.ibi_retry_num_i(ibi_retry_num),
.daa_unique_response_i(daa_unique_response),
.tx_host_nack_o(tti_tx_host_nack_o),
.tx_pr_end_o(tti_tx_pr_end_o),
.tx_pr_start_o(tti_tx_pr_start_o),
Expand Down
18 changes: 9 additions & 9 deletions src/ctrl/controller_active.sv
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ module controller_active
output logic [ 127:0] dct_wdata_hw_o,
input logic [ 127:0] dct_rdata_hw_i,

// TODO: rename
// FUTUREFIX: rename
input logic i3c_fsm_en_i,
output logic i3c_fsm_idle_o,

Expand Down Expand Up @@ -138,7 +138,7 @@ module controller_active
logic rx_fifo_wvalid;
logic [RxFifoWidth-1:0] rx_fifo_wdata;

// TODO: Connect I2C Controller SDA/SCL to I3C Flow FSM
// FUTUREFIX: Connect I2C Controller SDA/SCL to I3C Flow FSM

flow_active flow_fsm (
.clk_i,
Expand Down Expand Up @@ -228,7 +228,7 @@ module controller_active
.sda_o (ctrl_sda_o[0]),

// These should be controlled by the flow FSM
// TODO: reconnect to flow fsm once configuration.sv is connected properly to CSRs
// FUTUREFIX: reconnect to flow fsm once configuration.sv is connected properly to CSRs
.host_enable_i('0),
.fmt_fifo_rvalid_i(fmt_fifo_rvalid),
.fmt_fifo_depth_i(fmt_fifo_depth),
Expand All @@ -245,8 +245,8 @@ module controller_active
.rx_fifo_wdata_o(rx_fifo_wdata),
.host_idle_o(unused_host_idle_o),

// TODO: Use calculated timing values
// TODO: Expose as programmable feature
// FUTUREFIX: Use calculated timing values
// FUTUREFIX: Expose as programmable feature
.thigh_i(16'd10),
.tlow_i(16'd10),
.t_r_i(16'd1),
Expand All @@ -262,11 +262,11 @@ module controller_active
.stretch_timeout_i('0),
.timeout_enable_i ('0),

// TODO: Handle NACK on bus
// FUTUREFIX: Handle NACK on bus
.host_nack_handler_timeout_i('0),
.host_nack_handler_timeout_en_i('0),

// TODO: Handle bus events
// FUTUREFIX: Handle bus events
.event_nak_o(unused_event_nak_o),
.event_unhandled_nak_timeout_o(unused_event_unhandled_nak_timeout_o),
.event_scl_interference_o(unused_event_scl_interference_o),
Expand All @@ -276,7 +276,7 @@ module controller_active
.event_cmd_complete_o(unused_event_cmd_complete_o)
);

// TODO: Handle i3c waveform
// FUTUREFIX: Handle i3c waveform
i3c_controller_fsm xi3c_controller_fsm (
.clk_i(clk_i),
.rst_ni(rst_ni),
Expand All @@ -286,7 +286,7 @@ module controller_active
.ctrl_sda_o(ctrl_sda_o[1])
);

// TODO: Handle driver switching in the active controller mode
// FUTUREFIX: Handle driver switching in the active controller mode
assign phy_sel_od_pp_o[0] = '0;
assign phy_sel_od_pp_o[1] = '0;
endmodule
2 changes: 1 addition & 1 deletion src/ctrl/controller_pkg.sv
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ package controller_pkg;

parameter int unsigned I2cAcqByteIdWidth = 3;

// TODO(#22028) encode this more efficiently in the ACQ FIFO. Each entry in the
// FUTUREFIX(#22028) encode this more efficiently in the ACQ FIFO. Each entry in the
// ACQ FIFO does not need to contain both an 8 bit data field and a 3 bit
// identifier. We should have the ACQ FIFO be 9 bits wide where the MSB
// indicates whether it is a data byte or a control byte. This way we can
Expand Down
24 changes: 9 additions & 15 deletions src/ctrl/controller_standby.sv
Original file line number Diff line number Diff line change
Expand Up @@ -141,8 +141,6 @@ module controller_standby
input logic virtual_target_dyn_addr_valid_i,
input logic [6:0] target_ibi_addr_i,
input logic target_ibi_addr_valid_i,
input logic [6:0] target_hot_join_addr_i,
input logic [63:0] daa_unique_response_i,
input logic ibi_enable_i,
input logic [2:0] ibi_retry_num_i,

Expand Down Expand Up @@ -262,9 +260,9 @@ module controller_standby
bus_addr_valid_o = sel_i2c_i3c ? i3c_bus_addr_valid_o : i2c_bus_addr_valid_o;

// Connect IBI only in I3C mode
i3c_ibi_queue_full_i = sel_i2c_i3c ? ibi_queue_full_i : '0; // TODO unused
i3c_ibi_queue_empty_i = sel_i2c_i3c ? ibi_queue_empty_i : '0; // TODO unused
i3c_ibi_queue_rvalid_i = sel_i2c_i3c ? ibi_queue_rvalid_i : '0; // TODO unused
i3c_ibi_queue_full_i = sel_i2c_i3c ? ibi_queue_full_i : '0;
i3c_ibi_queue_empty_i = sel_i2c_i3c ? ibi_queue_empty_i : '0;
i3c_ibi_queue_rvalid_i = sel_i2c_i3c ? ibi_queue_rvalid_i : '0;
ibi_queue_rready_o = sel_i2c_i3c ? i3c_ibi_queue_rready_o : '0;

tx_host_nack_o = sel_i2c_i3c ? i3c_tx_host_nack_o : i2c_tx_host_nack_o;
Expand Down Expand Up @@ -371,7 +369,7 @@ module controller_standby
.rx_queue_wvalid_o(i2c_rx_queue_wvalid_int),
.rx_queue_wready_i(rx_queue_wready_int),
.rx_queue_wdata_o(i2c_rx_queue_wdata_int),
// .rx_queue_flush_o(i2c_rx_queue_flush_o), // TODO: Add flush support for I2C
// .rx_queue_flush_o(i2c_rx_queue_flush_o), // FUTUREFIX: Add flush support for I2C
.tx_queue_full_i(tx_queue_full_i),
.tx_queue_start_thld_i(tx_queue_start_thld_i),
.tx_queue_start_thld_trig_i(tx_queue_start_thld_trig_i),
Expand Down Expand Up @@ -406,8 +404,6 @@ module controller_standby
.target_dyn_addr_valid_i(target_dyn_addr_valid_i),
.target_ibi_addr_i(target_ibi_addr_i),
.target_ibi_addr_valid_i(target_ibi_addr_valid_i),
.target_hot_join_addr_i(target_hot_join_addr_i),
.daa_unique_response_i(daa_unique_response_i),
.tx_host_nack_o(i2c_tx_host_nack_o)
);

Expand Down Expand Up @@ -446,9 +442,9 @@ module controller_standby
.tx_queue_rdata_i(tx_queue_rdata_i),
.tx_queue_empty_i(tx_queue_empty_i),
.tx_queue_flush_o(i3c_tx_queue_flush_o),
.ibi_queue_full_i(ibi_queue_full_i),
.ibi_queue_empty_i(ibi_queue_empty_i),
.ibi_queue_rvalid_i(ibi_queue_rvalid_i),
.ibi_queue_full_i(i3c_ibi_queue_full_i),
.ibi_queue_empty_i(i3c_ibi_queue_empty_i),
.ibi_queue_rvalid_i(i3c_ibi_queue_rvalid_i),
.ibi_queue_depth_i(ibi_queue_depth_i),
.ibi_queue_rready_o(i3c_ibi_queue_rready_o),
.ibi_queue_rdata_i(ibi_queue_rdata_i),
Expand Down Expand Up @@ -482,15 +478,13 @@ module controller_standby
.virtual_target_dyn_addr_valid_i(virtual_target_dyn_addr_valid_i),
.target_ibi_addr_i(target_ibi_addr_i),
.target_ibi_addr_valid_i(target_ibi_addr_valid_i),
.target_hot_join_addr_i(target_hot_join_addr_i),
.ibi_enable_i(ibi_enable_i),
.ibi_retry_num_i(ibi_retry_num_i),
.daa_unique_response_i(daa_unique_response_i),
.tx_host_nack_o(i3c_tx_host_nack_o),
.tx_pr_end_o(tx_pr_end_o),
.tx_pr_start_o(tx_pr_start_o),
.dasa_o(set_dasa_o), // TODO propagate name change further up
.set_dasa_o(set_dasa_valid_o), // TODO propagate name change further up
.set_dasa_o(set_dasa_o),
.set_dasa_valid_o(set_dasa_valid_o),
.set_dasa_virtual_device_o(set_dasa_virtual_device_o),
.set_aasa_o(set_aasa_o),
.set_aasa_virt_o(set_aasa_virt_o),
Expand Down
14 changes: 6 additions & 8 deletions src/ctrl/controller_standby_i2c.sv
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,6 @@ module controller_standby_i2c
input logic target_dyn_addr_valid_i,
input logic [6:0] target_ibi_addr_i,
input logic target_ibi_addr_valid_i,
input logic [6:0] target_hot_join_addr_i,
input logic [63:0] daa_unique_response_i,

output logic tx_host_nack_o
);
Expand Down Expand Up @@ -183,15 +181,15 @@ module controller_standby_i2c
.acq_fifo_wready_o(acq_fifo_ready_int),
.acq_fifo_rdata_i('1), // This is only used for assertions by OpenTitan
// Timing setup
// TODO: Use calculated timing values
// FUTUREFIX: Use calculated timing values
.t_r_i(16'd1),
.tsu_dat_i(16'd1),
.thd_dat_i(16'd1),
.host_timeout_i('0),
.nack_timeout_i('0),
.nack_timeout_en_i('0),
// Addressing setup
// TODO: Make it configurable
// FUTUREFIX: Make it configurable
.target_address0_i(7'h0c),
.target_mask0_i(7'h7f),
.target_address1_i('0),
Expand All @@ -208,20 +206,20 @@ module controller_standby_i2c
.event_host_timeout_o(unused_event_host_timeout_o)
);

// TODO: Temporarily set here to always use OD. Verify this connection
// FUTUREFIX: Temporarily set here to always use OD. Verify this connection
assign phy_sel_od_pp_o = 1'b0;

// TODO: Make the I2C FSM report start/stop condition detection
// FUTUREFIX: Make the I2C FSM report start/stop condition detection
assign bus_start_o = '0;
assign bus_rstart_o = '0;
assign bus_stop_o = '0;

// TODO: Make the I2C FSM output its received address + RnW bit and connect
// FUTUREFIX: Make the I2C FSM output its received address + RnW bit and connect
// them here.
assign bus_addr_o = '0;
assign bus_addr_valid_o = '0;

// TODO: Detect host NACKs and expose them here
// FUTUREFIX: Detect host NACKs and expose them here
assign tx_host_nack_o = '0;

endmodule
13 changes: 4 additions & 9 deletions src/ctrl/controller_standby_i3c.sv
Original file line number Diff line number Diff line change
Expand Up @@ -129,9 +129,9 @@ module controller_standby_i3c
output logic [7:0] rst_action_o,

// Set dynamic address from static address
output logic set_dasa_o,
output logic set_dasa_valid_o,
output logic set_dasa_virtual_device_o,
output i3c_addr_t dasa_o,
output i3c_addr_t set_dasa_o,
// Set all addresses to static address
output logic set_aasa_o,
output logic set_aasa_virt_o,
Expand All @@ -154,10 +154,6 @@ module controller_standby_i3c
output logic enec_hj_o, // Hot Join requests
output logic disec_hj_o,

// TODO Unused, figure out what this is about
input i3c_addr_t target_hot_join_addr_i,
input logic [63:0] daa_unique_response_i,

//
output logic tx_host_nack_o,
output logic tx_pr_end_o,
Expand Down Expand Up @@ -377,7 +373,6 @@ module controller_standby_i3c
.bus_timeout_i (bus_timeout),

.target_idle_o (/* unused */),
.target_transmitting_o(/* unused */),

.bus_tx_req_o(bus_tx_req_fsm),
.bus_tx_rsp_i(bus_tx_rsp_fsm),
Expand Down Expand Up @@ -533,8 +528,8 @@ module controller_standby_i3c
.exit_hdr_i (hdr_exit_detect),
.in_hdr_mode_o (in_hdr_mode_o),

.dasa_o,
.set_dasa_o,
.set_dasa_valid_o,
.set_dasa_virtual_device_o,
.set_aasa_o,
.set_aasa_virt_o,
Expand Down Expand Up @@ -727,7 +722,7 @@ module controller_standby_i3c

.tx_queue_flush_o (tx_queue_flush_o),
.tx_start_i (tx_pr_start_o),
.tx_abort_i (tx_pr_abort | tx_host_nack),
.tx_abort_i (tx_pr_abort),
.tx_desc_avail_o (tx_desc_avail),

.tx_byte_o (tx_fifo_rdata),
Expand Down
7 changes: 4 additions & 3 deletions src/ctrl/descriptor_tx.sv
Original file line number Diff line number Diff line change
Expand Up @@ -136,9 +136,10 @@ module descriptor_tx import i3c_pkg::*; #(
(flush && tti_tx_queue_rvalid_i);

assign tx_end = (byte_counter == 16'h1 && (tx_byte_ready_i || flush));
// TODO check these conditions. This probably checks if any of the four bytes per tx_queue word
// hasn't been read, in which case a word-flush is required?
assign tx_queue_flush_o = (|data_len[1:0] && tx_end) || (|byte_counter[1:0] && tx_end);
// Flush the Nto8 width converter when:
// - Normal completion of a non-DWORD-aligned transfer (partial last word), OR
// - Abort/recovery draining completes
assign tx_queue_flush_o = (|data_len[1:0] && tx_end) || (flush && tx_end);

assign tx_end_o = tx_end;
endmodule
Loading