Commit Graph

2180 Commits (98d3d44fd1247eae1ef460734ece3a0028d91d37)

Author SHA1 Message Date
Lars-Peter Clausen caa188e5a7 ad_ip_jesd204_tpl_dac: Add Xilinx IP Integrator GUI integration
The ad_ip_jesd204_tpl_dac currently is only instantiated as a submodule by
other cores like the axi_ad9144 or axi_ad9152. These cores typically only
support one specific framer configuration.

In an effort to allow more framer configurations to be used the core is
re-worked, so it can be instantiated standalone.

As part of this effort provide GUI integration for Xilinx IP Integrator
where users can instantiate and configure the core.

For this group the configuration parameters by function, provide
descriptive label and a list of allowed values for parameter validation.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
2018-08-23 18:35:30 +03:00
Lars-Peter Clausen 362ad79e05 ad_ip_jesd204_tpl_dac: Add Intel Platform Designer GUI integration
The ad_ip_jesd204_tpl_dac currently is only instantiated as a submodule by
other cores like the axi_ad9144 or axi_ad9152. These cores typically only
support one specific framer configuration.

In an effort to allow more framer configurations to be used the core is
re-worked, so it can be instantiated standalone.

As part of this effort provide GUI integration for Intel Platform Designer
(previously known as Qsys) where users can instantiate and configure the
core.

For this group the configuration parameters by function, provide
descriptive label and a list of allowed values for parameter validation.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
2018-08-23 18:35:30 +03:00
Lars-Peter Clausen 07ca770607 ad_ip_jesd204_tpl_dac: Removed unused clk signal from framer module
The framer module is purely combinational at this point and the clk signal
is unused.

