-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
AXI DMAC: Add Framelock, AutoRun, fsync, tlast #1332
Open
gastmaier
wants to merge
9
commits into
main
Choose a base branch
from
dmac_framelock_pr
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
gastmaier
requested review from
IuliaCMoldovan,
StancaPop,
LBFFilho,
podgori,
acostina,
AndreiGrozav,
PopPaul2021 and
sarpadi
as code owners
May 20, 2024 13:59
12 tasks
gastmaier
force-pushed
the
dmac_framelock_pr
branch
from
July 16, 2024 16:28
89f3695
to
34cc108
Compare
gastmaier
force-pushed
the
dmac_framelock_pr
branch
from
July 16, 2024 17:41
34cc108
to
da7182a
Compare
Signed-off-by: Jorge Marques <[email protected]>
Signed-off-by: Jorge Marques <[email protected]>
gastmaier
force-pushed
the
dmac_framelock_pr
branch
from
July 18, 2024 16:52
da7182a
to
d56ac14
Compare
The 'framelock' mechanism ensures no buffer is accessed by two DMACs in the same time. The core can operate in two modes: * Writer mode - available in s2mm configuration, the writer DMAC will always skip the current in use reader buffer * Reader mode - available in mm2s configuration, the reader DMAC will try to stay behind the writer buffer by either repeating or skipping buffers according to the speed relationship of the two cores. The tx and rx DMAC cores must be connected through the dedicated 'framelock' interface. They must be programmed with similar settings regarding the buffers size, start address and stride. In 2D mode, the assertion of TLAST on the AXI Stream source interface signalizes the end of frame, but Xilinx IP cores use this to signalize then end of line. Allow to select TLAST to signalize End of Frame and End of Line. Add external synchronization to be able to throttle the consumption of descriptors queued by the software. A transfer will start only after the assertion of the external sync signal. The sync signal can be either in source or destination clock domain or both. This feature does not ensures fixed latency from the assertion of external sync signal and the availability of the data at the destination interface. In cases where software is not available, the autorun feature can be used to set up a single transfer that will be executed after reset deassertion. This is mostly useful together with the CYCLIC mode. Signed-off-by: Jorge Marques <[email protected]>
Signed-off-by: Jorge Marques <[email protected]>
Sanitize bitwise operators and combinational logic to avoid mixing them in the same statement. Signed-off-by: Jorge Marques <[email protected]>
gastmaier
force-pushed
the
dmac_framelock_pr
branch
from
July 18, 2024 17:08
d56ac14
to
eaa169f
Compare
RetriggerCI |
Remove dangling signal Rename signal from *_w to *_s. Redo assign logic. Revert BYTES_PER_BURST_WIDTH registers 1-bit increase. Signed-off-by: Jorge Marques <[email protected]>
Add AUTORUN option to Scather-Gather. Move Framelock enable register from FLAGS to CONTROL. Changes Framelock flag bit from 3 to 4, to allocate 3 for the SG. Signed-off-by: Jorge Marques <[email protected]>
Allow to setup initial/autorun value for SG_ADDRESS register. Signed-off-by: Jorge Marques <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just non-functional changes:
Signed-off-by: Jorge Marques <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
PR Description
General
Adds option for a port default value on
adi_if_ports
AXI DMAC features
Framelock
Operates in two modes:
In summary, allows to lock a framerate, by either skipping or repeating frames, depending on the rate of the incoming data (e.g. AXI HDMI RX, VTPG) and how fast it is consumed (e.g. AXI HDMI TX).
The MSB of the framelock interface indicates if the [MSB-1:0] frame is valid.
TLast
In 2D mode, the assertion of TLAST on the AXI Stream source interface signalizes the end of frame, but Xilinx IP cores use this to signalize then end of line.
Allow to select TLAST to signalize End of Frame and End of Line.
FSync
A transfer will start only after the assertion of the external sync signal.
The sync signal can be either in source or destination clock domain or both.
This feature does not ensures fixed latency from the assertion of external sync signal and the availability of the data at the destination interface.
AutoRun
In cases where software is not available, the autorun feature can be used to set up a single transfer that will be executed after reset deassertion. This is mostly useful together with the CYCLIC mode.
How was this tested?
Last tested commit: 9d44ba3
Test projects are available at branch dmac_framelock.
The tested carrier is ZedBoard.
The project instantiates a video test pattern generator (VTPG), which feeds the AXI DMACs in framelock configuration.
The reader side outputs AXI-Stream to the AXI HDMI TX.
The VTPG, AXI CLKGEN, SYNC Generator (AXI TMR) and AXI HDMI TX were configured directly:
For the DMACs, I used adi-axi-fb.c as a module, with updated register addresses.
Instead of using devmem, devicetree bindings for each IP could have been used;
also, to init the ADV7511, the qv4l2 tool seem to used;
I didn't test the HDMI output in a display, I only sampled the stream with ILAs,
*framelock*
bus signals.Testbenches are available at branch axi_dmac_flock.
The original hw tests (5 years ago) were done using an FMC-IMAGEON board.
Resource usage
Resource usage for the Framelock module, followed by the percentile of the total used by the DMA.
Writer
LUTs: 91 (13.2%)
Registers: 35 (3.3%)
Slice: 32 (9.6%)
Reader
LUTs: 57 (9.5%)
Registers: 41 (5.4%)
Slice: 25 (10.54%)
Notes for reviewers
Check if the used registers are adequate, since it collided with the Scather-Gather at rebase.
See if the test in hw suffice or if some other test is required.
PR Type
PR Checklist