Commit Graph

247 Commits (0ae2a174741a65204b04033a4d366d70d12e14e9)

Author SHA1 Message Date
Laszlo Nagy 94181206c2 jesd204/tb: Update testbenches 2021-02-05 15:24:15 +02:00
Laszlo Nagy 589cfc6b1b jesd204_tx_static_config: Update to Np 12 interface changes 2021-02-05 15:24:15 +02:00
Laszlo Nagy 93897b4cb5 jesd204_rx_static_config: Update to Np 12 interface changes 2021-02-05 15:24:15 +02:00
Laszlo Nagy 71475e7dd8 jesd204: Expose core synthesis parameters through registers
Make synthesis parameters accessible for the drivers.
Rework implementation to reflect the parameters of the actual core and
not of the AXI interfacing core.
2021-02-05 15:24:15 +02:00
Laszlo Nagy 454b900f90 jesd204: Xilinx: NP=12 support
To support deterministic latency with non-power of two octets per frame
(F=3,6) the interface width towards the transport layer must be resized
to match integer multiple of frames.

e.g  Input datapath width = 4; Output datpath width = 6;
  for F=3 one beat contains 2 frames
  for F=6 one beat contains 1 frame

The width change is realized with a gearbox.

Due the interface width change the single clock domain core is split
in two clock domains.
  - Link clock : lane rate / 40 for input datapath width of 4 octets 8b10b
  -              lane rate / 20 for input datapath width of 8 octets 8b10b
  -              lane rate / 66 for input datapath width of 8 octets 64b66b

  - Device clock : Link clock * input data path width / output datapath width

Interface to transport layer and SYSREF handling is moved to device clock domain.

The configuration interface reflects the dual clock domain.

If Input and Output datapath width matches, the gearbox is no longer
required, a single clock can be connected to both clocks.
2021-02-05 15:24:15 +02:00
Laszlo Nagy 6ef803e7ab jesd204: Make character replacement opt in feature
In order to keep resource utilization low and for better timing closure
allow disabling of the character replacement logic.

If the parameter is set the frame alignment monitoring is limited to links
where scrambling is on.
2021-02-05 15:24:15 +02:00
Matt Blanton 7093e10ebf jesd204: Fixed TX frame mark timing. Added start and end of multiframe signals as RX and TX ports 2021-02-05 15:24:15 +02:00
Matt Blanton 400c3927f7 jesd204: Add support for 8-byte JESD204B, frame alignment character insertion/replacement
Add support to JESD204 RX and TX core for 8-byte 8b/10b link mode,
and frame alignment character replace/insert with or without scrambling.
Add support for xcelium simulator to jesd204/tb
Increased cores minor version.
2021-02-05 15:24:15 +02:00
Laszlo Nagy 01f4576fcd ad_ip_jesd204_tpl_dac: added xbar for user channels (dma data)
Allow channels received from dma to re-map to other channels, e.g. allowing
broadcasting the same channel to all channels.

The feature is selectable with synthesis parameter and disabled by default.
2020-11-27 09:45:11 +02:00
Adrian Costina 7309da59d1 ad_ip_jesd204_tpl_dac: Switch to sync arm toggling instead of setting only
Added the second flip flop for timing reasons
2020-11-05 17:42:41 +02:00
Istvan Csomortani 0413bea5c1 ad_ip_jesd204_tpl: Extend valid attribute ranges 2020-10-26 18:12:14 +02:00
Istvan Csomortani 37254358dd makefile: Regenerate make files 2020-10-20 12:51:10 +03:00
Laszlo Nagy c3983d779c ad_ip_jesd204_tpl_adc: Fix PN check for twos complement data format
For devices which have twos complement as data format the MSB of the raw
input must not be toggled.
2020-10-13 12:55:17 +03:00
Josh Blum 6da4f61786 ad_ip_jesd204_tpl_dac_framer: fix localparam ordering
The parameters were not in the order of invocation and this causes an
error in the vivado simulator (xsim).
2020-10-10 08:27:00 +03:00
Laszlo Nagy e759c1855b jesd204: Clean-up combinatorial logic
To correctly model combinatorial logic in always blocks
blocking assignments must be used.
2020-09-29 17:27:42 +03:00
Laszlo Nagy 7c523fbf02 jesd204_rx: Reset frame alignment monitor event generator
If the link is not enabled no event should be generated.
2020-09-29 17:27:42 +03:00
Laszlo Nagy 0ecf4254ec axi_jesd204_rx: Ignore events if link not enabled
When the link is disabled the events can be ignored.
This is required by the free running event counter that can catch
invalid events during startup cased for example by an invalid link clock.
2020-09-29 17:27:42 +03:00
Laszlo Nagy aa4de79045 jesd204/jesd204_rx: Ignore frame alignment errors if lane is not in DATA phase
If the lane looses synchronization due invalid characters or disparity
error the lane alignment monitor checks random input which results in
irrelevant reporting of frame alignment error.
2020-09-29 17:27:42 +03:00
Laszlo Nagy d825fffd62 jesd204/jesd204_rx: Reset error counter once all lanes synced
If all lanes are synchronized (CGS state machine is in DATA phase) for long
enough therefore the link is also synchronized/DATA phase reset the error
counter since the accumulated values during INIT/CHECK are irrelevant.
These errors are handled by the per-lane CGS state machine.

All errors accumulated during INIT/CHECK phase of CGS are relevant only
if the link is unable to reach the DATA phase.
The link stays in DATA phase unless software resets it,
so all errors accumulated during the DATA phase are relevant.
2020-09-29 17:27:42 +03:00
Laszlo Nagy ee143d80d6 jesd204_rx/jesd204_rx_ctrl: Fix de-glitch mechanism
The previous implementation of the de-glitch only delayed the assertion
of the SYNC phase by 64 clock cycles with the DEGLITCH state but if meanwhile
one of the lanes got into a bad state cgs_ready de-asserted the state machine
continued to go SYNCHRONIZED (DATA) state.
This change extends the required number of consecutive cycles while all lanes
must stay in data phase before moving the link to SYNCHRONIZED state from 8 to 256;
This increases the reliability of link bring-up without needing extra
link restarts from software side.
2020-09-29 17:27:42 +03:00
Laszlo Nagy 5edc798b6b axi_jesd204_common/jesd204_up_common: Add event stats
Add statistics for :
 - number of link enable events
 - number of interrupt events (regardless of mask)

0x0B0 0x2C0 Stats Control Register
  [0] - Write 1 to clear stat registers

0x0B1 0x2C4 Link Enable Stat Register
  [15:0] Number of times the link was enabled from power-on or from last
         stat clear

0x0B4 0x2D0 IRQ Stat Register 0
  [31:16] IRQ 1 counter
  [15:0]  IRQ 0 counter

0x0B5 0x2D4 IRQ Stat Register 1
  [31:16] IRQ 3 counter
  [15:0]  IRQ 2 counter

0x0B6 0x2D8 IRQ Stat Register 2
  [31:16] IRQ 5 counter
  [15:0]  IRQ 4 counter

0x0B7 0x2DC IRQ Stat Register 3
  [31:16] IRQ 7 counter
  [15:0]  IRQ 6 counter
2020-09-29 17:27:42 +03:00
Istvan Csomortani 256593623c intel/adi_jesd204: Add an additional pipeline stage to RX soft PCS 2020-09-09 14:15:37 +03:00
Istvan Csomortani 72a4d54b76 jesd204_rx: Fix SDC constraint 2020-09-09 14:15:37 +03:00
Laszlo Nagy b49928fca6 ad_ip_jesd204_tpl_adc: add support for 64 channels 2020-08-11 10:37:59 +03:00
Laszlo Nagy 2ca09adaf7 ad_ip_jesd204_tpl_dac: expand address space to accomodate 64 channels 2020-08-11 10:37:59 +03:00
Laszlo Nagy e698b286e5 jesd204: DAC TPL to support 64 channels 2020-08-11 10:37:59 +03:00
Laszlo Nagy 6ca6257341 jesd204_rx: Increment version to 1.04.a
- support for frame alignment check
- support for interrupt on frame alignment error
- support for interrupt on unexpected lane status error
2020-07-31 11:43:41 +03:00
Laszlo Nagy 87b67ced17 jesd204_rx: Interrupt for unexpected lane status error 2020-07-31 11:43:41 +03:00
Laszlo Nagy 5e16eb85bb jesd204_rx: Generate interrupt on frame alignment error
When frame alignment error monitoring is enabled and error threshold is met
at least for one lane, generate an interrupt so software can reset the link and
do further bring-up steps.
2020-07-31 11:43:41 +03:00
Laszlo Nagy 15e14c76b9 jesd204_rx: Don't auto reset on frame alignment error by default
Let software handle the error case by default. Other steps might be
required to bring-up properly the link if one shot SYSREF is used.
2020-07-31 11:43:41 +03:00
Matt Blanton 1e04b2e2f2 jesd204_rx: Add RX frame alignment character check
Add support for RX frame alignment character checking when scrambling is enabled and
for link reset on misalignment.
Add support for xcelium simulator to jesd204/tb
2020-07-31 11:43:41 +03:00
Laszlo Nagy 2e5a4eb684 jesd204: update README to reflect rev C 2020-06-23 13:52:35 +03:00
Istvan Csomortani d4c393332a ad_ip_jesd204_tpl: TPL has and address space of 4KB 2020-05-25 11:55:40 +03:00
Laszlo Nagy bff8a9fafb scripts/jesd204.tcl: rename tpl core instance
Having the same name for dac and adc TPLs creates conflict in the
address segment naming having random names associated to the segments.
This causes difficulties during scripting of the project in test bench
mode.
2020-05-20 19:08:25 +03:00
Adrian Costina 10c9f7a70d ad_ip_jesd204_tpl_dac: Add option for an external synchronization pin
The external synchronization signal should be synchronous with the
dac clock. Synchronization will be done on the rising edge of the signal.
The control bit is self clearing. Status bit shows that the synchronization
is armed but the synchronization signal has not yet been received

