-
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
Conversation
89f3695
to
34cc108
Compare
d56ac14
to
eaa169f
Compare
RetriggerCI |
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:
61b9262
to
88d95f8
Compare
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.
Looks good, here are some improvement suggestions.
For the other reviewers: I want to highlight the AUTORUN support for the Scatter-Gather transfers. |
4241039
to
d105e07
Compare
3b51c12
to
cac1b84
Compare
Signed-off-by: Jorge Marques <[email protected]>
3f0a021
to
d5ae38b
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 desertion. This is mostly useful together with the CYCLIC mode. Signed-off-by: Jorge Marques <[email protected]>
Signed-off-by: Jorge Marques <[email protected]>
d5ae38b
to
e78902f
Compare
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