Commit Graph

217 Commits (2995f787518cd3e1f2ee0036e5f54e08cd0ac7f4)

Author SHA1 Message Date
Alin-Tudor Sferle 54c65013aa
Fix registers mismatches in regmap_tb from jesd 204 rx/tx and dmac
* dmac_tb: Fix regmap_tb registers mismatches

* jesd204: Fix jes204 rx and tx regmap_tb Octets per multiframe mismatch
2021-05-31 16:47:12 +03:00
Laszlo Nagy 60612720cd jesd204/jesd204_common/sync_header_align: Initial version
This module creates sync header alignment described in section 7.6.1 of
the JESD 204C specification.

The alignment relies on the bitslip capability of the connected
transceiver.
2021-05-14 15:39:40 +03:00
Laszlo Nagy 0c0c6843e3 jesd204/axi_jesd204: Complete clock definitions in out of context mode 2021-05-14 15:39:40 +03:00
Laszlo Nagy e08ca2fc20 jesd204: Add out of context constraint file for link layer cores
For the out of context flow it is important to have all clocks defined
at the interface, especially if the clock are used in the other constraints.
2021-05-14 15:39:40 +03:00
stefan.raus 37238916df Testbenches: Unify and optimize HDL testbenches
Create a common 'run_tb.sh' script to be called by every testbench.
Unify file and testbenches names.
Fix util_pack/cpack_tb.
Add parameters '-batch' and '-gui' for modelsim and xsim simulators (default is gui)
Add ascript for that generates output in xml format (used by CI tools).
2021-05-07 19:53:14 +03:00
stefan.raus 9413afa41c jesd204_rx_constr.ttcl: Remove ASYNC_REG constraint from i_lmfc/cdc_sync_stage1_reg
get_cell on i_lmfc/cdc_sync_stage1_reg doesn't return anything because design was updated.
This generates a CRITICAL WARNING and since the constraint it not necessary anymore, it can be deleted.
2021-03-22 10:55:00 +02:00
stefan.raus 4a772265a9 Update Quartus Prime version from 19.3.0 to 20.1.0
adi_project_intel.tcl: Change quartus version to 20.1.0.
library: Set qsys version so that IP instances won't require a specific version.
2021-03-08 11:29:33 +02:00
Laszlo Nagy e2a111d74b jesd204/ad_ip_jesd204_tpl_dac: Drop LSBs from wider bus to be compatible with previous implementations
Add selectable synthesis option for dropping LSBs or MSBs
2021-03-08 10:46:52 +02:00
Laszlo Nagy 69bb9df515 jesd204_rx: Set ASYNC_REG attribute for double syncs 2021-03-08 10:46:52 +02:00
Laszlo Nagy 8d388dd4f2 jesd204_rx:jesd204_rx_ctrl_64b: Improve timing closure 2021-03-08 10:46:52 +02:00
Laszlo Nagy c2f703f56b jesd204/jesd204_rx: Make output pipeline stages opt in feature 2021-03-08 10:46:52 +02:00
Laszlo Nagy fd714c181a jesd204/ad_ip_jesd204_tpl_adc: Make frame alignment opt-in feature 2021-03-08 10:46:52 +02:00
Laszlo Nagy 0db7519c18 jesd204_tx:64b: Remove reset
Remove synchronous reset from datapath to reduce fanout on reset and
help timing closure.
2021-03-08 10:46:52 +02:00
Laszlo Nagy 2545e53b0b jesd204_rx:64b: Remove reset
Remove synchronous reset from datapath to reduce fanout on reset and
help timing closure.
2021-03-08 10:46:52 +02:00
Laszlo Nagy 7b4fa390db ad_ip_jesd204_tpl_dac: fix capability reg 2021-03-08 10:46:52 +02:00
Laszlo Nagy bfd4c77284 jesd204/jesd204_tx: Expose character replacement capability 2021-02-26 14:41:49 +02:00
Laszlo Nagy 5678e72653 jesd204: Increase Rx version to 1.07.a 2021-02-05 15:24:15 +02:00
Laszlo Nagy 6f608b6199 jesd204: Increase Tx version to 1.06.a 2021-02-05 15:24:15 +02:00
Laszlo Nagy dd58759cd8 jesd204: Intel: NP12 support
Dual clock mode is introduced in link layer to support different
datapath widths on the transport layer than on physical layer.

- Link clock : lane rate / 40 for input datapath width of 4 octets 8b10b
- Device clock : Link clock * input data path width / output datapath width

Supports four clock configurations, single or dual clock mode with or
without external device clock.

The configuration interface reflects the dual clock domain.
2021-02-05 15:24:15 +02:00
Laszlo Nagy f04cb0c640 jesd204/ad_ip_jesd204_tpl:Intel: NP 12 support
Add parameter that describes interface to link layer, this must be
integer multiple of octets per frame.

Add parameter that describes interface to user/DMA, this must be
multiple of bytes so software can process the samples easier.
2021-02-05 15:24:15 +02:00
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