Commit Graph

2376 Commits (cfc8ff51e11da382f0bc14c55189ec6bdff61d3a)

Author SHA1 Message Date
Istvan Csomortani f15ed8475e util_pulse_gen: Change the counter to a down-counter
To prevent the case, when after an invalid configuration, the generated
output PWM signal is constant HIGH, change the counter to a
down-counter. In this way the pulse will be placed at the end of the
PWM period, and if the configured width value is higher than the
configured period the output signal will be constant LOW.
2019-03-20 08:21:08 +00:00
Istvan Csomortani 2d7b189ba3 util_pulse_gen: Add an input configuration port for pulse width attribute 2019-03-19 16:33:10 +00:00
Sergiu.Arpadi 0e333bf5ae axi_i2s_adi: fixed xdc
ip now sets the xdc to late so that the timing constraints are set in the correct context
2019-03-18 13:58:28 +00:00
Laszlo Nagy a3ce8c5ca6 axi_rd_wr_combiner: Add rlast to the AXI MM interface
The DMAC is relying on the rlast signal that marks the end of a burst.
2019-02-21 17:09:53 +02:00
Laszlo Nagy c10c4d4f5e up_dac_common: fix address decoding
Patch the typo introduced in a previous commit while attempting the
address space reduction.
2019-02-19 15:38:45 +02:00
AndreiGrozav 1c8172de7f axi_adc_trigger: Cosmetic update
Use localparam DW = 15 - SIGN_BITS
2019-02-18 13:39:24 +02:00
AndreiGrozav 44e20d095c axi_adc_trigger: Fix triggering jitter effect 2019-02-18 13:39:24 +02:00
AndreiGrozav 2ec578c216 axi_hdmi_tx: Update file sources for Intel designs 2019-02-12 10:43:46 +02:00
AndreiGrozav fae4d478d4 ad_csc: Generalize for CrYCB 2 RGB conversion 2019-02-12 10:43:46 +02:00
AndreiGrozav 74eacc2369 ad_csc(RGB2CrYCb): use signed multiplication. 2019-02-12 10:43:46 +02:00
AndreiGrozav 265781f29a axi_hdmi: Let the tools assign the csc resources
Write code to pipeline data path for better DSP utilization on the
color space conversion.
In the old method the addition operations were performed outside the
DSPs
2019-02-12 10:43:46 +02:00
Adrian Costina 47f7894881 util_adxcvr: Initial commit for QPLL1 support (GTH3 and GTH4) 2019-02-11 17:20:08 +02:00
Laszlo Nagy ca1ba6a6fe axi_ad9144/axi_ad9152: patch up_tpl_common dependency 2019-02-01 08:28:28 +00:00
Istvan Csomortani b2d86bab47 util_axis_fifo: Fix the FIFO level generation in ASYNC mode
The FIFO functions in 'first fall through' mode, adjust the fifo level
generation so it take into account the valid data which sits on the bus,
waiting for ready, too.
2019-01-29 11:38:28 +02:00
Laszlo Nagy b221718bfe jesd204:up_tpl_common: reduce and move address space
Limit the tpl register space to 128 locations mapped to 128-255 in the COMMON_ID segment.
2019-01-23 17:44:33 +02:00
Laszlo Nagy 93df754800 up_adc_common/up_dac_common: reduce address space to half
Limit the adc/dac common space to 128 registers mapped 0-127 in the COMMON_ID segment.
2019-01-23 17:44:33 +02:00
Laszlo Nagy cf593d5a40 jesd204_tpl: addresses cleanup
The TPL has an address space of 12 bits while the legacy subcomponents
have 16 bits. Update the module for a better readability.
2019-01-23 17:44:33 +02:00
Laszlo Nagy 560e9b9e52 jesd204_tpl: expose jesd parameters to software
This change will allow software to identify the available JESD framer/deframer
settings from the transport layer.
2019-01-23 17:44:33 +02:00
Laszlo Nagy c6c825c90a jesd204/tb: support for ModelSim and Xsim
Adding support for ModelSim and Vivado Xsim.

Usage:
  export SIMULATOR=modelsim
    or
  export SIMULATOR=xsim
2019-01-21 10:33:30 +02:00
Adrian Costina b052e40637 ad_ip_jesd204_tpl: Fix chanmax reporting for both ADC and DAC 2019-01-16 11:40:17 +02:00
Laszlo Nagy 3d7a376f8b Makefile: update makefiles 2018-12-21 17:32:48 +02:00
Laszlo Nagy a65bafb056 ad_ip_jesd204_tpl_dac: expose OCTETS_PER_BEAT parameter 2018-12-21 17:32:48 +02:00
Laszlo Nagy fc74201c88 axi_dmac: patch version checking
Current implementation does not supports updated versions of Vivado
e.g. 2017.4.1 or 2018.2.1

