i2c_pkg

Hold I2C shared parameters, FIFO widths, and AXI-Lite typedefs.

Defines controller and target FIFO data widths, the ACQ FIFO entry identifiers, timeout mode, read/write and ACK/NACK encodings, and the axil_req_t / axil_resp_t used by i2c.

reg_addr_t

Alias for logic [RegAddrWidth-1:0]

reg_data_t

Alias for logic [RegDataWidth-1:0]

reg_strb_t

Alias for logic [RegStrbWidth-1:0]

axil_aw_chan_t

Packed struct

Table 1. axil_aw_chan_t
FieldTypeDescription
addrreg_addr_t
protaxi_pkg::prot_t

axil_w_chan_t

Packed struct

Table 2. axil_w_chan_t
FieldTypeDescription
datareg_data_t
strbreg_strb_t

axil_b_chan_t

Packed struct

Table 3. axil_b_chan_t
FieldTypeDescription
respaxi_pkg::resp_t

axil_ar_chan_t

Packed struct

Table 4. axil_ar_chan_t
FieldTypeDescription
addrreg_addr_t
protaxi_pkg::prot_t

axil_r_chan_t

Packed struct

Table 5. axil_r_chan_t
FieldTypeDescription
datareg_data_t
respaxi_pkg::resp_t

axil_req_t

Packed struct

Table 6. axil_req_t
FieldTypeDescription
awaxil_aw_chan_t
aw_validlogic
waxil_w_chan_t
w_validlogic
b_readylogic
araxil_ar_chan_t
ar_validlogic
r_readylogic

axil_resp_t

Packed struct

Table 7. axil_resp_t
FieldTypeDescription
aw_readylogic
w_readylogic
baxil_b_chan_t
b_validlogic
ar_readylogic
raxil_r_chan_t
r_validlogic

i2c_acq_byte_id_e

add more values to this enum without having to widen the ACQ FIFO width.

Enum (logic [I2C_ACQ_BYTE_ID_WIDTH-1:0])

Table 8. i2c_acq_byte_id_e
ValueNumberDescription
ACQ_DATA3'b000
ACQ_START3'b001
ACQ_STOP3'b010
ACQ_RESTART3'b011ACQ_NACK means one of two things:
ACQ_NACK3'b100ACQ_NACK_START means that we were addressed on this item, but we timed
ACQ_NACK_START3'b101ACQ_NACK_STOP means that we were addressed during the transaction, but we
ACQ_NACK_STOP3'b110

i2c_timeout_mode_e

Enum (logic)

Table 9. i2c_timeout_mode_e
ValueNumberDescription
STRETCH_TIMEOUT_MODE1'b0
BUS_TIMEOUT_MODE1'b1

rw_e

Enum (bit)

Table 10. rw_e
ValueNumberDescription
WRITE1'b0
READ1'b1

acknack_e

Enum (bit)

Table 11. acknack_e
ValueNumberDescription
ACK1'b0
NACK1'b1