This is a leftover of commit commit 5af80e79b3 ("ad_ip_jesd204_tpl_dac:
Drop extra pipeline stage from the framer").

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
2018-08-23 18:35:30 +03:00
Lars-Peter Clausen 870d09d44d axi_ad91{44,52}: hw.tcl: Add missing file
Commit 5d044b9fd3 ("ad_ip_jesd204_tpl_dac: Share PN sequence generator
between all channels") add a new file to the ad_ip_jesd204_tpl_dac, but
neglected to update the hw.tcl for the axi_ad9144 and axi_ad9152 which use
this file.

The result is that Intel project using these cores currently do not build.

Fix it by adding the missing file to the file list.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
2018-08-23 18:35:30 +03:00
Adrian Costina 9a74a40c49 util_adxcvr: Update GTH4 parameter values to work with DAQ3 at 12.33Gbps lane rate
Left new parameters values in binary, as that's the way they are generated with the wizard, so future diff should be easier
2018-08-23 18:06:32 +03:00
Laszlo Nagy ef4ceac6fc axi_dmac: Reduce the width of ID signals to minimum
Reduce the width of ID signals to avoid size mismatches in Arria 10 SoC
projects where the ID width of the hard IP is 4.
The width of ID that reaches the slave can be increased by the interconnect if
multiple masters access the slave so we end up with mismatches.

Since these signals are unused it is safe to reduce them to minimum width and
let the interconnect zero-extend them as required.
2018-08-21 14:08:14 +03:00
Laszlo Nagy cff06bd779 axi_dmac: Use AXI3 for DMAC in Intel projects
The buffers inside the interconnect are sized based on maximum burst sizes
the masters can produce.
For AXI4 the max burst size is 128 but for these projects for the
default burst size of 128 bytes the DMACs are creating only burst of 8 or
16 beats depending on the bus width (128bits and 64 bits respectively).

These burst sizes can fit in the AXI3 protocol where the max burst
length is 16. Therefore the interconnect will be reduced.

The observed reduction is around 4 Mb of block RAM per project.
Another benefit is a better timing closure,
since these buffers reside in the DDR3 clock domain.
2018-08-21 14:08:14 +03:00
Istvan Csomortani 79e21a361c util_adcfifo: Synchronize the ad_rst and use it as a synchronous reset
This improvement will solve a couple of [DRC REQP-1839] warning:

"The RAMB36E1 has an input control pin * which is driven by a register * that has
an active asynchronous set or reset. This may cause corruption of the memory
contents and/or read values when the set/reset is asserted and is not analyzed
by the default static timing analysis. It is suggested to eliminate the use of
a set/reset to registers driving this RAMB pin or else use a synchronous reset
in which the assertion of the reset is timed by default."
2018-08-21 11:42:48 +03:00
AndreiGrozav ea6073de22 axi_hdmi_tx: Update axi_hdmi_tx_hw.tcl to support the ADI VDMA 2018-08-20 14:28:01 +03:00
AndreiGrozav 07e5ac8e71 axi_hdmi_tx_vdma: Cosmetic update 2018-08-20 14:28:01 +03:00
AndreiGrozav e607471898 axi_hdmi_tx: Update to use ADI DMA
The frame synchronization between axi_hdmi_tx and axi_dmac is based
on the DMA(2D streaming) last signal. The last signal will be used as
an end of frame signal marking the beginning of the future frame to be
transferred by the DMA.
  Only after both HDMI and DMA are ready for a "new frame" data will be
requested from the DMA.
  The datarate and CDC between the axi_dmac and axi_hdmi_tx cores
will be handled by axi_hdmi_tx's DMA interface based on a backpressure
mechanism.
2018-08-20 14:28:01 +03:00
Lars-Peter Clausen 6fb250ad89 ad_ip_jesd204_tpl_dac: Add interface definition for the link interface
Add a interface definition for the link interface that combines the valid,
ready and data signals into a AXI streaming interface.

This allows to connect the interface to the JESD204 link layer peripheral
in one go without having to manually connect each signal.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
2018-08-16 12:10:34 +02:00
Lars-Peter Clausen ae8ce1ccd8 ad_ip_jesd204_tpl_dac: Fix pattern output correctly when DATA_PATH_WIDTH=1
Some modes produce only one sample per channel per beat, e.g. when M=2*L.

In this case the pattern output needs to alternate between the two patterns
from beat to beat.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
2018-08-16 12:10:34 +02:00
Lars-Peter Clausen 5d044b9fd3 ad_ip_jesd204_tpl_dac: Share PN sequence generator between all channels
All channels have a copy of the same logic to generate the PN sequences.

Sharing the PN sequence generator among all channels slightly reduces the
resource utilization of the core.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
2018-08-16 12:10:34 +02:00
Lars-Peter Clausen 0be4a5c10e ad_ip_jesd204_tpl_dac: Fix PN generator reset state
Only the N (where N is the size of the PN sequence) MSB bits of the reset
state of the PN generator should be set to 1. All other bits should be
initialized following the PN generator sequence.

Otherwise the first set of samples contain an incorrect PN sequence.

This does not increase the complexity of the PN generator, all reset values
are still constant.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
2018-08-16 12:10:34 +02:00
Lars-Peter Clausen 5af80e79b3 ad_ip_jesd204_tpl_dac: Drop extra pipeline stage from the framer
All the inputs to the framer are registered. And the framer itself does not
have any combinatorial logic, it just re-orders the wire numbering of the
individual bits.

Currently the framer module adds a output register stage, but since there
is no logic in the framer this just means that these registers are directly
connected to the output of the previous register stage.

Remove the extra pipeline register. This slightly reduces utilization and
pipeline delay of the core.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
2018-08-16 12:10:34 +02:00
Lars-Peter Clausen 20ee9b8d2a ad_ip_jesd204_tpl_dac: channel: Remove unused registers
Remove unused register from the ad_ip_jesd204_tpl_dac_channel module.

Commit commit 92f0e809b5 ("jesd204/ad_ip_jesd204_tpl_dac: Updates for
ad_dds phase acc wrapper") removed all users of those registers.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
2018-08-16 12:10:34 +02:00
Lars-Peter Clausen 5e8d23eb0a ad_ip_jesd204_tpl_dac: Remove unused parameter
The CHANNEL_WIDTH parameter is unused. Remove it.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
2018-08-16 12:10:34 +02:00
Lars-Peter Clausen 6d362f51ec ad_ip_jesd204_tpl_dac: Drop DAC prefix from parameters
All parameters are DAC related since this is a peripheral that handles
DACs. Having DAC as a prefix on some of the parameter names is a bit
redundant, so remove them.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
2018-08-16 12:10:34 +02:00
Lars-Peter Clausen 3da0294c92 ad_ip_jesd204_tpl_dac: hw.tcl: Use relative paths for local files
Use a relative path for all IP local files. This is the common style
throughout the HDL repository and also makes it easier to move the
directory around.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
2018-08-16 12:10:34 +02:00
Lars-Peter Clausen d034fea754 ad_ip_jesd204_tpl_dac: hw.tcl: Fix typo
s/witdh/width/g

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
2018-08-16 12:10:34 +02:00
Istvan Csomortani bc692b9bd5 ad_rst: Synthesis attribute 'preserve' is redundant 2018-08-14 17:54:14 +03:00
Istvan Csomortani 5b01df91ac ad_rst: All the synchronization registers have to have ASYNC_REG TRUE 2018-08-14 17:54:14 +03:00
Laszlo Nagy fa7c85a9eb all: Drive undriven input signals, complete interface
- connect unused GPIO inputs to loopback
- connect unconnected inputs to zero
- complete interface for system_wrapper instantiated in all system_top

fixes incomplet portlist WARNING [Synth 8-350]
fixes undriven inputs WARNING [Synth 8-3295]

The change excludes the generated system.v and Xilinx files.
2018-08-10 17:00:11 +03:00
Laszlo Nagy f0edafc4dc axi_spdif_rx: clear warning 2018-08-10 17:00:11 +03:00
Istvan Csomortani 495ba3891a ad_tdd_control: Register tdd_endof_frame
Register the tdd_endof_frame control signal to improve timing.
2018-08-10 14:06:38 +03:00
Istvan Csomortani 9eba3e8370 ad_tdd_control: Delete redundant reset from tdd_burst_counter logic
This way we can slightly improve timing.
2018-08-10 14:06:38 +03:00
Istvan Csomortani 375ccac072 ad_tdd_control: Switch '> 0' to '!= 0' to improve design 2018-08-10 14:06:38 +03:00
Istvan Csomortani 7e599ce09c ad_rst: Fix constraints for Intel designs 2018-08-09 10:26:18 +03:00
Istvan Csomortani 949073b012 ad_rst: Update SDC constraints of the module
The asynchronous set paths of the reset synchronization stage should be treated
as false-paths.
2018-08-07 13:35:24 +01:00
Istvan Csomortani 1e7f567e16 ad_rst: Initial value of the registers should be its default value
This patch will fix the following critical warning, generated by Quartus:

"Critical Warning (18061): Ignored Power-Up Level option on the following
registers
  Critical Warning (18010): Register ad_rst:i_core_rst_reg|rst_sync will power
  up to High File: ad_rst.v Line: 50"
2018-08-07 13:35:10 +01:00
Istvan Csomortani 66bf92ec9f axi_gpreg: Use the common ad_rst constraints 2018-08-06 21:24:41 +03:00
Istvan Csomortani 11071516d1 ad_rst: Update all the modules, which instantiate the ad_rst 2018-08-06 21:24:41 +03:00
Istvan Csomortani 472b12feb7 ad_rst: Update the reset synchronizer module
For a proper reset synchronization, the asynchronous reset signal should
be connected to the reset pins of the two synchronizer flop, and the
data input of the first flop should be connected to VCC.

In the first stage  we're synchronizing just the reset de-assertion, avoiding
the scenario when different parts of the design are reseting at different time,
causing unwanted behaviours.

In the second stage we're synchronizing the reset assertion.

The module expects an ACTIVE_HIGH input reset signal, and provides an ACTIVE_LOW
(rstn) and an ACTIVE_HIGH (rst) synchronized reset output signal.
2018-08-06 21:24:41 +03:00
Istvan Csomortani c152b60137 ad_mem_asym: Improve the implementation of the asymmetric RAM
Because the read interface got a read enable port too, update all the
ad_mem_asym instances.
2018-08-06 17:29:05 +03:00
Istvan Csomortani e092149cbc adi_ip: Use 'associate_bus_interface' command to setup the clock and reset for s_axi 2018-08-06 10:14:48 +03:00
Istvan Csomortani 9441f00f5f adi_ip: Define the default driver value to 0 for unused ports 2018-08-06 10:14:48 +03:00
Lars-Peter Clausen d5a1aa81e8 jesd204: Check lane error count in register map testbench
Assign a unique value to each lane's error count register and verify that
the correct value is returned for the right lane.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
2018-07-24 15:20:28 +02:00
Lars-Peter Clausen b2ed915fbc jesd204: Fix RX regmap testbench version ID
The RX register map testbench currently fails because the expected value
for the version register was not updated, when the version was incremented.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
2018-07-24 15:20:28 +02:00
Lars-Peter Clausen 57a5baad33 jesd204: Fix loopback testbench
The loopback testbench currently fails, because the cfg_links_disable signal is not connected to the RX side of the link.

Fix this.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
2018-07-24 15:20:28 +02:00
AndreiGrozav 74288cf9cb axi_hdmi_tx: Added INTERFACE parameter for selecting the interface type
Update all carriers/projects bd for configurable video interface:
- common zc702, zc706, zed
- adrv9361z7035/ccfmc_lvds
- imageon
2018-07-24 15:56:22 +03:00
Laszlo Nagy 0caea39bad jesd204_rx/tx: make SYSREF IOB placement optional
In case when the SYSREF is connected to an FPGA IO which has a limitation
on the IOB register IN_FF clock line and the required ref clock is high
we can't use the IOB registers.
e.g. the max clock rate on zcu102 HP IO FF is 312MHz but ref clock is 375MHz;

If IOB is used in this case a pulse width violation is reported.

This change makes the IOB placement selectable in such case or
for targets which don't require class 1 operation.
2018-07-24 09:16:24 +03:00
Laszlo Nagy 4d8008e64c axi_dmac: fix address width detection
The round function from tcl is a rounding to nearest. Using it in address
width calculation produces incorrect values.
e.g.
 round(log(0xAF000000)/log(2)) will produce 31 instead of 32

The fix is to replace the rounding function with ceiling that guarantees
rounding up.
2018-07-20 18:12:24 +03:00
AndreiGrozav 77db4c200c axi_ad9371: Increase dds quality 2018-07-18 18:19:30 +03:00
AndreiGrozav 89692b40b5 axi_ad9144: Increase dds quality 2018-07-18 18:19:30 +03:00
AndreiGrozav 989fa6fd27 axi_ad9122: Increase dds quality 2018-07-18 18:19:30 +03:00
AndreiGrozav 6083d74857 axi_ad9739a: Use polynomial DDS 2018-07-18 18:19:30 +03:00
AndreiGrozav 79003c53db ad_dds: Fix synthesis updates
- remove reset logic
- add wait for dac valid logic
- rewrite sine concatenation on wires for different path width to
suppress warnings
- use computed atan LUT tables
2018-07-18 18:19:30 +03:00
AndreiGrozav 892febe68a ad_dds_2: Remove unused disable logic feature 2018-07-18 18:19:30 +03:00
AndreiGrozav 8a306ce96b axi_ad9162: Updates for ad_dds phase acc wrapper 2018-07-18 18:19:30 +03:00
AndreiGrozav 8cd88150f1 axi_ad9152: Updates for ad_dds phase acc wrapper 2018-07-18 18:19:30 +03:00
AndreiGrozav a2d3c87aa5 axi_adrv9009: Updates for ad_dds phase acc wrapper 2018-07-18 18:19:30 +03:00
AndreiGrozav 92f0e809b5 jesd204/ad_ip_jesd204_tpl_dac: Updates for ad_dds phase acc wrapper 2018-07-18 18:19:30 +03:00
AndreiGrozav 528460371c axi_ad9963: Updates for ad_dds phase acc wrapper 2018-07-18 18:19:30 +03:00
AndreiGrozav 92dbd75414 axi_ad9739a: Updates for ad_dds phase acc wrapper 2018-07-18 18:19:30 +03:00
AndreiGrozav 25dbca7eed axi_ad9371: Updates for ad_dds phase acc wrapper 2018-07-18 18:19:30 +03:00
AndreiGrozav 42abe0cf46 axi_ad9361: Updates for ad_dds phase acc wrapper 2018-07-18 18:19:30 +03:00
AndreiGrozav d27ed93594 axi_ad9144: Updates for ad_dds phase acc wrapper 2018-07-18 18:19:30 +03:00
AndreiGrozav 4a73e32941 axi_ad9122: Updates for ad_dds phase accumulator wrapper 2018-07-18 18:19:30 +03:00
AndreiGrozav a7f5746afb ad_dds: Add selectable phase width option. 2018-07-18 18:19:30 +03:00
AndreiGrozav 7b553997ab Add ad_dds.v
It will act as a wrapper for the previous dds modules(phase to angle conv.)
this module will furthermore contain the phase accumulator logic.
2018-07-18 18:19:30 +03:00
AndreiGrozav 35e8454fe7 Rename ad_dds.v to ad_dds_2.v 2018-07-18 18:19:30 +03:00
AndreiGrozav ad7e95b169 ad_dds: Add selectable out data width and fair rounding
The CORDIC has a selectable width range for phase and data of 8-24.
Regarding the width of phase and data, the wider they are the smaller
the precision loss when shifting but with the cost of more FPGA
utilization. The user must decide between precision and utilization.

The DDS_WD parameter is independent of CORDIC(CORDIC_DW) or
Polynomial(16bit), letting the user chose the output width.
Here we encounter two scenarios:
 * DDS_DW < DDS data width - in this case, a fair rounding will be
implemented corresponding to the truncated bits
 * DDS_DW > DDS data width - DDS out data left shift to get the
corresponding concatenation bits.
2018-07-18 18:19:30 +03:00
AndreiGrozav 2c1f9193cf ad_dds_1.v: Fully use the selectable data width feature
Update for the parametrized ad_mul module. This will scale
a selectable sine width in a multiplication module.
Rename the data and phase width parameters for legibility.
2018-07-18 18:19:30 +03:00
AndreiGrozav 568f2e180f ad_mul.v: Add parameters for A and B input widths
The out width will be A + B.
This change is backward compatible and it applies to both Altera and Xilinx.
2018-07-18 18:19:30 +03:00
AndreiGrozav 3dc7be3eab ad_dds_sine_cordic: Fix sine pic to pic amplitude.
When the tool calculates the X value for different phase widths, we
get rounding errors for every width in the interval [8;24].
Depending on the width thess errors cause overflows or smaller amplitudes
of the sine waves.
The error is not linear nor proportional with the phase. To fix the issue
a simple aproximation was chosen.
2018-07-18 18:19:30 +03:00
AndreiGrozav 6a1853654a ad_dds: Separated phase width from data width 2018-07-18 18:19:30 +03:00
AndreiGrozav 664c46eb72 ad_dds_sine_cordic: Ajust for rounding errors
And fix comment typo
2018-07-18 18:19:30 +03:00
AndreiGrozav c6173023f8 ad_dds_cordic: Move the shifting operation
Perform the shifting operation before addition/subtraction in a
rotation stage. In the previous method, the result of the arithmetic
operation was shifted and the outcome was presented to the next stage.
In this way, data connections will be reduced between pipeline stages
2018-07-18 18:19:30 +03:00
AndreiGrozav a96d9bd3c2 ad_dds_sine: Cosmetic updates only 2018-07-18 18:19:30 +03:00
AndreiGrozav 43f460e744 ad_dds_cordic_pipe.v: Optimize for implementation
The present changes make better use of the Carry Chain blocks resulting in
fewer FPGA resources being used.
2018-07-18 18:19:30 +03:00
AndreiGrozav dc80048733 ad_dds_sine_cordic.v: Suppress warning
Width mismatch warning from 32 to dynamic width.
2018-07-18 18:19:30 +03:00
AndreiGrozav ad425dee5f ad_dds_1.v: Fix concatenation width mismatch 2018-07-18 18:19:30 +03:00
AndreiGrozav 3b319faef2 axi_ad9963:: Update for CORDIC algorithm
Add the new files to the IP list
Propagate DDS parameters to top file
2018-07-18 18:19:30 +03:00
AndreiGrozav 6f2d18692c axi_ad9739a: Update for CORDIC algorithm
Add the new files to the IP list
Propagate DDS parameters to top file
2018-07-18 18:19:30 +03:00
AndreiGrozav 74609d8fec axi_ad9379: Update for CORDIC algorithm
Add the new files to the IP list
Propagate DDS parameters to top file
2018-07-18 18:19:30 +03:00
AndreiGrozav 2ce10f4504 axi_ad9371: Update for CORDIC algorithm
Add the new files to the IP list
Propagate DDS parameters to top file
2018-07-18 18:19:30 +03:00
AndreiGrozav ca81397410 axi_ad9361: : Update for CORDIC algorithm
Add the new files to the IP list
Propagate DDS parameters to top file
2018-07-18 18:19:30 +03:00
AndreiGrozav 8dd1687094 axi_ad9162: Update for CORDIC algorithm
Add the new files to the IP list
Propagate DDS parameters to top file
2018-07-18 18:19:30 +03:00
AndreiGrozav 69f3a9c952 axi_ad9152: Update for CORDIC algorithm
Add the new files to the IP list
Propagate DDS parameters to top file
2018-07-18 18:19:30 +03:00
AndreiGrozav 72359df31f axi_ad9144: Update for CORDIC algorithm
Add the new files to the IP list
Propagate DDS parameters to top file
2018-07-18 18:19:30 +03:00
AndreiGrozav 2daca03665 axi_ad9122: Update for CORDIC algorithm integration
Add the new files to the IP list
Propagate DDS parameters to top file
2018-07-18 18:19:30 +03:00
AndreiGrozav 4362c35125 ad_dds: Update for CORDIC algorithm integration
Add parameters:
  - to select the sine generator (polynomial/CORDIC)
  - to select the CORDIC data width(default 16)
Suppress the warnings generated when the DDS is disabled.
2018-07-18 18:19:30 +03:00
AndreiGrozav 4c32b47f6a ad_dds_1: Update for CORDIC algorithm integration
Add parameters and the mechanism:
  - to select the sine generator (polynomial/CORDIC)
  - to select the CORDIC data width(default 16)
2018-07-18 18:19:30 +03:00
AndreiGrozav 0e114a39e3 ad_dds: Add sine generator using CORDIC algorithm
https://en.wikipedia.org/wiki/CORDIC
Configurable in/out data width (14,16,18,20);
The HDL implementation requires pipelines, resulting in a
data_width + 2 clock cycles delay between the phase input data and the
sine data. For this reason, a ddata (delay data) was propagated through
the pipeline stages to help in future use scenarios
2018-07-18 18:19:30 +03:00
Lars-Peter Clausen 840dd221b7 jesd204_rx: Count errors only once per character
Typically only one of the character error conditions is true at a time. And
even if multiple errors were present at the same time we'd only want to
count one error per character.

For each character track whether at least one of the monitored error
conditions is true. Then count the number of characters for which at least
one error condition occurred. And finally add that sum to the total numbers
of errors.

This results in a slightly better utilization.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
2018-07-16 09:34:36 +02:00
Lars-Peter Clausen d3b548de65 jesd204_rx: Reset lane error statistics when link is disabled
When the link is explicitly disabled through the control interface reset
the error statistics counter.

There is usually little benefit to preserving until after the link has been
disabled. If software is interested in the values it can read them before
disabling the link. Having them reset makes the behavior consistent with
all other internal state of the jesd204 RX peripheral, which is reset when
the link is disabled.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
2018-07-16 09:34:36 +02:00
Laszlo Nagy e79992f9c5 axi_dmac: TLAST support for 2d transfers
In MM2S applications like video DMA it is useful to mark the end of the stream
with the TLAST.
The change enables the generation of the TLAST on the last beat of the
last row of the 2d transfer.
2018-07-13 13:46:40 +03:00
Laszlo Nagy c5b62a04b7 axi_dmac: fix 2d transfer address width
The index on MSB of addresses was set to 31,
but the width of address in the axi_dmac depends on a parameter.
The mismatch causes issues in the Xilinx simulator which does not extends the
narrower width signal with zeros, instead the wider signal gets 'Z' on its MSBs.
When the address was incremented with the stride it became 'X' due the uninitialized
MSBs.
2018-07-12 16:53:06 +03:00
Laszlo Nagy e794d04cd1 axi_dmac: renamed .h files to .vh
Vivado recognises .h files as C header files,
the expected extension for Verilog Header is .vh
This causes issues in simulating block designs  since these files
won't be exported for the simulation even if they are
part of the simulation fileset.
2018-07-11 11:30:22 +03:00
Laszlo Nagy 7713738d12 axi_dmac: ttcl file support for simulation
When creating a block design targeted for simulation, in the testbench
it is useful to know the parameters of the sub components (e.g DMAC)
Xilinx's way to pass the parameters to the testbench in case of it's AXI
verification IP is through package files. We will do the same for the DMAC.

The package file can be generated from template files (ttcl).
These will be added only to the simulation file set of the project and
won't affect synthesis.
2018-07-11 11:30:22 +03:00
Laszlo Nagy 0d0989da39 axi_dmac: diagnostic interface in bursts
This change adds a diagnostic interface to the DMAC core.
The interface exposes internal information about the core,
information which can't be exposed through AXI registers
due the latency and update rate.

Such information is the fullness of the internal buffer.
For this is exposed in bursts and is driven from the destination
clock domain, as this is reflected in its name.

The signal has a fixed size and is dimensioned by
taking in account the supported maximum number of bursts of 128.
2018-07-10 12:30:34 +03:00
Adrian Costina 1b1f83d328 axi_adrv9009: Use the correct clock for the observation path interface 2018-07-09 12:41:52 +01:00
Laszlo Nagy 7f4b6caa81 axi_dmac: Remove unused constraint
The constraint referred to registers which got renamed,
causing critical warnings.
2018-07-06 16:31:40 +03:00
Laszlo Nagy e2c75c015f axi_dmac: add tlast to the axis interface for Intel
This change adds the TLAST signal to the AXI streaming interface
of the source side for Intel targets.
Xilinx based designs already have this since the tlast is part of the
interface definition.

In order to make the signal optional and let the tool connect a
default value to the it, the USE_TLAST_SRC/DEST parameter is
added to the configuration UI. This conditions the tlast port on
the interface of the DMAC.

Xilinx handles the optional signals much better so the parameter
is not required there.
2018-07-06 16:30:30 +03:00
Lars-Peter Clausen 8ddcffcafc axi_dmac: Enforce transfer length and stride alignments
In its current implementation the DMAC requires that the length of a
transfer is aligned to the widest interface. E.g. if the widest interface
is 128 bits wide the length of the transfer needs to be a multiple of 16
bytes.

If the requested length is not aligned to the interface width it will be
rounded up.

This works fine as long as both interfaces have the same width. If they
have different widths it is possible that the length is rounded up to
different values on the source and destination side. In that case the DMA
will deadlock because the transfer lengths don't match and either not enough
of too much data is delivered from the source to the destination side.

Currently it is up to software to make sure that such an invalid
configuration is not possible.

Also enforce this requirement in the DMAC itself by setting the LSBs of the
transfer length to a fixed 1 so that the length is always aligned to the
widest interface.

Software can also use this to discover the length alignment requirement, by
first writing a zero to the length register and then reading the register
back. The LSBs of the read back value will be non-zero indicating the
alignment requirement.

In a similar way the stride needs to be aligned to the width of its
respective interface, so the generated addresses stay aligned. Enforce this
in the same way by keeping the LSBs cleared.

Increment the minor version number to reflect these changes.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
2018-07-03 13:44:34 +02:00
Lars-Peter Clausen c4cb3dfb37 axi_dmac: Move transfer abort logic to data mover
The transfer abort logic in the src_axi_stream module is making some
assumptions about the internal timings of the data mover module.

Move this logic inside the data mover module. This will make it easier to
update the internal logic without having to update other modules.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
2018-07-03 13:44:34 +02:00
Lars-Peter Clausen 92984dc802 axi_dmac: Move sync transfer start logic to the data mover
The only two users of the data mover module both implement the same
sync-transfer-start logic. Move this into the data mover module to avoid
the duplicated code.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
2018-07-03 13:44:34 +02:00
Lars-Peter Clausen 62969bd7ab axi_dmac: Cleanup data mover
With the recent rework there is now a fair amount of dead code in the
datamover module that is no longer used. Remove it.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
2018-07-03 13:44:34 +02:00
Lars-Peter Clausen 44e09f58cd axi_dmac: Remove backpressure from the source pipeline
Data is gated on the source side interface and not let into the pipeline if
there is no space available inside the store and forward memory.

This means whenever data is let into the pipeline space is available and
backpressure wont be asserted. Remove the backpressure signals altogether
to simplify the design.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
2018-07-03 13:44:34 +02:00