This fix ignores the update number from the version checking.
2018-12-20 10:32:48 +02:00
Laszlo Nagy 032bf7c3ef jesd204: create wrappers around TPLs in BD 2018-12-04 14:02:22 +02:00
Laszlo Nagy 8bce4c5b0a jesd204_tpl: update address widths of TPL instances 2018-12-04 14:02:22 +02:00
Laszlo Nagy 57f83f86ab jesd204_tpl: reduce address width of TPLs
Registers from this component can fit in the 2k address range.
Since Vivado's minimal address range is 4k, use that instead.
This will allow placing the independent TPLs to base addresses
that mach the addresses from the monolithic blocks ensuring no software
intervention.
2018-12-04 14:02:22 +02:00
Laszlo Nagy 26c0121f4d ud_ip_jesd204_tpl_adc: update TPL instances 2018-12-04 14:02:22 +02:00
Laszlo Nagy 9c51f7f975 ad_ip_jesd204_tpl_adc: make core more generic 2018-12-04 14:02:22 +02:00
Laszlo Nagy f41806c1be common/ad_xcvr_rx_if: make core more generic 2018-12-04 14:02:22 +02:00
Laszlo Nagy 41413a8ffe ad_ip_jesd204_tpl_adc: make PN monitor more generic 2018-12-04 14:02:22 +02:00
Laszlo Nagy c34a304d3c ad_ip_jesd204_tpl_adc: expose core in IP catalog 2018-12-04 14:02:22 +02:00
Lars-Peter Clausen 804c57aabc axi_dmac: Remove length alignment requirement for MM interfaces
The DMAC has the requirement that the length of the transfer is aligned to
the widest interface width. E.g. if the widest interface is 256 bit or 32
bytes the length of the transfer needs to be a multiple of 32.

This restriction can be relaxed for the memory mapped interfaces. This is
done by partially ignoring data of a beat from/to the MM interface.

For write access the stb bits are used to mask out bytes that do not
contain valid data.

For read access a full beat is read but part of the data is discarded. This
works fine as long as the read access is side effect free. I.e. this method
should not be used to access data from memory mapped peripherals like a
FIFO.

This means that for example the length alignment requirement of a DMA
configured for a 64-bit memory and a 16-bit streaming interface is now only
2 bytes instead of 8 bytes as before.

Note that the address alignment requirement is not affected by this. The
address still needs to be aligned to the width of the MM interface that it
belongs to.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
2018-11-30 23:41:49 +02:00
Lars-Peter Clausen 7986310fa0 axi_dmac: burst_memory: Add support for using asymmetric memory
FPGAs support different widths for the read and write port of the block
SRAM cells. The DMAC can make use of this feature when the source and
destination interface have a different width to up-size/down-size the data
bus.

Using memory cells with asymmetric port width consumes the same amount of
SRAM cells, but allows to bypass the re-size blocks inside the DMAC that
are otherwise used for up- and down-sizing. This reduces overall resource
usage and can improve timing.

If the ratio between the destination and source port is too larger to be
handled by SRAM alone the SRAM block will be configured to do partial up-
or down-sizing and a resize block will be inserted to take care of the
remaining up-/down-sizing. E.g. if a 256-bit interface is connected to a
32-bit interface the SRAM will be used to do an initial resizing of 256 bit
to 64 bit and a resize block will be used to do the remaining resizing from
64 bit to 32 bit.

Currently this feature is disabled for Intel FPGAs since Quartus does not
properly infer a block RAM with different read and write port widths from
the current ad_asym_mem module. Once that has been resolved support for
asymmetric memories can also be enabled in the DMAC.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
2018-11-30 23:41:49 +02:00
Lars-Peter Clausen c8900eb8ab axi_dmac: burst_memory: Move src valid bytes resizing to resize_src module
The handling of the src_data_valid_bytes signal and its related signal is
tightly coupled to the behavior of the resize_src module. The code that
handles it makes assumptions about the internal behavior of the resize_src
module.

Move the handling of the src_data_valid_bytes signal when upsizing the data
bus into the resize_src module so that all the code that is related is in
the same place and the code outside of the module does not have to care
about the internals.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
2018-11-30 23:41:49 +02:00
Lars-Peter Clausen 00090b1899 axi_dmac: burst_memory: Consider DMA_LENGTH_ALIGN
The DMA_LENGTH_ALIGN LSBs of all length For the most part the tools are
able to deduce this using constant propagation.

