Skip to content

Quartus reset-n fix #1826

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

Quartus reset-n fix #1826

wants to merge 2 commits into from

Conversation

LBFFilho
Copy link
Contributor

@LBFFilho LBFFilho commented Jul 7, 2025

PR Description

Fixes reset polarity on util_sigma_delta_spi, SPI Engine and I3C Controller IPs on Quartus.

Quartus inserts adapters between reset polarities automatically, based on how each reset interface is defined on the block design.
This went by undetected so far because in most use cases the affected IPs had their resets generated by other affected IPs (so it was detecting as the wrong polarity on both the output and input, cancelling out).

This was causing issues on ad411x_ad717x/de10nano because the util_sigma_delta_spi IP would be permanently reset and never trigger. It could have caused issues for other Quartus projects which use either util_sigma_delta_spi, or any of the SPI Engine or I3C Controller framework IPs as long as their reset would come from an unaffected IP.

The second commit cleans up some extra logic on the top level for ad4170_asdz/de10nano and ad469x_evb/de10nano, which was used to synchronize and detect the falling edge of an ADC signal for use as the SPI Engine trigger, but is no longer need since this logic is now present in the SPI Engine.

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

@LBFFilho LBFFilho force-pushed the quartus_resetn_fix branch from 080cb66 to 1272ee7 Compare July 7, 2025 20:09
LBFFilho added 2 commits July 7, 2025 17:46
Quartus detects reset polarity from the signal role, and inserts adapaters
automatically. The IP affected by this commit were previously assigning the
wrong (active high) polarity to active-low resets. This can cause multiple
problems.

The i3c controller and spi engine resets are generated by other IPs in the
framework, and these were also detected as wrong polarity, hence it being
undetected so far.

Signed-off-by: Laez Barbosa <laez.barbosa@analog.com>
ad4170_asdz and ad469x_evb both used some logic at the top level to synchronize
a signal from the ADC to the SPI Engine domain, and then to detect a falling
edge on the synchronized signal, using it as a trigger for the SPI Engine.
Recently, the SPI Engine was updated to use an edge-based trigger, with the
appropriate synchronizer logic added, so this extra logic is no longer needed.

Signed-off-by: Laez Barbosa <laez.barbosa@analog.com>
@LBFFilho LBFFilho force-pushed the quartus_resetn_fix branch from 1272ee7 to aa20b3d Compare July 7, 2025 21:03
@LBFFilho LBFFilho added the bug label Jul 7, 2025
@LBFFilho LBFFilho changed the title Quartus resetn fix Quartus reset-n fix Jul 7, 2025
@@ -32,7 +32,6 @@ proc p_elaboration {} {
# control interface

ad_interface clock ctrl_clk input 1
ad_interface reset spi_resetn input 1 if_spi_clk
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why is this one deleted instead of replaced?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Because it's defined twice on the file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants