Commit Graph

189 Commits (f7b8a2dfb5fc991db2efb07fa3e29dedb752d8f2)

Author SHA1 Message Date
Adrian Costina 1b1edd1b03 jesd204: Added additional input registers to jesd204_soft_pcs_rx, when lane rate is over 10Gbps 2017-10-25 14:36:54 +01:00
Lars-Peter Clausen 3e96903be7 jesd204_rx: rx_ctrl: Fix typo
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
2017-08-28 16:11:00 +02:00
Lars-Peter Clausen dd1b1c89f9 jesd204: jesd204_rx: Don't expose internal states on the status interface
The DEGLITCH state of the RX state machine is a workaround for misbehaving
PHYs. It is an internal state and an implementation detail and it does not
really make sense to report through the status interface.

Rework things so that DEGLITCH state is reported as part of the CGS state
on the external status interface.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
2017-08-24 17:42:44 +02:00
Lars-Peter Clausen 4df841addc jesd204: Add soft logic PCS
Add soft logic PCS that performs 8b10b encoding for TX and character
pattern alignment and 8b10b decoding for RX.

The modules are intended to be used in combination with a transceiver that
does not have these features implemented in hard logic PCS.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
2017-08-21 11:09:42 +02:00
Lars-Peter Clausen 2d896c0729 jesd204: Add Altera/Intel IP support
Add Qsys IP scripts as well as SDC constraint files for the ADI JESD204
peripherals. This allows them to be instantiated and used on Altera/Intel
platforms.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
2017-08-21 11:09:42 +02:00
Lars-Peter Clausen d345a1e31a jesd204: jesd204_tx: Add dummy valid for the TX data interface
The Xilinx tools are quite forgiving when it comes to required signals on
standard interfaces, which is why it was possible to define a AXI streaming
interface without the required valid signal.

The Altera tools are more strict and wont allow this. Add a dummy valid
signal to the TX data interface to make the tools happy. For now the signal
does not do anything, in the future it might be used to detect an underflow
condition on the data interface and report this through the status
interface.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
2017-08-21 11:08:27 +02:00
Lars-Peter Clausen f730f14d16 jesd204: ilas_mem: Rework to be more Altera friendly
Currently the ILAS memory for the receive register map uses a shift
register with variable tap output for storing the ILAS information. This
maps very efficiently onto the primitives found in Xilinx FPGAs. But there
is no equivalent primitive in Altera FPAGs resulting in increased
utilization from having to implement the structure in pure logic.

Change the ILAS memory so it uses a simple dual port RAM for storing the
data. This has slightly increased utilization on Xilinx platforms (but
still good enough) and highly decreased utilization on Altera platforms.

One side effect of this change is that since the RAM output is synchronous
reading the ILAS memory registers will take one extra clock cycle.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
2017-08-21 11:05:16 +02:00
Lars-Peter Clausen 4acb91bedb jesd204: axi_jesd204_{rx,tx}: Add external link domain reset
Currently the reset for the link clock domain is generated internally in
the axi_jesd204_{rx,tx} peripheral. The reset is controlled by through the
register map.

Add an additional external reset for link clock domain. The link clock
domain is kept in reset if either the internal reset or the external reset
is asserted.

This for example allows the fabric to keep the domain in reset if the clock
is not yet stable.

The status of the external reset can be queried from the register map.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
2017-08-18 18:25:12 +02:00
Lars-Peter Clausen 3ab3d3d111 jesd204: axi_jesd204_rx_regmap_tb: Add missing dependency
Add missing source file dependency for the axi_jesd204_rx_regmap_tb.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
2017-08-13 10:28:11 +02:00
Rejeesh Kutty 1c386d4d34 hdlmake.pl- updates 2017-08-07 16:09:20 -04:00
Lars-Peter Clausen 2b84fbb3b3 jesd204: Use consistent naming scheme for CDC blocks
Name all CDC blocks following the patter i_cdc_${signal_name}. This makes
it clear what is going on.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
2017-08-07 17:44:23 +02:00
Lars-Peter Clausen 918f226f3b jesd204_tx: Use the CDC sync_bits helper to synchronize the SYNC~ signal
Use the CDC sync_bits helper to synchronize the asynchronous external SYNC~
signal into the link clock domain, rather than open-coding this operation.

This makes it more explicit what is going on.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
2017-08-07 17:44:23 +02:00
Lars-Peter Clausen 350fbacf94 axi_jesd204_tx: Remove IRQ events for now
Which events will be exposed as IRQs and at what level of granularity will
need some additional through. Remove the two existing IRQ events for now
again. This will be added back later.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
2017-08-07 17:44:23 +02:00
Lars-Peter Clausen 533b27bb13 axi_jesd204_tx: jesd204_up_tx: Use two dimensional array for up_cfg_ilas_data
The up_cfg_ilas_data signal is a two dimensional array. There are 4
register entries for each lane. Model it as such rather than compressing it
down to a one dimensional array. This makes accessing the individual
entries a bit more straight forward and the code clearer.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
2017-08-07 17:42:56 +02:00
Lars-Peter Clausen 5d66f1d7bb jesd204_tx: Remove duplicated file
The ilas_cfg_static.v is part of the jesd204_tx_static_config module.
Somehow a copy of that file made it into the jesd204_tx module where it is
completely unused. Remove the duplicated file.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
2017-08-07 17:42:17 +02:00
Lars-Peter Clausen a4641d99ba jesd204: rx_tb: Fix some incorrect signal connections
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
2017-08-07 17:42:17 +02:00
Istvan Csomortani 115c8f2ba6 license: Update old license headers 2017-07-28 12:47:14 +01:00
Lars-Peter Clausen 367d2d58e7 jesd204: axi_jesd204_rx_regmap_tb: Check ILAS memory register
Add a check to RX register map to confirm that the ILAS memory registers
return the correct values after the ILAS data has been received.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
2017-07-27 10:48:43 +02:00
Lars-Peter Clausen c1d6ee8f1b Partially revert "hdlmake.pl - updates"
This partially reverts commit a8ade15173.

Remove the nonsensical Makefile dependencies that got added by accident.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
2017-07-21 15:06:22 +02:00
Rejeesh Kutty a8ade15173 hdlmake.pl - updates 2017-07-20 15:11:21 -04:00
Lars-Peter Clausen 634340c170 jesd204: jesd204_up_common: Rename clock monitor instance to i_clock_mon
The generic Altera clock monitor constraints expect the instance to be
called i_clock_mon. Adjust the code accordingly.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
2017-07-20 19:45:26 +02:00
Lars-Peter Clausen 4e8327efd2 jesd204: jesd204_up_ilas_mem: Fix blocking assignment
In this particular case the behaviour is the same with non-blocking and
blocking assignments, but that could change if the code is modified in the
future. To avoid any potentially issue due to this consistently use
non-blocking assignments.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
2017-07-20 19:45:26 +02:00
Lars-Peter Clausen 369fe69d34 jesd204: tx_ctrl: Fix status_sync assignment
The SYNC signal that gets reported through the status interface should be
the output (second stage) of the synchronizer circuit.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
2017-07-17 17:13:02 +02:00
Lars-Peter Clausen 1f2e189ff2 jesd204: jesd204_up_sysref: Remove unused signals
These signals are leftovers of an earlier implementation version, remove
them.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
2017-07-17 17:13:02 +02:00
Lars-Peter Clausen a9fe0fa530 jesd204: jesd204_up_common: Add missing core_cfg_transfer_en declaration
Make sure the core_cfg_transfer_en signal is declared before they are used.
Strictly speaking the current code is correct and synthesis correctly, but
declaring the signals make the intentions of the code more explicit.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
2017-07-17 17:13:02 +02:00
Lars-Peter Clausen d164209355 jesd204: axi_jesd204_up_rx_lane: Fix padding signal width
The upper padding zeros should be 26 bits wide.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
2017-07-17 17:13:02 +02:00
Lars-Peter Clausen fa46688be5 jesd204: Add names for generate for-blocks
Be more standard compliant and assign names to generate for-blocks. This is
required for Altera/Intel support.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
2017-07-17 17:13:02 +02:00
Istvan Csomortani 4ea6b0d6d8 jesd204: Update constraints for tx register map
In some cases, the 'core_ilas_config_data' registers will be infered as
FDRE, instead of FDSE. Therefor a max delay definition, which are using
the S pin as its endpoint, it can become invalid, nonexistent.
Generalize the path, using the register itself as endpoint.
2017-07-10 13:38:31 +01:00
Lars-Peter Clausen 94586a5b49 jesd204: tb: Fix signal width mismatch warnings
Always explicitly specify the signal width for constants to avoid warnings
about signal width mismatch.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
2017-06-20 17:39:41 +02:00
Lars-Peter Clausen 885b364a46 jesd204: rx_static_config: Set RBD to 0
The buffer delay should be 0 in the default configuration. The current
value of 0xb must have slipped in by accident.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
2017-06-20 17:39:41 +02:00
Lars-Peter Clausen 71cc052825 jesd204: rx: Use standalone counter for lane latency monitor
Use a single standalone counter that counts the number of beats since the
release of the SYNC~ signal, rather than re-using the LMFC counter plus a
dedicated multi-frame counter.

This is slightly simpler in terms of logic and also easier for software to
interpret the data.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
2017-06-20 17:39:41 +02:00
Lars-Peter Clausen 9e50f5afa8 jesd204: Handle sysref events in the register map
There are currently two sysref related events. One the sysref captured
event which is generated when an external sysref edge has been observed.
The other is the sysref alignment error event which is generated when a
sysref edge is observed that has a different alignment from previously
observed sysref edges.

Capture those events in the register map. This is useful for error
diagnostic. The events are sticky and write-1-to-clear.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
2017-06-20 17:39:41 +02:00
Lars-Peter Clausen d3b44906c3 jesd204: Properly align LMFC offset in register map
The internal LMFC offset signals are in beats, whereas the register map is
in octets. Add the proper alignment padding to the register map to
translate between the two.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
2017-06-20 17:39:41 +02:00
Lars-Peter Clausen baa256e34c jesd204: Slightly rework sysref handling
For SYSREF handling there are now three possible modes.

1) Disabled. In this mode the LMFC is generated internally and all external
SYSREF edges are ignored. This mode should be used for subclass 0 when no
external sysref is available.
2) Continuous SYSREF. An external SYSREF signal is required and the LMFC is
aligned to the SYSREF signal. The SYSREF signal is continuously monitored
and if a edge unaligned to the previous edges is detected the LMFC is
re-aligned to the new edge.
3) Oneshot SYSREF. Oneshot SYSREF mode is similar to continuous SYSREF mode
except only the first edge is captured and all further edges are ignored,
re-alignment will not happen.

Both in continuous and oneshot signal at least one external sysref edge is
required before an LMFC is generated. All events that require an LMFC will
be delayed until a SYSREF edge has been captured. This is done to avoid
accidental re-alignment.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
2017-06-20 17:39:41 +02:00
Lars-Peter Clausen bf88527119 library: jesd204: jesd204_up_common: Fix indention
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
2017-06-20 17:39:41 +02:00
Rejeesh Kutty dc94dd3ea7 jesd204- apply constraints after top 2017-06-16 15:30:18 -04:00
Rejeesh Kutty dd48929327 hdlmake.pl - updates 2017-06-06 12:25:35 -04:00
Rejeesh Kutty 6a437472f2 jesd204-sub-ip- no top files 2017-06-01 15:48:48 -04:00
Lars-Peter Clausen 1202286c3d Add ADI JESD204 link layer cores
The ADI JESD204 link layer cores are a implementation of the JESD204 link
layer. They are responsible for handling the control signals (like SYNC and
SYSREF) and controlling the link state machine as well as performing
per-lane (de-)scrambling and character replacement.

Architecturally the cores are separated into two components.

1) Protocol processing cores (jesd204_rx, jesd204_tx). These cores take
care of the JESD204 protocol handling. They have configuration and status
ports that allows to configure their behaviour and monitor the current
state. The processing cores run entirely in the lane_rate/40 clock domain.

They have a upstream and a downstream port that accept and generate raw PHY
level data and transport level payload data (which is which depends on the
direction of the core).

2) Configuration interface cores (axi_jesd204_rx, axi_jesd204_tx). The
configuration interface cores provide a register map interface that allow
access to the to the configuration and status interfaces of the processing
cores. The configuration cores are responsible for implementing the clock
domain crossing between the lane_rate/40 and register map clock domain.

These new cores are compatible to all ADI converter products using the
JESD204 interface.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
2017-05-23 11:16:07 +02:00