But this propagation does not work across the asynchronous meta data FIFO
in the burst memory module.

Add a DMA_LENGTH_ALIGN parameter to the burst_memory module which is used
to explicitly keep the LSBs of length registers on the destination side
fixed at 1'b1. This reduces resource use and improves timing by allowing
better constant propagation and unused logic elimination.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
2018-11-30 23:41:49 +02:00
Lars-Peter Clausen 34e89b9e39 axi_dmac: burst_memory: Reset beat counter at the end of each burst
This simplifies the burst length in the response manager significantly
while not costing much extra resources in the burst memory.

This change will also enable other future improvements.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
2018-11-30 23:41:49 +02:00
Lars-Peter Clausen 764f31463e axi_dmac: tb: Allow testing asymmetric interface widths
One of the major features of the DMAC is being able to handle non matching
interface widths for the destination and source side.

Currently the test benches only support the case where the width for the
source and the destination side are the same. Extend them so that it is
possible to also test and verify setups where the width is not the same.

To accomplish this each byte memory location is treated as if it contained
the lower 8 bytes of its address. And then the written/read data is
compared to the expected data based on that.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
2018-11-30 23:41:49 +02:00
Lars-Peter Clausen 29e6bbde88 altera: adi_jesd204: Add support for more than 6 transmit lanes
On Arria10 there are 6 transceivers in a single bank. If more than 6
transceivers are used these will end up in multiple banks.

The ATX PLL can directly connect to the transceivers in the same bank
through the 1x clock network. To connect to transceivers in another bank it
has to go through a master clock generation block (MCGB) and the xN clock
network.

Add support for instantiating the MCGB if more than 6 lanes are used. In
this case the first 6 transceivers will still have a direct connection to
the PLL while all other transceivers will be clocked by the MCGB.

Note that this requires that the first 6 transceivers are all in the same
bank.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
2018-11-28 11:33:37 +02:00
Lars-Peter Clausen a0309e3e3a Remove old util_cpack and util_upack core
All projects have been updated to use the new pack/unpack infrastructure.
The old util_cpack and util_upack cores are now unused an can be removed.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
2018-11-28 11:33:11 +02:00
Lars-Peter Clausen 0a30cdbf99 Add util_cpack2 core
The util_cpack2 core is similar to the util_upack core. It packs, or
interleaves, a data from multiple ports into a single data. Ports can
optionally be enabled or disabled.

On the input side the cpack2 core uses a multi-port FIFO interface. There
is a single data write signal (fifo_wr_en) for all ports. But each port can
be individually enabled or disabled using the enable signals.

On the output side the cpack2 core uses a single port FIFO interface. When
data is available on the output interface the data write signal
(packed_fifo_wr_en). Data on the packed_fifo_wr_data signal is only valid
when packed_fifo_wr_en is asserted. At other times the content is
undefined. The cpack2 core offers no back-pressure. If data is not consumed
when it is made available it will be lost.

Data from the input ports is accumulated inside the cpack2 core and if
enough data is available to produce a full output vector the data is
forwarded.

This core is build using the common pack infrastructure. The core that is
specific to the cpack2 core is mainly only responsible for generating the
control signals for the external interfaces.

The core is accompanied by a test bench that verifies correct behavior for
all possible combinations of enable masks.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
2018-11-28 11:33:11 +02:00
Lars-Peter Clausen 90540bf447 Add util_upack2 core
The util_upack2 core is similar to the util_upack core. It unpacks, or
deinterleaves, a data stream onto multiple ports.

The upack2 core uses a streaming AXI interface for its data source instead
of a FIFO interface like the upack core uses.

On the output side the upack2 core uses a multi-port FIFO interface. There
is a single data request signal (fifo_rd_en) for all ports. But each port
can be individually enabled or disabled using the enable signals.

This modified architecture allows the upack2 core to better generate the
valid and underflow control signals to indicate whether data is available
in a response to a data request.

If fifo_rd_en is asserted and data is available the fifo_rd_valid signal
are asserted in the following clock cycle. The enabled fifo_rd_data ports
will be contain valid data during the same clock cycle as fifo_rd_valid is
asserted. During other clock cycles the output data is undefined. On
disabled ports the data is always undefined.

If no data is available instead the fifo_rd_underflow signal is asserted in
the following clock cycle and the output of all fifo_rd_data ports is
undefined.

This core is build using the common pack infrastructure. The core that is
specific to the upack2 core is mainly only responsible for generating the
control signals for the external interfaces.

The core is accompanied by a test bench that verifies correct behavior for
all possible combinations of enable masks.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
2018-11-28 11:33:11 +02:00
Lars-Peter Clausen 7f74e5cc39 Add util_pack infrastructure
Pack and unpack operations are very similar in structure as such it makes
sense for pack and unpack core to share a common infrastructure.

The infrastructure introduced in this patch is based on a routing network
which can implement the pack and unpack operations and grows with a
complexity of N * log(N) where N is the number of channels times the number
of samples per channel that are process in parallel.

The network is constructed from a set of similar stages composed of either
2x2 or 4x4 switches. Control signals for the switches are fully registered
and are generated one cycle in advance.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
2018-11-28 11:33:11 +02:00
Adrian Costina d4b0f78192 axi_adrv9009: Split DATAPATH parameter in multiple parameters for Intel IP 2018-11-27 15:31:21 +02:00
Adrian Costina a5b7699bd5 axi_adxcvr: Fix typo in initial parameters values 2018-11-16 14:18:33 +02:00
Adrian Costina e1f15f946b axi/util_adxcvr: Add register to control eyescan reset 2018-11-16 14:18:33 +02:00
Adrian Costina b4ea058085 axi_adxcvr: axi_adxcvr_es.v cleanup trailing whitespaces 2018-11-16 14:18:33 +02:00
Adrian Costina 98d3d44fd1 axi_adxcvr: Fix eyescan support for ultrascale plus devices 2018-11-16 14:18:33 +02:00
Istvan Csomortani 46f16f0e99 axi_dmac/tb: Add support for xsim
Add support for Vivado's simulator. By default the run script is using
the Icarus simulator.

If the user want to switch to another simulator, it can be explicitly
specify the required simulator tool in the SIMULATOR variable.
Currently, beside Icarus, Modelsim (SIMULATOR="modelsim") and Vivado's
xsim (SIMULATOR="xsim") is supported.
2018-11-07 12:13:06 +02:00
Lars-Peter Clausen d72fac4b1e Add missing timescale annotations
For consistent simulation behavior it is recommended to annotate all source
files with a timescale. Add it to those where it is currently missing.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
2018-10-17 10:32:47 +03:00
AndreiGrozav 251ea9471c Remove Xilinx 6 series support
The primitives are not used or supported by the newer versions of Vivado.
2018-10-17 10:06:40 +03:00
Lars-Peter Clausen 8fdd27c605 axi_ad9361: Mark rst output as active high
By default inferred output reset signals have an active low polarity. The
axi_ad9361 rst output signal is active high though. Currently when
connecting it to a input reset with active high polarity will generate an
error in IPI.

Fix this by explicitly marking the polarity of the rst signal as active
high.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
2018-10-16 15:14:53 +03:00
Istvan Csomortani 65ae466cc9 util_dacfifo: Delete unused registers 2018-10-16 10:29:37 +03:00
Istvan Csomortani d0adbb718a util_dacfifo: Update constraint file
Delete deprecated, old constraints; update the constraint flag from
'hier' to 'hierarchical'.
2018-10-16 10:29:37 +03:00
Lars-Peter Clausen b7ea846c40 ad_ip_jesd204_tpl_dac: Use perfect shuffle helper module
Replace the open-coded instances of a perfect shuffle in the DAC framer with
the new helper module.

Using the helper module gives well defined semantics and hopefully makes
the code easier to understand.

There are no changes in behavior.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
2018-10-15 15:34:31 +03:00
Lars-Peter Clausen 67f204e10e library: Add perfect shuffle module
The perfect shuffle is a common operation in data processing. Add a shared
module that implements this operation.

Having this in a shared module rather than open-coding every instance makes
sure that there are clear and well defined semantics associated with the
operation that are the same each time. This should ease review, maintenance and
understanding of the code.

The perfect shuffle splits the input vector into NUM_GROUPS groups and then
each group in WORDS_PER_GROUP. The output vector consists of
WORDS_PER_GROUP groups and each group has NUM_GROUPS words. The data is
remapped, so that the i-th word of the j-th word in the output vector is
the j-th word of the i-th group of the input vector.

The inverse operation of the perfect shuffle is the perfect shuffle with
both parameters swapped.
I.e. [perfect_suffle B A [perfect_shuffle A B data]] == data

Examples:
  NUM_GROUPS = 2, WORDS_PER_GROUP = 4
    [A B C D a b c d] => [A a B b C c D d]
  NUM_GROUPS = 4, WORDS_PER_GROUP = 2
    [A a B b C c D d] => [A B C D a b c d]
  NUM_GROUPS = 3, WORDS_PER_GROUP = 2
    [A B a b 1 2] => [A a 1 B b 2]

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
2018-10-15 15:34:31 +03:00
Istvan Csomortani e7ea5dfa11 util_dacfifo: Align the dac_xfer_out to the first valid data 2018-10-11 16:57:30 +03:00
Istvan Csomortani a088a92364 util_dacfifo: Update the dma_ready generation
The write logic (DMA side) has to be independent from the read logic (DAC side).
In general the FIFO is always ready for the DMA, and every DMA transaction will
interrupt the read-back process, and the module will stop sending data,
until the initialization is finished.

Bringing back the write address tot he DMA clock domain is totally
redundant, so delete it.
2018-10-11 16:57:30 +03:00
Istvan Csomortani d2939f2a44 util_dacfifo: Simplify the write into buffer validation 2018-10-11 16:57:30 +03:00
Istvan Csomortani fa32ea8f1f util_dacfifo: Fix the reset logic of the module
Both the DMA and DAC side should be in reset at the positive edge of the
dma_xfer_req, so we can re-initialize the buffer.
2018-10-11 16:57:30 +03:00
Istvan Csomortani 6044aa3956 util_dacfifo: Update the bypass logic 2018-10-11 16:57:30 +03:00
Istvan Csomortani 6be4658d49 util_dacfifo_bypass: The FIFO in this module is for CDC only, no need to have a large depth 2018-10-11 16:57:30 +03:00
Istvan Csomortani 5b5218250b axi_dacfifo: Move util_dacfifo_bypass module to util_dacfifo IP 2018-10-11 16:57:30 +03:00
AndreiGrozav f8d38c9149 axi_ad6676: Support multiple lane configuration
Propagate parameter to tpl core.
2018-10-05 15:19:17 +03:00
AndreiGrozav 2756c153b7 axi_ad6676: Cosmetic update only 2018-10-04 16:08:31 +01:00
AndreiGrozav de725b8294 axi_ad6676: Support multiple lane configuration
-expose jesd lane nr parameter
2018-10-04 16:06:19 +01:00
Istvan Csomortani 42127c07fc util_adxcvr: Expose QPLL and CPLL *_CFG attributes 2018-10-04 14:37:02 +03:00
Istvan Csomortani 740715c6b3 util_adxcvr: Update GHTE4 input port from the wizard 2018-10-04 14:37:02 +03:00
Istvan Csomortani 0d3e05b311 axi|util_adxcvr: Expose TX configurable driver ports
Expose the TX configurable driver ports, more specifically the
TX_DIFFCTRL, TX_POSTCURSORE and TX_PRECURSORE for software. This
provides a soft tunning capability of the transmit side of the
transceivers, in cases where the insertion loss of the channel is too
high or low, comparing to the default value supported by the default
configuration of the GTs.

You can find information about these configuration ports under the
section called 'TX Configurable Driver' in the GT transceivers user
guide. (UG476, UG576)
2018-10-04 14:37:02 +03:00
Istvan Csomortani 2602f239fa interfaces_ip.tcl: Delete trailing white spaces 2018-10-04 14:37:02 +03:00
Istvan Csomortani 8fc6ee8851 util_adxcvr: Define all GTHE4 attribute in binary
This commit does not contain any functional modification.

