Skip to content

Conversation

@caosjr
Copy link

@caosjr caosjr commented Jul 7, 2025

It changes spi_vip and spi_engine driver so it can support the new testbench for the SPI Engine. Several tasks and functions were changed due to this modification.
This modification requires this spi engine version: analogdevicesinc/hdl#1808

PR Type

  • Bug fix (change that fixes an issue)
  • New feature (change that adds new functionality)
  • New test (change that adds new test program and/or testbench)
  • Breaking change (has dependencies in other repositories/testbenches)
  • Documentation (change that adds or modifies documentation)

PR Checklist

  • I have followed the code style guidelines
  • I have performed a self-review of changes
  • I have ran all testbenches affected by this PR
  • I have commented my code, at least hard-to-understand parts
  • I have signed off all commits from this PR
  • I have updated the documentation (wiki pages, ReadMe files, Copyright etc)
  • I have not introduced new Warnings/Errors on compilation/elaboration/simulation
  • I have set the verbosity level to none for the test program

@caosjr caosjr marked this pull request as ready for review August 7, 2025 19:19
@caosjr caosjr requested review from a team as code owners August 7, 2025 19:19
Copy link
Collaborator

@IstvanZsSzekely IstvanZsSzekely left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Initial review.
The projects that have updated documentation: AD463x, AD738x, AD7606 have broken testbenches. It seems that the HDL block design is out of date.

Comment on lines +7 to +8
set ad_project_params(NUM_OF_SDI) 4
set ad_project_params(NUM_OF_SDO) 4
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps some of the cfgs could have different NUM_OF_SDI/NUM_OF_SDO (all are currently 4)

Comment on lines +42 to +43
parameter NUM_OF_SDI = 1,
parameter NUM_OF_SDO = 1,
Copy link
Contributor

@LBFFilho LBFFilho Aug 8, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider renaming these to NUM_OF_MISO/MOSI (or something in this vein), since the VIP could have MOSI as input or output depending on the mode in the future.

Copy link
Collaborator

@IstvanZsSzekely IstvanZsSzekely left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Triggered another CI run to check the current status of the PR with the changes from HDL and TB PRs. The AD463x, AD7606x, AD7616 (parallel mode) projects have build issues in the testbenches, while AD57xx has issues when compiling the simulation files.

Several changes to support n lanes on the vip

From Vivado 2024.2 and on, it is required a type for mailbox.
This commit defines an int for the type of mailbox.

Signed-off-by: Carlos Souza <[email protected]>
* Update to support n lanes for the SDI and SDO;
* Insert SDI lane mask instruction;
* Insert SDO lane mask instruction;

Signed-off-by: Carlos Souza <[email protected]>
* Update major version;
* Update NUM_OF_SDI parameter to NUM_OF_SDIO.

Signed-off-by: Carlos Souza <[email protected]>
Several changes to support more than one lane for SDI and
SDO:
* Update config files. All config files have 4 lanes now;
* Insert a new test for lane mask.

Signed-off-by: Carlos Souza <[email protected]>
Updated from NUM_OF_SDI to NUM_OF_SDIO parameter in the documentation
of the following projects:
* ad463x;
* ad738x;
* ad7606;
* pulsar_adc.

Signed-off-by: Carlos Souza <[email protected]>
Testbench was updated to use the new features
related to the spi lane mask.

Signed-off-by: Carlos Souza <[email protected]>
offload can accept different lane masks for testing.

Signed-off-by: Carlos Souza <[email protected]>
This commit fixes the read and write test for the offload
mode of the test_lanes. The DDR read was removed by accident in
latest commit. It also fixes the mask and the num of active lanes.

Signed-off-by: Carlos Souza <[email protected]>
Both tests were not generic regarding the sdi_lane_mask. They were
relying on the default value, which is not guaranteed that it is
going to enable all lanes.
Added instructions to change the sdi_lane_mask before executing the
tests for the FIFO and Offload modes.

Signed-off-by: Carlos Souza <[email protected]>
Update the version of the spi engine to 2.0 since it is not backwards
compatible.

Signed-off-by: Carlos Souza <[email protected]>
github-actions bot added a commit that referenced this pull request Sep 23, 2025
github-actions bot added a commit that referenced this pull request Sep 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants