Skip to content

library/spi_engine: Extend SDO support for the SPI Engine #1808

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 3 commits into
base: main
Choose a base branch
from

Conversation

caosjr
Copy link
Contributor

@caosjr caosjr commented Jul 1, 2025

PR Description

Please replace this comment with summary, motivation and context of the changes.
List any dependencies required for this change.

You can check the checkboxes below by inserting a 'x' between square brackets
(without any other characters or spaces) or just check them after publishing the PR.

If there is a breaking change, specify dependent PRs in description and
try to push all related PRs at the same time.

PR Type

  • Bug fix (change that fixes an issue)
  • New feature (change that adds new functionality)
  • Breaking change (has dependencies in other repos or will cause CI to fail)
  • Documentation

PR Checklist

  • I have followed the code style guidelines
  • I have performed a self-review of changes
  • I have compiled all hdl projects and libraries affected by this PR
  • I have tested in hardware affected projects, at least on relevant boards
  • 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/Critical Warnings on compilation
  • I have added new hdl testbenches or updated existing ones

caosjr added 3 commits July 1, 2025 22:34
* Extend SDO support to 8 (symmetrical with SDI support);
* Update SDI to use asymmetrical FIFO;
* Insert symmetrical FIFO for the SDO;
* Insert SPI lane mask configuration instruction to reg 2'b11;
* Insert offload active interface for interconnect and execution;
* Remove register 8'h3b from spi engine regmap.

Prefetching on offload work iff all lanes are active.

Signed-off-by: Carlos Souza <[email protected]>
* Update documentation to include the changes done
for supporting more than one SDO lane.
* Update the register map.

Signed-off-by: Carlos Souza <[email protected]>
Removed dead code from Util AXIS FIFO ASYM library.

Signed-off-by: Carlos Souza <[email protected]>
Copy link
Contributor

@LBFFilho LBFFilho left a comment

Choose a reason for hiding this comment

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

Overall this seems headed in a nice direction, and thanks for also doing a lot of small fixes and improvements to the existing code along the way.

About the version: is this going to be a minor version or a major version bump? I understand that the removed register was not used anywhere (it was broken even), but technically we're breaking anything that relied on it. Also changing the behavior of the SDI & SDO FIFOs.

Also, please check timing on ad4052/de10nano just to be sure if it's all good.

@@ -69,7 +70,7 @@ module spi_engine_execution #(

input echo_sclk,
output reg sclk,
output reg sdo,
output reg [NUM_OF_SDI-1:0] sdo,
Copy link
Contributor

Choose a reason for hiding this comment

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

Since now this applies to both sdi and sdo, please rename it to reflect the change.

@caosjr caosjr force-pushed the sdo_extension_spi_engine branch 3 times, most recently from 8a2552e to 15eaefd Compare July 4, 2025 14:44
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.

2 participants