Because the wizard generates the attributes in binary, we should use
binary mode too, so we can compare different configurations more easily.
2018-10-04 14:37:02 +03:00
Istvan Csomortani e31cfe5639 util_adxcvr_xch: GTHE4 connect CPLL_FBDIV_45 attribute 2018-10-04 14:37:02 +03:00
Istvan Csomortani 99a1768813 Revert "util_adxcvr: Update GTH4 parameter values to work with DAQ3 at 12.33Gbps lane rate"
This reverts commit 9a74a40c49.
2018-10-04 14:37:02 +03:00
AndreiGrozav d865635bc7 axi_hdmi_tx: Associate vdma_clk to s_axis interface 2018-09-27 17:23:17 +03:00
AndreiGrozav c7d9fe56fd axi_hdmi_tx: Create s_axis interface 2018-09-27 11:45:28 +03:00
Laszlo Nagy db25ee1877 axi_dmac: fix transfer start synchronization
This change will fix the transfer start synchronization mechanism used
in the AXIS streaming and FIFO source interfaces.
2018-09-11 17:01:58 +03:00
Adrian Costina b01cf35cf7 axi_adcfifo: Fix constraints to apply also to Ultrascale devices
Used IS_SEQUENTIAL instead of PRIMITIVE_SUBGROUP==flop to identify ff related constraints
2018-09-07 17:44:47 +03:00
Laszlo Nagy 9d6f3de448 axi_dmac: assert xfer_request only when ready
If the req_valid asserts faster than the ID gets synchronized over we
assert the xfer request without being ready to accept data.
This can lead to overflow assertion when using a FIFO like interface.
2018-09-07 11:38:04 +03:00
Laszlo Nagy 20ac7dcaef axi_dmac: component level testbench updates 2018-09-07 11:38:04 +03:00
Laszlo Nagy a4c4e384bb axi_dmac: early abort 2d support 2018-09-07 11:38:04 +03:00
Laszlo Nagy a1cc20e3b9 axi_dmac: early abort support
Data mover/ src axis changes
  Request rewind ID if TLAST received during non-last burst
  Consume (ignore) descriptors until last segment received
  Block descriptors towards destination until last segment received

Request generator changes
  Rewind the burst ID if rewind request received
  Consume (ignore) descriptors until last segment received
  If TLAST happened on last segment replay next transfer (in progress or
   completed) with the adjusted ID
  Create completion requests for ignored segments

Response generator changes
  Track requests
  Complete segments which got ignored
2018-09-07 11:38:04 +03:00
Laszlo Nagy 2f3a95971c axi_dmac: request generator reworked to use FSM 2018-09-07 11:38:04 +03:00
Laszlo Nagy eb40b42c88 axi_dmac: preparation work for reporting length of partial transfers
Length of partial transfers are stored in a queue for SW reads.
The presence of partial transfer is indicated by a status bit.

The reporting can be enabled by a control bit.

The progress of any transfer can be followed by a debug register.
2018-09-07 11:38:04 +03:00
Laszlo Nagy 0203cd6981 axi_dmac: drive destination eot from source side 2018-09-07 11:38:04 +03:00
Laszlo Nagy 681b619fff axi_dmac: wire destination descriptor through source
Drive the descriptor from the source side to destination
so we can abort consecutive transfers in case TLAST asserts.

For AXIS count the length of the burst and pass that value to the
destination instead the programmed one. This is useful when the
streams aborts early by asserting the TLAST. We want to notify the
destination with the right number of beats received.

For FIFO source interface reuse the same logic due the small footprint
even if the stream does not got interrupted in that case.
For MM source interface wire the burst length from the request side to
destination.
2018-09-07 11:38:04 +03:00
Lars-Peter Clausen cf05286b2a axi_jesd204_tx: Fix multi-link constraints
The constraint for the synchronizer that synchronizes the sync_status
signal of the link only works correctly for the first link. For other links
no timing exception is applied, which leads to timing failures.

Fix this by using a wildcard constraint for the synchronizer reg number.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
2018-08-28 15:38:49 +02:00
Lars-Peter Clausen f98c9e439b ad_dds_2: Don't try to round if signal is not truncated
If DDS_DW is equal to DDS_D_DW there is no signal truncation and
consequentially no rounding should be performed. But the check whether
rounding should be performed currently is for if DDS_DW is less or equal to
DDS_D_DW.

When both are equal C_T_WIDTH is 0. This results in the expression
'{(C_T_WIDTH){dds_data_int[DDS_D_DW-1]}};' being a 0 width signal. This is
not legal Verilog, but both the Intel and Xilinx tools seem to accept it
nevertheless.

But the iverilog simulation tools generates the following error:

	ad_dds_2.v:102: error: Concatenation repeat may not be zero in this context.

Xilinx Vivado also generates the following warning:

	WARNING: [Synth 8-693] zero replication count - replication ignored [ad_dds_2.v:102]

Change the condition so that truncation is only performed when DDS_DW is
less than DDS_D_DW. This fixes both the error and the warning.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
2018-08-28 10:08:22 +02:00
Lars-Peter Clausen 396fb183f6 adi_ip_alt: ad_ip_create: Use 'description' for the DISPLAY_NAME propery
The DISPLAY_NAME of a module is supposed to be a short human readable
description of the IP core.

Currently this is set to the name of the IP, which already has its own
property called NAME.

This causes Platform Designer to display the descriptive labels if the IP
core basically as "$ip_core_name ($ip_core_name)".