Added EXT_SYNC parameter to be able to keep the dac_sync original
behavior
2020-05-13 10:09:43 +03:00
Adrian Costina 5d4c6701d9 ad_ip_jesd204_tpl_adc: Add external synchronization
The external synchronization signal should be synchronous with the
adc clock. Synchronization will be done on the rising edge of the signal.
The control bit is self clearing. Status bit shows that the synchronization
is armed but the synchronization signal has not yet been received. While
the synchronization mechanism is armed, the adc_rst output signal is set

The current format should allow for the SYSREF signal to be used as
synchronous capture start, but will need to be disabled before the
synchronization mechanism is armed
2020-05-13 10:09:43 +03:00
Laszlo Nagy 70d139af7f jesd204/ad_ip_jesd204_tpl_dac: Fix Intel dependencies
Even if the IQ rotation is disabled in the projects all modules has to be
added to the list of dependencies to avoid compilation errors.
2020-04-08 10:50:28 +03:00
Laszlo Nagy af060700b8 jesd204/ad_ip_jesd204_tpl_dac: add I/Q roation 2020-04-03 11:16:37 +03:00
Maxim 341221dc91
jesd204: Update jesd204_tx_lane.v
Removed decoder for tx_ready.
2020-04-01 10:29:40 +03:00
Laszlo Nagy 4e191e7ac2 ad_ip_jesd204_tpl_dac: fix GUI and FPGA info population 2020-03-10 18:33:29 +02:00
Laszlo Nagy 557a72e35e ad_ip_jesd204_tpl_adc: fix GUI and FPGA info population 2020-03-10 18:33:29 +02:00
Laszlo Nagy 1b0a47c101 jesd204_rx: fix critical warning for undriven input 2020-03-10 18:17:56 +02:00
Laszlo Nagy 9cce513645 jesd204/axi_jesd204_tx: Update version 2020-02-10 09:47:07 +02:00
Laszlo Nagy b8e1daa22b jesd204/axi_jesd204_rx: Update version 2020-02-10 09:47:07 +02:00
Laszlo Nagy 587a3c1a8d scripts/jesd204.tcl: Added 64b mode to Rx scripting 2020-02-10 09:47:07 +02:00
Laszlo Nagy 72186324f3 tb/loopback_64b_tb: Testbench for 64b mode
Data integrity check over a loopbacked link.
2020-02-10 09:47:07 +02:00
Laszlo Nagy bd9836886f jesd204_rx_static_config: Added 64b mode to Rx static config 2020-02-10 09:47:07 +02:00
Laszlo Nagy c3afbbc8a8 jesd204/interfaces: Added 64b mode Rx signals 2020-02-10 09:47:07 +02:00
Laszlo Nagy 7cad1f81d9 axi_jesd204_rx: Added 64b mode 2020-02-10 09:47:07 +02:00
Laszlo Nagy d1072847df jesd204_rx: 64b mode support for receive peripheral
Instantiate 64B/66B decoder based on synthesis parameter.
2020-02-10 09:47:07 +02:00
Laszlo Nagy 075f703443 jesd204_tx_static_config: Added 64b mode Tx static config 2020-02-10 09:47:07 +02:00
Laszlo Nagy e2d12a5b53 jesd204/scripts: Add 64b mode to Tx scripting 2020-02-10 09:47:07 +02:00
Laszlo Nagy c574861bf4 axi_jesd204_tx: Add 64b mode for control interface 2020-02-10 09:47:07 +02:00
Laszlo Nagy d9a31e8d83 jesd204_tx: Support for 64b mode in transmit peripheral
Instantiate 64B/66B mode encoder based on synthesis parameter.
2020-02-10 09:47:07 +02:00
Laszlo Nagy b40e055ebe jesd204/jesd204_common/jesd204_lmfc: Add multiblock clock edge, EoEMB 2020-02-10 09:47:07 +02:00
Laszlo Nagy 72e9a563da jesd204_common: Added JESD204C components 2020-02-10 09:47:07 +02:00
Laszlo Nagy 20ae7a8f7d jesd204: CRC12 component
The component can be used in Tx to compute CRC on the data to be send as
in the Rx side to compute CRC on the received data.
2020-02-10 09:47:07 +02:00
Laszlo Nagy a5346412d1 jesd204: Scrambler for 64b mode
The component can be used for scrambling in Tx and descrambling on the
Rx side of the JESD link.
2020-02-10 09:47:07 +02:00
Laszlo Nagy 474e07e579 jesd204: Add parameter for TPL data width 2020-02-10 09:47:07 +02:00
Laszlo Nagy f2060e27be jesd204_tx: add output pipeline stage
In order to help timing closure on multi SLR FPGAs add a pipeline stage
between the link layer and physical layer. This will add a fixed amount
of delay to the overall latency.
2020-02-07 09:02:46 +02:00
Laszlo Nagy 7612b5d8dd scripts/jesd204.tcl: add support for more lanes and converters for TPLs 2019-11-28 16:17:21 +02:00
Laszlo Nagy 85eabc5a08 jesd204/ad_ip_jesd204_tpl_dac: add support for more lanes and converters 2019-11-28 16:17:21 +02:00
Laszlo Nagy 002f8d8a3e jesd204/ad_ip_jesd204_tpl_adc: add support for more lanes and converters 2019-11-28 16:17:21 +02:00
Laszlo Nagy db573a59b0 jesd204: support for 16 lanes 2019-11-28 16:17:21 +02:00
Istvan Csomortani acba490c2e ad_ip_jesd204_tpl_adc: BITS_PER_SAMPLE is a HDL parameter 2019-10-02 15:32:17 +03:00
Istvan Csomortani aa5fdf903e Makefile: Update makefiles 2019-08-26 16:58:01 +03:00
Arpadi fe09acaa2f up_axi_update: ADDRESS_WIDTH parameter is now a localparam
ADDRESS_WIDTH is now AXI_ADDRESS_WIDTH - 2;
up_axi instantiations will set AXI_ADDRESS_WIDTH instead of ADDRESS_WIDTH;
2019-07-26 11:58:58 +03:00
Istvan Csomortani 0f7a3b953a scripts/adi_ip_intel: Rename the ad_alt_intf to ad_interface 2019-06-29 06:53:51 +03:00
Istvan Csomortani 04ce10a570 cosmetics: Change Altera to Intel in comments 2019-06-29 06:53:51 +03:00
Istvan Csomortani 5329458a62 library/scripts: Rename adi_ip_alt.tcl to adi_ip_intel.tcl 2019-06-29 06:53:51 +03:00
Istvan Csomortani 363494ab9c library/scripts: Rename adi_ip.tcl to adi_ip_xilinx.tcl 2019-06-29 06:53:51 +03:00
Istvan Csomortani 79b6ba29ce all: Rename altera to intel 2019-06-29 06:53:51 +03:00
Istvan Csomortani 65fea6c4c0 ad_ip_jesd204_tpl_dac: Fix up_axi instantiation
This patch will fix the following warning:

