Commit Graph

115 Commits (99412a503e2123d49cd551c88f0ad7380a4ea1fc)

Author SHA1 Message Date
AndreiGrozav 66823682b6 Add FPGA info parameters flow
Common basic steps:
- Include/create infrastructure:

   * Intel:
       - require quartus::device package
       - set_module_property VALIDATION_CALLBACK info_param_validate

   * Xilinx
       - add bd.tcl, containing init{} procedure. The init procedure will be
         called when the IP will be instantiated into the block design.
       - add to the xilinx_blockdiagram file group the bd.tcl and common_bd.tcl
       - create GUI files

- add parameters in *_ip.tcl and *_hw.tcl (adi_add_auto_fpga_spec_params)
- add/propagate the info parameters through the IP verilog files

axi_clkgen
util_adxcvr
ad_ip_jesd204_tpl_adc
ad_ip_jesd204_tpl_dac
axi_ad5766
axi_ad6676
axi_ad9122
axi_ad9144
axi_ad9152
axi_ad9162
axi_ad9250
axi_ad9265
axi_ad9680
axi_ad9361
axi_ad9371
axi_adrv9009
axi_ad9739a
axi_ad9434
axi_ad9467
axi_ad9684
axi_ad9963
axi_ad9625
axi_ad9671
axi_hdmi_tx
axi_fmcadc5_sync
2019-03-30 11:26:11 +02:00
Adrian Costina 8340d4c89d axi_jesd204_common: Fix dependancies so that the IP can be generated Out Of Context 2019-03-21 15:36:57 +02:00
Istvan Csomortani a337774dfa ad_ip_jesd204_tpl_dac: Add 8 bit resolution support 2019-03-20 15:51:28 +02:00
Istvan Csomortani e3e96177c4 ad_ip_jesd204_tpl_adc: Add 8 bit resolution support
Add support for 8 bit resolution for the transport layer.

Fix parameter BITS_PER_SAMPLES propagation to all the internal modules, in
several cases this variable was hard coded to 16.
2019-03-20 15:51: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 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 a65bafb056 ad_ip_jesd204_tpl_dac: expose OCTETS_PER_BEAT parameter 2018-12-21 17:32:48 +02:00
Laszlo Nagy 032bf7c3ef jesd204: create wrappers around TPLs in BD 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 9c51f7f975 ad_ip_jesd204_tpl_adc: 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 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
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 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 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 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
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
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
AndreiGrozav 92f0e809b5 jesd204/ad_ip_jesd204_tpl_dac: Updates for ad_dds phase acc wrapper 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
AndreiGrozav b6663c6e0d jesd204: Update Makefiles
Fix jesd204 library build.
2018-06-11 11:30:47 +03:00
AndreiGrozav 146f85c8fd Fixed typo 2018-06-11 11:30:47 +03:00
Adrian Costina 00973f9a11 jesd204: Fix constraints for axi_jesd_tx
The constraints need to be updated because in commit 0b20dbc2c9 generate was removed
2018-05-10 18:17:32 +03:00
Adrian Costina 2aa3b77a9c jesd204: Add constraints for the rx statistics clock crossing 2018-05-10 16:32:50 +03:00
Adrian Costina 3b9f733408
jesd204: Add RX error statistics (#98)
* jesd204: Add RX error statistics

Added 32 bit error counter per lane, register 0x308 + lane*0x20

On the control part added register 0x244 for performing counter reset and counter mask
Bit 0 resets the counter when set to 1
Bit 8 masks the disparity errors, when set to 1
Bit 9 masks the not in table errors when set to 1
Bit 10 masks the unexpected k errors, when set to 1

Unexpected K errors are counted when a character other than k28 is detected. The counter doesn't add errors when in CGS phase

Incremented version number
2018-05-07 15:33:00 +03:00
Istvan Csomortani 00faa5a660 jesd204:version: Increase version number fot TX
Since the multi-link support is new feature, increase the minor version
number.
2018-05-03 19:37:35 +03:00