The value that all current user of ad_ip_create pass for the description
parameter matches this criteria (And not so much the requirements for the
actual DESCRIPTION property).

Change things, so that the DISPLAY_NAME property is set to what is
currently passed as the description parameter.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
2018-08-27 11:53:50 +02:00
Istvan Csomortani af5c71a9b2 axi|util_adxcvr: Delete reset interface inference for PLL resets
The Xilinx's reset interface expect that every reset have an associated
interface and clock signal. The tool will try to find its clock and interface,
and automatically associated clock signal to it.

The PLL resets are individual asynchronous resets. To simplify the design
and avoid invalid critical warnings all the reset interface inference
for the PLL resets were removed.
2018-08-23 18:41:48 +03:00
Istvan Csomortani dd0d9a1392 util_gmii_to_rgmii: Fix ip.tcl script
The property 'name' for GMII interface is automatically defined by the tool
as 'gmii'.

Delete the manual definition.
2018-08-23 18:41:48 +03:00
Istvan Csomortani b748488377 adi_board/adi_ip: Update Vivado version to 2018.2 2018-08-23 18:41:48 +03:00
Lars-Peter Clausen 3c5e53ec12 ad_ip_jesd204_tpl_dac: Add Platform Designer presets
Most converters refer to their different operating modes as a "Mode X"
(where X is a number) in their datasheet. Each mode has a specific framer
configuration associated with it.

Provide a set of Platform Designer (previously known as Qsys) preset files
for each mode. This allows to quickly select a specific operating mode
without having to lookup the corresponding framer configuration from the
datasheet.

A preset can be selected either in the Platform Designer GUI or from a tcl
script using the apply_preset command. E.g.

  add_instance ad9172_transport ad_ip_jesd204_tpl_dac
  apply_preset ad9172_transport "AD9172 Mode 10"

The preset files are generated using the scripts/generate_presets.py
script and the scripts/modes.txt file.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
2018-08-23 18:35:30 +03:00
Lars-Peter Clausen 0636b7f098 ad_ip_jesd204_tpl_dac: hw.tcl: Add mode validation
A converter typically only supports a specific subset of framer
configurations.

Add a configuration parameter to select a specific converter part number.
Based on the selected part a mode validation will be performed and if the
selected framer configuration is not supported by the part an error will be
generated.

This helps to catch invalid configurations early on rather than having to
first build the bitstream and then notice that it does not work.

When using "Generic" for the part configuration parameter no validation
will be done and any framer configuration can be selected.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
2018-08-23 18:35:30 +03:00
Lars-Peter Clausen 5dcdc5198b ad_ip_jesd204_dac_tpl: hw.tcl: Add framer input information parameters
The exact layout of the input data into the DAC transport layer core
depends on the framer configuration. The number of input channels is
always equal to the NUM_CHANNELS parameter, but the number of samples per
channel per beat depends on the ratio of number of lanes, number of
channels and bits per sample.

It is possible to compute this manually, but this might require in-depth
knowledge about how the JESD204 framer works. Add read-only parameters that
display the number of samples per channel per beat as well as the total
width of the channel data signal.

This information can also be queried in QSys scripts and used to
automatically configure the input pipeline. E.g. like the upack core:

  set NUM_OF_CHANNELS  [get_instance_parameter_value jesd204_transport NUM_CHANNELS]
  set CHANNEL_DATA_WIDTH [get_instance_parameter_value jesd204_transport CHANNEL_DATA_WIDTH]

  add_instance util_dac_upack util_upack
  set_instance_parameter_values util_dac_upack [list \
    CHANNEL_DATA_WIDTH $CHANNEL_DATA_WIDTH \
    NUM_OF_CHANNELS $NUM_OF_CHANNELS \
  ]

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
2018-08-23 18:35:30 +03:00
Lars-Peter Clausen e502f94103 ad_ip_jesd204_tpl_dac: hw.tcl: Choose lowest latency SAMPLES_PER_FRAME value
For a specific set of L, M and NP framer configuration parameters there is
an infinite set of possible values for the S and F configuration parameters
as long as S and F are integer and the following relationship is met

  S / F = (L * 8) / (M * NP)

Typically the preferred framer configuration is the one with the lowest
latency. The lowest latency is achieved when S is minimal.

Automatically compute and select this value for S instead of having the
user to manually provide a value.

Since some converters allow modes where S is not minimal provide a manual
overwrite to specify S manually in case somebody wants to use such a mode.

For completeness also add a read-only OCTETS_PER_FRAME (F) parameter that
can be used to verify and check which value for F was chosen.

