Package: i2c_bfm_pkg

Description

=================================================================================================

Constants

Name Type Value Description
C_SCOPE string "I2C BFM"
C_READ_BIT std_logic '1'
C_WRITE_BIT std_logic '0'
C_I2C_BFM_CONFIG_DEFAULT t_i2c_bfm_config ( enable_10_bits_addressing => false,
master_sda_to_scl => 20 ns,
master_scl_to_sda => 20 ns,
master_stop_condition_hold_time => 20 ns,
max_wait_scl_change => 10 ms,
max_wait_scl_change_severity => failure,
max_wait_sda_change => 10 ms,
max_wait_sda_change_severity => failure,
i2c_bit_time => -1 ns,
i2c_bit_time_severity => failure,
acknowledge_severity => failure,
slave_mode_address => "0000000000",
slave_mode_address_severity => failure,
slave_rw_bit_severity => failure,
reserved_address_severity => warning,
match_strictness => MATCH_EXACT,
id_for_bfm => ID_BFM,
id_for_bfm_wait => ID_BFM_WAIT,
id_for_bfm_poll => ID_BFM_POLL )

Types

Name Type Description
t_i2c_if
t_i2c_bfm_config Configuration record to be assigned in the test harness.

Functions

Description

BFM procedures


init_i2c_if_signals

  • This function returns an I2C interface with initialized signals.
  • All I2C signals are initialized to Z

Description

i2c_master_transmit

This procedure transmits data 'data' to an I2C slave DUT
at address 'addr_value'.

Description

i2c_master_transmit

This procedure transmits data 'data' to an I2C slave DUT
at address 'addr_value'.
The I2C interface in this procedure is given as a t_i2c_if signal record

Description

i2c_master_transmit

This procedure transmits data 'data' to an I2C slave DUT
at address 'addr_value'.
The I2C interface in this procedure is given as a t_i2c_if signal record

Description

i2c_slave_transmit

This procedure transmits data 'data' to an I2C master DUT.

Description

i2c_slave_transmit

This procedure transmits data 'data' to an I2C master DUT.
The I2C interface in this procedure is given as a t_i2c_if signal record

Description

i2c_slave_transmit

This procedure transmits data 'data' to an I2C master DUT.
The I2C interface in this procedure is given as a t_i2c_if signal record

Description

i2c_master_receive

This procedure receives data 'data' from an I2C slave DUT
at address 'addr_value'.

Description

i2c_master_receive

This procedure receives data 'data' from an I2C slave DUT
at address 'addr_value'.
The I2C interface in this procedure is given as a t_i2c_if signal record

Description

i2c_master_receive

This procedure receives data 'data' from an I2C slave DUT
at address 'addr_value'.
The I2C interface in this procedure is given as a t_i2c_if signal record

Description

i2c_slave_receive

This procedure receives data 'data' from an I2C master DUT.
at address 'addr_value'.

Description

i2c_slave_receive

This procedure receives data 'data' from an I2C master DUT.
The I2C interface in this procedure is given as a t_i2c_if signal record

Description

i2c_slave_receive

This procedure receives data 'data' from an I2C master DUT.
The I2C interface in this procedure is given as a t_i2c_if signal record

Description

i2c_master_check

This procedure receives an I2C transaction from an I2C slave DUT at address
'addr_value', and compares the read data to the expected data in 'data_exp'.
If the read data is inconsistent with the expected data, an alert with
severity 'alert_level' is triggered.
The I2C interface in this procedure is given as individual signals

Description

i2c_master_check

This procedure receives an I2C transaction from an I2C slave DUT at address
'addr_value', and compares the read data to the expected data in 'data_exp'.
If the read data is inconsistent with the expected data, an alert with
severity 'alert_level' is triggered.
The I2C interface in this procedure is given as a t_i2c_if signal record

Description

i2c_master_check

This procedure receives an I2C transaction from an I2C slave DUT at address
'addr_value', and compares the read data to the expected data in 'data_exp'.
If the read data is inconsistent with the expected data, an alert with
severity 'alert_level' is triggered.
The I2C interface in this procedure is given as a t_i2c_if signal record

Description

i2c_slave_check

This procedure receives an I2C transaction from an I2C master DUT,
and compares the read data to the expected data in 'data_exp'.
If the read data is inconsistent with the expected data, an alert with
severity 'alert_level' is triggered.
The I2C interface in this procedure is given as individual signals

Description

i2c_slave_check

This procedure receives an I2C transaction from an I2C master DUT,
and compares the read data to the expected data in 'data_exp'.
If the read data is inconsistent with the expected data, an alert with
severity 'alert_level' is triggered.
The I2C interface in this procedure is given as a t_i2c_if signal record

Description

i2c_slave_check

This procedure receives an I2C transaction from an I2C master DUT,
and compares the read data to the expected data in 'data_exp'.
If the read data is inconsistent with the expected data, an alert with
severity 'alert_level' is triggered.
The I2C interface in this procedure is given as a t_i2c_if signal record