Skip to content

Minor fixes to I3C testbench #173

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft
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
3 changes: 3 additions & 0 deletions testbenches/ip/i3c_controller/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ LIB_DEPS += i3c_controller/i3c_controller_host_interface
LIB_DEPS += i3c_controller/i3c_controller_core
LIB_DEPS += sysid_rom

SV_DEPS += $(ADI_HDL_DIR)/library/i3c_controller/i3c_controller_host_interface/i3c_controller_regmap.vh
SV_DEPS += $(ADI_HDL_DIR)/library/i3c_controller/i3c_controller_core/i3c_controller_word.vh

# default test program
TP := test_program

Expand Down
9 changes: 4 additions & 5 deletions testbenches/ip/i3c_controller/tests/test_program.sv
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@
//

`include "utils.svh"
`include "../../../../../library/i3c_controller/i3c_controller_host_interface/i3c_controller_regmap.vh"
`include "../../../../../library/i3c_controller/i3c_controller_core/i3c_controller_word.vh"
`include "i3c_controller_regmap.vh"
`include "i3c_controller_word.vh"

import axi_vip_pkg::*;
import axi4stream_vip_pkg::*;
Expand Down Expand Up @@ -599,14 +599,13 @@ task priv_i2c_test();
// Assert is in I²C mode
if (`DUT_I3C_BIT_MOD.i2c_mode !== 1)
`ERROR(("Not in I2C mode!"));
// Dummy LOW peripheral write + ACK continue
// Dummy high peripheral write
wait (`DUT_I3C_WORD.st == `CMDW_I2C_RX);
auto_ack <= 1'b0;
i3c_dev_sda <= 1'b0;
i3c_dev_sda <= 1'bZ;
// Count n ACK-bit asserted low by the controller (sampling before
// tri-state)
repeat (I2C_CMD_2[15:8]) @(negedge `DUT_I3C_BIT_MOD.sdo);
i3c_dev_sda <= 1'bZ;

wait (`DUT_I3C_BIT_MOD.nop == 0);
wait (`DUT_I3C_BIT_MOD.nop == 1);
Expand Down