There is no manual overwrite for F since if L, M, NP and S are set to a
fixed value there is only a single possible value for F, which is computed
automatically.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
2018-08-23 18:35:30 +03:00
Lars-Peter Clausen 169f38e7d1 ad_ip_jesd204_tpl_dac: Add support for modes with N or N' != 16
The ad_ip_jesd204_tpl_dac currently only supports JESD204 modes that have
both N and N' set to 16.

Newer DACs like the AD9172 support modes where N and N' are not equal to
16. Add support for these modes.

The width of the internal channel data path is set to N, only processing as
many bits as necessary. At the framer the data is up-sized to N' bits with
tail bits inserted as necessary. This data is then passed to the link
layer.

The width at the DMA interface is kept at 16 bits per sample regardless of
the configuration of either N or N'. This is done to keep the interface
consistent with the existing infrastructure it will connect to like upack
and DMA. The data is expected to the LSB aligned, the unused MSBs will be
ignored.

Same is true for the test-pattern data registers. These register keep their
existing 16-bit layout, but unused MSBs will be ignored by the core.

The PN generators are modified to create only N bits of data per sample.

Note that while the core can now support modes with N' = 12 there is still
the restriction that requires the number of frames per beat to be an even
number. Which means that not all modes with N' = 12 can be supported yet.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
2018-08-23 18:35:30 +03:00
Lars-Peter Clausen a98bc88b84 ad_ip_jesd204_tpl_dac: Make framer more flexible
The current framer implementation is limited in that it only supports N'=16
and either S=1 or F=1.

Rework the framer implementation to be more flexible and support more
framer setting combinations.

The new framer implementation performs the mapping in two steps. First it
groups samples into frames, as there might be more than one frame per beat.
In the second step the frames are distributed onto the lanes.

Note that this still results in a single input bit being mapped onto a
single output bit and no combinatorial logic is involved. The two step
implementation just makes it (hopefully) easier to follow.

The only restriction that remains is that number of frames per beat must be
integer. This means that F must be either 1, 2 or 4. Supporting partial
frames would result in partial sample sets being consumed at the input,
which is not supported by input pipeline.

The new framer has provisions for handling values for the number of octets
per beat other than 4, but this is not exposed as a configuration option
yet since the link layer can only handle 4 octets per beat. Making the
octets per beat configurable is something for future iterations of the
core.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
2018-08-23 18:35:30 +03:00
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
Lars-Peter Clausen 7d643e216a axi_dmac: Limit number of bursts on the source side
Currently the source side of the DMAC can issue requests for up to
2*FIFO_SIZE-1 bursts even though there is only room for FIFO_SIZE bursts in
the store and forward memory.

This can problematic for memory mapped buses. If the data is not read fast
enough from the DMAC back-pressure will propagate through the whole system
memory subsystem and can cause significant performance penalty or even a
deadlock halting the whole system.

To avoid this make sure that not more that than what fits into the
store-and-forward memory is requested by throttling the request ID based
on how much room is available in the memory.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
2018-07-03 13:44:34 +02:00
Lars-Peter Clausen d80175d895 axi_dmac: Remove second destination side register slice
The second destination side register slice was put in place to provide
additional slack on some of the datapath control signals. It looks as if
this is no longer required for the latest version of the DMA controller.
All timing paths have sufficient margin.

So remove this extra slice register which just takes up resources and adds
pipeline latency.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
2018-07-03 13:44:34 +02:00
Lars-Peter Clausen 0d337edbdf axi_dmac: Eliminate beat counter for the destination interfaces
Currently both the source side and the destination side interfaces employ a
beat counter to identify the last beat in a burst.

The burst memory already has an internal last signal on the destination
side. Exporting it allows the destination side interfaces to use it instead
of having to generate their own signal. This allows to eliminate the beat
counters on the destination side and simplify the data path logic.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
2018-07-03 13:44:34 +02:00
Lars-Peter Clausen 71e14f64e6 axi_dmac: Route destination request ID through the burst memory
Currently the destination side request ID is synchronized response ID from
the source side. This signal is effectively the same as the synchronized
src ID inside the burst memory. The only difference is that they might not
increment in the exact same clock cycle.

Exporting the request ID from the burst memory means we can remove the extra
synchronizer block.

This has the added bonus that the request ID will increment in the same
clock cycle as when the data becomes available from the memory.

This means we can assume that when there is a outstanding burst request
indicated via the ID that data is available from the memory and vice versa
when data is available from the memory that there is a outstanding burst
request.

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