[Synth 8-689] width (16) of port connection 'up_axi_awaddr'
does not match port width (12) of module 'up_axi'
2019-06-27 13:47:00 +03:00
Laszlo Nagy 9832c87144 jesd204:tpl: add missing dependencies for Intel 2019-05-24 11:04:46 +03:00
Istvan Csomortani 157afcbc33 tb_base: Fix various test benches
The tb_base.v verilog files does not contain a full module definition,
just some plain test code. In general the files is sourced inside the
test bench main module. As is, defining a timescale in these files will
generate an error, because timescale directive can not be inside a
module.

Delete all the timescale directive from these files.
2019-05-17 11:20:48 +03:00
Laszlo Nagy b90c2e79dc jesd204_rx: add parameter for input pipeline stages
Pipeline stages must be implemented on register so placer can spread it
cross the device. Use the shreg_extract attribute to avoid SRL
inference.
2019-05-16 13:29:34 +03:00
Laszlo Nagy 92d87c2d60 jesd204/scripts: fix indentation 2019-05-16 13:22:55 +03:00
Laszlo Nagy cf258ace83 jesd204/scripts: TPL add support for M=1
When only one converter is used there is no need for concatenation and
slicer cores. In that case the TPL will connect to port 0 from the
application layer.
2019-05-16 13:22:55 +03:00
Adrian Costina 168e1951ee library: Add `timescale to modules that are missing it 2019-05-15 15:37:44 +03:00
Adrian Costina c32b4b02f3 sync_bits: Change I/O names of wires "in" and "out" for VHDL users 2019-04-23 18:03:23 +03:00
Laszlo Nagy 01748d4364 jesd204:axi_jesd204_tx: set OOC default clock constraints 2019-04-22 10:27:16 +03:00
Laszlo Nagy 4264a7a0dd jesd204:axi_jesd204_rx: set OOC default clock constraints 2019-04-22 10:27:16 +03:00
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