Commit Graph

4847 Commits (6be4658d491032a366f8b550e89df335f57db712)

Author SHA1 Message Date
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 db51fb2829 daq3: ZCU102: Remove Offload FIFO for ADC path.
DAC FIFO cannot be increased because of timing violations
2018-08-23 18:06:32 +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
Adrian Costina 563710e904 daq3: ZCU102: Fixed system_top to be similar with ZC706. Updated constraints to specify exactly transceiver pin locations 2018-08-23 18:06:32 +03:00
AndreiGrozav 9418fcec24 fmcomms5/zcu102/system_constr.xdc: Fix typo 2018-08-23 18:01:20 +03:00
AndreiGrozav 97b1d3a21e common/daq2: Fix typo 2018-08-23 15:13:58 +03:00
AndreiGrozav 87b099d498 daq2/common: Add default util_adxcvr parameters 2018-08-21 17:12:31 +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 2293374307 adc|dac_fifo: Maximize the depth of each instance of the internal RAM FIFOs
The affected projects are:
  - FMCADC2/VC707 - 16Mb
  - FMCADC5/VC707 - 16Mb
  - DAQ2/ZC706  - ADC@1GB and DAC@8Mb
  - DAQ2/KC705  - ADC@4Mb and DAC@4Mb
  - DAQ2/VC707  - ADC@8Mb and DAC@8Mb
  - DAQ2/KCU105 - ADC@4Mb and DAC@4Mb
  - DAQ2/ZCU102 - ADC@8Mb and DAC@8Mb
  - DAQ3/ZC706  - ADC@1GB and DAC@8Mb
  - DAQ3/KCU105 - ADC@4Mb and DAC@4Mb
  - DAQ3/ZCU102 - ADC@8Mb and DAC@8Mb
  - ADRV9371x/KCU105 - DAC@8Mb
  - ADRV9371x/ZCU102 - DAC@16Mb
2018-08-21 11:44:05 +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 fa6f45a406 adrv936x, fmcomms2/5, usrpe31x: Fix warning on the dac path
Fix warnining regarding SYNC_TRANSFER_START parameter which doesn't
apply when the axi_dmac is configured for the tx path.
2018-08-20 14:29:57 +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 ec400e5865 adrv9361z7035/ccfmc: Replace VDMA with ADI DMAC 2018-08-20 14:28:01 +03:00
AndreiGrozav 4f1c748d8a common/zc702: Replace VDMA with ADI DMAC 2018-08-20 14:28:01 +03:00
AndreiGrozav 6ef268bb31 common/zc706: Replace VDMA with ADI DMAC 2018-08-20 14:28:01 +03:00
AndreiGrozav a0e3997687 common/zed_system_bd.tcl: Replace VDMA
Replace Xilinx VDMA IP with ADI axi_dmac IP.
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
AndreiGrozav 1c75c7b9ca common/mitx045: Remove carrier support 2018-08-16 10:05:02 +03:00
AndreiGrozav 449911fd8f Remove adv7511/common: Deprecated
The common/adv7511_bd.tcl was used by projects based on microblaze
architectures, which are not supported anymore.
2018-08-16 10:05:02 +03: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
AndreiGrozav 4ddbb57749 daq3, fmcomms2/5: Cosmetic update only of the xdc files 2018-08-13 17:45:53 +03:00
AndreiGrozav c8fec4f70e daq3,fmcomms2/5 on zcu102: Fix warnings
DIFF_TERM is not supported in UltraScale devices.
2018-08-13 17:45:53 +03:00
Lars-Peter Clausen 5b94533cd0 adi_board.tcl: ad_ip_instance: Add support for specifying IP parameters
Add support for specifying a set of parameter value pairs when
instantiating an IP core to the ad_ip_instance command. This has the
convenience of not having to repeatedly call ad_ip_parameter with the name
of the core that got just created for each parameter that needs to be set.

It is also useful for cases where some parameters have mutually exclusive
values and both (or more) have to be set at the same time.

This also slightly speeds things up. Whenever a parameter is changed the
core needs to be updated and post configuration scripts might run. When
setting all parameters at the same time this only happens once instead of
once for each parameter.

For example the following sequence

  ad_ip_instance axi_dmac axi_ad9136_dma
  ad_ip_parameter axi_ad9136_dma CONFIG.DMA_TYPE_SRC 0
  ad_ip_parameter axi_ad9136_dma CONFIG.DMA_TYPE_DEST 1
  ad_ip_parameter axi_ad9136_dma CONFIG.DMA_DATA_WIDTH_SRC 64
  ad_ip_parameter axi_ad9136_dma CONFIG.DMA_DATA_WIDTH_DEST 256

can now be replaced with

  ad_ip_instance axi_dmac axi_ad9136_dma [list \
    DMA_TYPE_SRC 0 \
    DMA_TYPE_DEST 1 \
    DMA_DATA_WIDTH_SRC 64 \
    DMA_DATA_WIDTH_DEST 256 \
  ]

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
2018-08-10 16:12:26 +02:00
Laszlo Nagy 31318cf311 all/system_top.v: drive unused gpio inputs with zero
The loopback on the unused gpio inputs consumes routing resources
while does not gives any value for the software.

Connect these lines to zero instead.
2018-08-10 17:00:11 +03:00
Laszlo Nagy ec8a2cd9c5 adrv936x/ccbox_lvds: unconnected clock for ad9361 input protection
The 9361 protection circuits have no clocks connected,
export the clock from the block design for them.
2018-08-10 17:00:11 +03:00
Laszlo Nagy 05789e8978 adrv9009/adrv9371x/fmcomms2:Drop usage of ad_iobuf on non-bidirectional IOs
Some projects use the ad_iobuf on IOs that are not bidirectional
producing synthesis warnings.

The change fixes warnings like:
[Synth 8-6104] Input port 'gpio_bd_i' has an internal driver
[Synth 8-6104] Input port 'gpio_status' has an internal driver
2018-08-10 17:00:11 +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 059933b9c1 fmcadc4: Fix chip selects for ada4961 c,d channels
Chip selects for ada4961 C,D were always active since they were not
driven correctly.
2018-08-10 17:00:11 +03:00
Laszlo Nagy f0edafc4dc axi_spdif_rx: clear warning 2018-08-10 17:00:11 +03:00