Commit Graph

238 Commits (0b9631f1f7a19885ae9e443b364d4f2003880efe)

Author SHA1 Message Date
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
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