Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
430 changes: 301 additions & 129 deletions src/csr/I3CCSR.sv

Large diffs are not rendered by default.

86 changes: 43 additions & 43 deletions src/csr/I3CCSR_uvm.sv
Original file line number Diff line number Diff line change
Expand Up @@ -2937,13 +2937,13 @@ package I3CCSR_uvm;

virtual function void build();
this.PENDING_RX_NACK = new("PENDING_RX_NACK");
this.PENDING_RX_NACK.configure(this, 1, 0, "RW", 1, 'h0, 0, 1, 0);
this.PENDING_RX_NACK.configure(this, 1, 0, "RW", 1, 'h0, 1, 1, 0);
this.HANDOFF_DELAY_NACK = new("HANDOFF_DELAY_NACK");
this.HANDOFF_DELAY_NACK.configure(this, 1, 1, "RW", 1, 'h0, 0, 1, 0);
this.HANDOFF_DELAY_NACK.configure(this, 1, 1, "RW", 1, 'h0, 1, 1, 0);
this.ACR_FSM_OP_SELECT = new("ACR_FSM_OP_SELECT");
this.ACR_FSM_OP_SELECT.configure(this, 1, 2, "RW", 1, 'h0, 0, 1, 0);
this.ACR_FSM_OP_SELECT.configure(this, 1, 2, "RW", 1, 'h0, 1, 1, 0);
this.PRIME_ACCEPT_GETACCCR = new("PRIME_ACCEPT_GETACCCR");
this.PRIME_ACCEPT_GETACCCR.configure(this, 1, 3, "RW", 1, 'h0, 0, 1, 0);
this.PRIME_ACCEPT_GETACCCR.configure(this, 1, 3, "RW", 1, 'h0, 1, 1, 0);
this.HANDOFF_DEEP_SLEEP = new("HANDOFF_DEEP_SLEEP");
this.HANDOFF_DEEP_SLEEP.configure(this, 1, 4, "WS", 1, 'h0, 1, 1, 0);
this.CR_REQUEST_SEND = new("CR_REQUEST_SEND");
Expand Down Expand Up @@ -3147,11 +3147,11 @@ package I3CCSR_uvm;

virtual function void build();
this.AC_CURRENT_OWN = new("AC_CURRENT_OWN");
this.AC_CURRENT_OWN.configure(this, 1, 2, "RW", 1, 'h0, 0, 1, 0);
this.AC_CURRENT_OWN.configure(this, 1, 2, "RW", 1, 'h0, 1, 1, 0);
this.SIMPLE_CRR_STATUS = new("SIMPLE_CRR_STATUS");
this.SIMPLE_CRR_STATUS.configure(this, 3, 5, "RW", 1, 'h0, 0, 1, 0);
this.SIMPLE_CRR_STATUS.configure(this, 3, 5, "RW", 1, 'h0, 1, 1, 0);
this.HJ_REQ_STATUS = new("HJ_REQ_STATUS");
this.HJ_REQ_STATUS.configure(this, 1, 8, "RW", 1, 'h0, 0, 1, 0);
this.HJ_REQ_STATUS.configure(this, 1, 8, "RW", 1, 'h0, 1, 1, 0);
if (has_coverage(UVM_CVR_REG_BITS)) begin
foreach(AC_CURRENT_OWN_bit_cg[bt]) AC_CURRENT_OWN_bit_cg[bt] = new();
foreach(SIMPLE_CRR_STATUS_bit_cg[bt]) SIMPLE_CRR_STATUS_bit_cg[bt] = new();
Expand Down Expand Up @@ -3282,31 +3282,31 @@ package I3CCSR_uvm;

virtual function void build();
this.ACR_HANDOFF_OK_REMAIN_STAT = new("ACR_HANDOFF_OK_REMAIN_STAT");
this.ACR_HANDOFF_OK_REMAIN_STAT.configure(this, 1, 0, "RW", 1, 'h0, 0, 1, 0);
this.ACR_HANDOFF_OK_REMAIN_STAT.configure(this, 1, 0, "RW", 1, 'h0, 1, 1, 0);
this.ACR_HANDOFF_OK_PRIMED_STAT = new("ACR_HANDOFF_OK_PRIMED_STAT");
this.ACR_HANDOFF_OK_PRIMED_STAT.configure(this, 1, 1, "RW", 1, 'h0, 0, 1, 0);
this.ACR_HANDOFF_OK_PRIMED_STAT.configure(this, 1, 1, "RW", 1, 'h0, 1, 1, 0);
this.ACR_HANDOFF_ERR_FAIL_STAT = new("ACR_HANDOFF_ERR_FAIL_STAT");
this.ACR_HANDOFF_ERR_FAIL_STAT.configure(this, 1, 2, "RW", 1, 'h0, 0, 1, 0);
this.ACR_HANDOFF_ERR_FAIL_STAT.configure(this, 1, 2, "RW", 1, 'h0, 1, 1, 0);
this.ACR_HANDOFF_ERR_M3_STAT = new("ACR_HANDOFF_ERR_M3_STAT");
this.ACR_HANDOFF_ERR_M3_STAT.configure(this, 1, 3, "RW", 1, 'h0, 0, 1, 0);
this.ACR_HANDOFF_ERR_M3_STAT.configure(this, 1, 3, "RW", 1, 'h0, 1, 1, 0);
this.CRR_RESPONSE_STAT = new("CRR_RESPONSE_STAT");
this.CRR_RESPONSE_STAT.configure(this, 1, 10, "RW", 1, 'h0, 0, 1, 0);
this.CRR_RESPONSE_STAT.configure(this, 1, 10, "RW", 1, 'h0, 1, 1, 0);
this.STBY_CR_DYN_ADDR_STAT = new("STBY_CR_DYN_ADDR_STAT");
this.STBY_CR_DYN_ADDR_STAT.configure(this, 1, 11, "RW", 1, 'h0, 0, 1, 0);
this.STBY_CR_DYN_ADDR_STAT.configure(this, 1, 11, "RW", 1, 'h0, 1, 1, 0);
this.STBY_CR_ACCEPT_NACKED_STAT = new("STBY_CR_ACCEPT_NACKED_STAT");
this.STBY_CR_ACCEPT_NACKED_STAT.configure(this, 1, 12, "RW", 1, 'h0, 0, 1, 0);
this.STBY_CR_ACCEPT_NACKED_STAT.configure(this, 1, 12, "RW", 1, 'h0, 1, 1, 0);
this.STBY_CR_ACCEPT_OK_STAT = new("STBY_CR_ACCEPT_OK_STAT");
this.STBY_CR_ACCEPT_OK_STAT.configure(this, 1, 13, "RW", 1, 'h0, 0, 1, 0);
this.STBY_CR_ACCEPT_OK_STAT.configure(this, 1, 13, "RW", 1, 'h0, 1, 1, 0);
this.STBY_CR_ACCEPT_ERR_STAT = new("STBY_CR_ACCEPT_ERR_STAT");
this.STBY_CR_ACCEPT_ERR_STAT.configure(this, 1, 14, "RW", 1, 'h0, 0, 1, 0);
this.STBY_CR_ACCEPT_ERR_STAT.configure(this, 1, 14, "RW", 1, 'h0, 1, 1, 0);
this.STBY_CR_OP_RSTACT_STAT = new("STBY_CR_OP_RSTACT_STAT");
this.STBY_CR_OP_RSTACT_STAT.configure(this, 1, 16, "RW", 1, 'h0, 1, 1, 0);
this.CCC_PARAM_MODIFIED_STAT = new("CCC_PARAM_MODIFIED_STAT");
this.CCC_PARAM_MODIFIED_STAT.configure(this, 1, 17, "RW", 1, 'h0, 0, 1, 0);
this.CCC_PARAM_MODIFIED_STAT.configure(this, 1, 17, "RW", 1, 'h0, 1, 1, 0);
this.CCC_UNHANDLED_NACK_STAT = new("CCC_UNHANDLED_NACK_STAT");
this.CCC_UNHANDLED_NACK_STAT.configure(this, 1, 18, "RW", 1, 'h0, 0, 1, 0);
this.CCC_UNHANDLED_NACK_STAT.configure(this, 1, 18, "RW", 1, 'h0, 1, 1, 0);
this.CCC_FATAL_RSTDAA_ERR_STAT = new("CCC_FATAL_RSTDAA_ERR_STAT");
this.CCC_FATAL_RSTDAA_ERR_STAT.configure(this, 1, 19, "RW", 1, 'h0, 0, 1, 0);
this.CCC_FATAL_RSTDAA_ERR_STAT.configure(this, 1, 19, "RW", 1, 'h0, 1, 1, 0);
if (has_coverage(UVM_CVR_REG_BITS)) begin
foreach(ACR_HANDOFF_OK_REMAIN_STAT_bit_cg[bt]) ACR_HANDOFF_OK_REMAIN_STAT_bit_cg[bt] = new();
foreach(ACR_HANDOFF_OK_PRIMED_STAT_bit_cg[bt]) ACR_HANDOFF_OK_PRIMED_STAT_bit_cg[bt] = new();
Expand Down Expand Up @@ -3402,31 +3402,31 @@ package I3CCSR_uvm;

virtual function void build();
this.ACR_HANDOFF_OK_REMAIN_SIGNAL_EN = new("ACR_HANDOFF_OK_REMAIN_SIGNAL_EN");
this.ACR_HANDOFF_OK_REMAIN_SIGNAL_EN.configure(this, 1, 0, "RW", 1, 'h0, 0, 1, 0);
this.ACR_HANDOFF_OK_REMAIN_SIGNAL_EN.configure(this, 1, 0, "RW", 1, 'h0, 1, 1, 0);
this.ACR_HANDOFF_OK_PRIMED_SIGNAL_EN = new("ACR_HANDOFF_OK_PRIMED_SIGNAL_EN");
this.ACR_HANDOFF_OK_PRIMED_SIGNAL_EN.configure(this, 1, 1, "RW", 1, 'h0, 0, 1, 0);
this.ACR_HANDOFF_OK_PRIMED_SIGNAL_EN.configure(this, 1, 1, "RW", 1, 'h0, 1, 1, 0);
this.ACR_HANDOFF_ERR_FAIL_SIGNAL_EN = new("ACR_HANDOFF_ERR_FAIL_SIGNAL_EN");
this.ACR_HANDOFF_ERR_FAIL_SIGNAL_EN.configure(this, 1, 2, "RW", 1, 'h0, 0, 1, 0);
this.ACR_HANDOFF_ERR_FAIL_SIGNAL_EN.configure(this, 1, 2, "RW", 1, 'h0, 1, 1, 0);
this.ACR_HANDOFF_ERR_M3_SIGNAL_EN = new("ACR_HANDOFF_ERR_M3_SIGNAL_EN");
this.ACR_HANDOFF_ERR_M3_SIGNAL_EN.configure(this, 1, 3, "RW", 1, 'h0, 0, 1, 0);
this.ACR_HANDOFF_ERR_M3_SIGNAL_EN.configure(this, 1, 3, "RW", 1, 'h0, 1, 1, 0);
this.CRR_RESPONSE_SIGNAL_EN = new("CRR_RESPONSE_SIGNAL_EN");
this.CRR_RESPONSE_SIGNAL_EN.configure(this, 1, 10, "RW", 1, 'h0, 0, 1, 0);
this.CRR_RESPONSE_SIGNAL_EN.configure(this, 1, 10, "RW", 1, 'h0, 1, 1, 0);
this.STBY_CR_DYN_ADDR_SIGNAL_EN = new("STBY_CR_DYN_ADDR_SIGNAL_EN");
this.STBY_CR_DYN_ADDR_SIGNAL_EN.configure(this, 1, 11, "RW", 1, 'h0, 0, 1, 0);
this.STBY_CR_DYN_ADDR_SIGNAL_EN.configure(this, 1, 11, "RW", 1, 'h0, 1, 1, 0);
this.STBY_CR_ACCEPT_NACKED_SIGNAL_EN = new("STBY_CR_ACCEPT_NACKED_SIGNAL_EN");
this.STBY_CR_ACCEPT_NACKED_SIGNAL_EN.configure(this, 1, 12, "RW", 1, 'h0, 0, 1, 0);
this.STBY_CR_ACCEPT_NACKED_SIGNAL_EN.configure(this, 1, 12, "RW", 1, 'h0, 1, 1, 0);
this.STBY_CR_ACCEPT_OK_SIGNAL_EN = new("STBY_CR_ACCEPT_OK_SIGNAL_EN");
this.STBY_CR_ACCEPT_OK_SIGNAL_EN.configure(this, 1, 13, "RW", 1, 'h0, 0, 1, 0);
this.STBY_CR_ACCEPT_OK_SIGNAL_EN.configure(this, 1, 13, "RW", 1, 'h0, 1, 1, 0);
this.STBY_CR_ACCEPT_ERR_SIGNAL_EN = new("STBY_CR_ACCEPT_ERR_SIGNAL_EN");
this.STBY_CR_ACCEPT_ERR_SIGNAL_EN.configure(this, 1, 14, "RW", 1, 'h0, 0, 1, 0);
this.STBY_CR_ACCEPT_ERR_SIGNAL_EN.configure(this, 1, 14, "RW", 1, 'h0, 1, 1, 0);
this.STBY_CR_OP_RSTACT_SIGNAL_EN = new("STBY_CR_OP_RSTACT_SIGNAL_EN");
this.STBY_CR_OP_RSTACT_SIGNAL_EN.configure(this, 1, 16, "RW", 1, 'h0, 1, 1, 0);
this.CCC_PARAM_MODIFIED_SIGNAL_EN = new("CCC_PARAM_MODIFIED_SIGNAL_EN");
this.CCC_PARAM_MODIFIED_SIGNAL_EN.configure(this, 1, 17, "RW", 1, 'h0, 0, 1, 0);
this.CCC_PARAM_MODIFIED_SIGNAL_EN.configure(this, 1, 17, "RW", 1, 'h0, 1, 1, 0);
this.CCC_UNHANDLED_NACK_SIGNAL_EN = new("CCC_UNHANDLED_NACK_SIGNAL_EN");
this.CCC_UNHANDLED_NACK_SIGNAL_EN.configure(this, 1, 18, "RW", 1, 'h0, 0, 1, 0);
this.CCC_UNHANDLED_NACK_SIGNAL_EN.configure(this, 1, 18, "RW", 1, 'h0, 1, 1, 0);
this.CCC_FATAL_RSTDAA_ERR_SIGNAL_EN = new("CCC_FATAL_RSTDAA_ERR_SIGNAL_EN");
this.CCC_FATAL_RSTDAA_ERR_SIGNAL_EN.configure(this, 1, 19, "RW", 1, 'h0, 0, 1, 0);
this.CCC_FATAL_RSTDAA_ERR_SIGNAL_EN.configure(this, 1, 19, "RW", 1, 'h0, 1, 1, 0);
if (has_coverage(UVM_CVR_REG_BITS)) begin
foreach(ACR_HANDOFF_OK_REMAIN_SIGNAL_EN_bit_cg[bt]) ACR_HANDOFF_OK_REMAIN_SIGNAL_EN_bit_cg[bt] = new();
foreach(ACR_HANDOFF_OK_PRIMED_SIGNAL_EN_bit_cg[bt]) ACR_HANDOFF_OK_PRIMED_SIGNAL_EN_bit_cg[bt] = new();
Expand Down Expand Up @@ -3484,23 +3484,23 @@ package I3CCSR_uvm;

virtual function void build();
this.CRR_RESPONSE_FORCE = new("CRR_RESPONSE_FORCE");
this.CRR_RESPONSE_FORCE.configure(this, 1, 10, "RW", 1, 'h0, 0, 1, 0);
this.CRR_RESPONSE_FORCE.configure(this, 1, 10, "RW", 1, 'h0, 1, 1, 0);
this.STBY_CR_DYN_ADDR_FORCE = new("STBY_CR_DYN_ADDR_FORCE");
this.STBY_CR_DYN_ADDR_FORCE.configure(this, 1, 11, "RW", 1, 'h0, 0, 1, 0);
this.STBY_CR_DYN_ADDR_FORCE.configure(this, 1, 11, "RW", 1, 'h0, 1, 1, 0);
this.STBY_CR_ACCEPT_NACKED_FORCE = new("STBY_CR_ACCEPT_NACKED_FORCE");
this.STBY_CR_ACCEPT_NACKED_FORCE.configure(this, 1, 12, "RW", 1, 'h0, 0, 1, 0);
this.STBY_CR_ACCEPT_NACKED_FORCE.configure(this, 1, 12, "RW", 1, 'h0, 1, 1, 0);
this.STBY_CR_ACCEPT_OK_FORCE = new("STBY_CR_ACCEPT_OK_FORCE");
this.STBY_CR_ACCEPT_OK_FORCE.configure(this, 1, 13, "RW", 1, 'h0, 0, 1, 0);
this.STBY_CR_ACCEPT_OK_FORCE.configure(this, 1, 13, "RW", 1, 'h0, 1, 1, 0);
this.STBY_CR_ACCEPT_ERR_FORCE = new("STBY_CR_ACCEPT_ERR_FORCE");
this.STBY_CR_ACCEPT_ERR_FORCE.configure(this, 1, 14, "RW", 1, 'h0, 0, 1, 0);
this.STBY_CR_ACCEPT_ERR_FORCE.configure(this, 1, 14, "RW", 1, 'h0, 1, 1, 0);
this.STBY_CR_OP_RSTACT_FORCE = new("STBY_CR_OP_RSTACT_FORCE");
this.STBY_CR_OP_RSTACT_FORCE.configure(this, 1, 16, "WO", 1, 'h0, 0, 1, 0);
this.STBY_CR_OP_RSTACT_FORCE.configure(this, 1, 16, "WO", 1, 'h0, 1, 1, 0);
this.CCC_PARAM_MODIFIED_FORCE = new("CCC_PARAM_MODIFIED_FORCE");
this.CCC_PARAM_MODIFIED_FORCE.configure(this, 1, 17, "RW", 1, 'h0, 0, 1, 0);
this.CCC_PARAM_MODIFIED_FORCE.configure(this, 1, 17, "RW", 1, 'h0, 1, 1, 0);
this.CCC_UNHANDLED_NACK_FORCE = new("CCC_UNHANDLED_NACK_FORCE");
this.CCC_UNHANDLED_NACK_FORCE.configure(this, 1, 18, "RW", 1, 'h0, 0, 1, 0);
this.CCC_UNHANDLED_NACK_FORCE.configure(this, 1, 18, "RW", 1, 'h0, 1, 1, 0);
this.CCC_FATAL_RSTDAA_ERR_FORCE = new("CCC_FATAL_RSTDAA_ERR_FORCE");
this.CCC_FATAL_RSTDAA_ERR_FORCE.configure(this, 1, 19, "RW", 1, 'h0, 0, 1, 0);
this.CCC_FATAL_RSTDAA_ERR_FORCE.configure(this, 1, 19, "RW", 1, 'h0, 1, 1, 0);
if (has_coverage(UVM_CVR_REG_BITS)) begin
foreach(CRR_RESPONSE_FORCE_bit_cg[bt]) CRR_RESPONSE_FORCE_bit_cg[bt] = new();
foreach(STBY_CR_DYN_ADDR_FORCE_bit_cg[bt]) STBY_CR_DYN_ADDR_FORCE_bit_cg[bt] = new();
Expand Down Expand Up @@ -3540,9 +3540,9 @@ package I3CCSR_uvm;

virtual function void build();
this.F2_CRCAP1_BUS_CONFIG = new("F2_CRCAP1_BUS_CONFIG");
this.F2_CRCAP1_BUS_CONFIG.configure(this, 3, 0, "RW", 1, 'h0, 0, 1, 0);
this.F2_CRCAP1_BUS_CONFIG.configure(this, 3, 0, "RW", 1, 'h0, 1, 1, 0);
this.F2_CRCAP2_DEV_INTERACT = new("F2_CRCAP2_DEV_INTERACT");
this.F2_CRCAP2_DEV_INTERACT.configure(this, 4, 8, "RW", 1, 'h0, 0, 1, 0);
this.F2_CRCAP2_DEV_INTERACT.configure(this, 4, 8, "RW", 1, 'h0, 1, 1, 0);
if (has_coverage(UVM_CVR_REG_BITS)) begin
foreach(F2_CRCAP1_BUS_CONFIG_bit_cg[bt]) F2_CRCAP1_BUS_CONFIG_bit_cg[bt] = new();
foreach(F2_CRCAP2_DEV_INTERACT_bit_cg[bt]) F2_CRCAP2_DEV_INTERACT_bit_cg[bt] = new();
Expand Down Expand Up @@ -3663,7 +3663,7 @@ package I3CCSR_uvm;

virtual function void build();
this.__rsvd = new("__rsvd");
this.__rsvd.configure(this, 32, 0, "RW", 1, 'h0, 0, 1, 0);
this.__rsvd.configure(this, 32, 0, "RW", 1, 'h0, 1, 1, 0);
if (has_coverage(UVM_CVR_REG_BITS)) begin
foreach(__rsvd_bit_cg[bt]) __rsvd_bit_cg[bt] = new();
end
Expand Down
14 changes: 10 additions & 4 deletions src/ctrl/descriptor_ibi.sv
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,12 @@ module descriptor_ibi #(
endcase

// Capture IBI descriptor
always_ff @(posedge clk_i)
if (state_q == Idle && ibi_queue_rvalid_i) begin
always_ff @(posedge clk_i or negedge rst_ni)
if (!rst_ni) begin
data_mdb <= '0;
data_len <= '0;
data_words <= '0;
end else if (state_q == Idle && ibi_queue_rvalid_i) begin
data_mdb <= ibi_queue_rdata_i[31:24];
// -1 to compensate for comparison with data_cnt
data_len <= ibi_queue_rdata_i[7:0] - 1;
Expand All @@ -97,8 +101,10 @@ module descriptor_ibi #(
end

// Data counter
always_ff @(posedge clk_i)
if (state_q == Idle) begin
always_ff @(posedge clk_i or negedge rst_ni)
if (!rst_ni) begin
data_cnt <= '0;
end else if (state_q == Idle) begin
data_cnt <= '0;
end else if (state_q == WriteData) begin
if (ibi_queue_rvalid_i && ibi_byte_ready_i) data_cnt <= data_cnt + 1;
Expand Down
16 changes: 10 additions & 6 deletions src/libs/axi_sub/i3c_axi_sub_rd.sv
Original file line number Diff line number Diff line change
Expand Up @@ -254,9 +254,12 @@ module i3c_axi_sub_rd import axi_pkg::*; #(
end
end

// No reset needed on data path -- txn_rvalid (control path) is reset
always_ff@(posedge clk) begin
txn_xfer_ctx[cp] <= txn_xfer_ctx[cp-1];
always_ff@(posedge clk or negedge rst_n) begin
if (!rst_n) begin
txn_xfer_ctx[cp] <= '0;
end else begin
txn_xfer_ctx[cp] <= txn_xfer_ctx[cp-1];
end
end
end: CTX_PIPELINE

Expand Down Expand Up @@ -305,9 +308,10 @@ module i3c_axi_sub_rd import axi_pkg::*; #(
end

for (ex = 0; ex < ID_NUM; ex++) begin: EX_CTX_TRACKER
// TODO: reset?
always_ff@(posedge clk) begin
if (txn_rvalid[0] && txn_ctx.lock && (txn_ctx.id == ex)) begin
always_ff@(posedge clk or negedge rst_n) begin
if (!rst_n) begin
ex_ctx[ex] <= '0;
end else if (txn_rvalid[0] && txn_ctx.lock && (txn_ctx.id == ex)) begin
ex_ctx[ex].addr <= txn_ctx.addr;
ex_ctx[ex].addr_mask <= addr_ex_algn_mask;
end
Expand Down
Loading