Commit Graph

2142 Commits (0e8515a90b82bc960ccc733b2833e8fa67670bec)

Author SHA1 Message Date
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
Lars-Peter Clausen 7a804c1d76 axi_dmac: Fix debug ID order
Commit e6aacd2f56 ("axi_dmac: Better support debug IDs when ID_WIDTH !=
3") managed to get the order of the IDs in the debug register wrong.
Restore the original order.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
2018-05-04 12:40:15 +02: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
Istvan Csomortani e432e77f1e jesd204:up_common: Add a synthesis register for NUM_LINKS 2018-05-03 19:37:35 +03:00
Istvan Csomortani d18eb85e41 jesd204:tx_ctrl: Update the sync_request logic
The cfg_links_disable register will mask the SYNC lines, disabled links
will always have a de-asserted SYNC (logic state HIGH).
The FSM will stay in CGS as long as there is one active link with an
asserted SYNC (logic state LOW).

Update the test bench to generate the SYNC signals in different clock
edges, so it can test all the possible scenarios.
2018-05-03 19:37:35 +03:00
Istvan Csomortani c12ce216e9 jesd204:tx_ctrl: status_sync register contains the raw SYNC status 2018-05-03 19:37:35 +03:00
Istvan Csomortani b632debc35 jesd204:tx_ctrl: Fix sync_bits instance 2018-05-03 19:37:35 +03:00
Istvan Csomortani 0b20dbc2c9 jesd204:up_common: Move cfg_links_disable to 0x086 address space 2018-05-03 19:37:35 +03:00
Istvan Csomortani 05dbe8f42f jesd204:tb: Update test bench to support dynamic multi-link on TX side 2018-05-03 19:37:35 +03:00
Istvan Csomortani da03572b32 jesd204_tx: Add dynamic multi-link support
A multi-link is a link where multiple converter devices are connected to a
single logic device (FPGA). All links involved in a multi-link are synchronous
and established at the same time. For a TX link this means that the FPGA receives
multiple SYNC signals, one for each link. The state machine of the TX link
peripheral must combine those SYNC signals into a single SYNC signal that is
asserted when either of the external SYNC signals is asserted.

Dynamic multi-link support must allow to select to which converter devices on
the multi-link the SYNC signal is propagated too. This is useful when depending
on the use case profile some converter devices are supposed to be disabled.

Add the cfg_links_disable[0x081] register for multi-link control and
propagate its value to the TX FSM.
2018-05-03 19:37:35 +03:00
Istvan Csomortani 1b42312157 jesd204:rx_ctrl: Fix the cfg_links_disable mask 2018-05-03 18:48:54 +03:00
Istvan Csomortani 5176eca155 jesd204:version: Increase version number for RX
Since the multi-link support is new feature, increase the minor version
number.
2018-05-03 18:48:54 +03:00
Istvan Csomortani 974131cfc5 jesd204:up_common: Add a synthesis register for NUM_LINKS 2018-05-03 18:48:54 +03:00
Istvan Csomortani e71f9e384e jesd204:up_common: Move cfg_links_disable to 0x086 address space 2018-05-03 18:48:54 +03:00
Istvan Csomortani 36a3335093 jesd204_tb: Update testbench to support dynamic multi-link on RX side 2018-05-03 18:48:54 +03:00
Istvan Csomortani 0e099b6f08 jesd204_rx: Add dynamic multi-link support
A multi-link is a link where multiple converter devices are connected to a
single logic device (FPGA). All links involved in a multi-link are synchronous
and established at the same time. For a RX link this means that the SYNC signal
needs to be propagated from the FPGA to each converter.

Dynamic multi-link support must allow to select to which converter devices on
the multi-link the SYNC signal is propagated too. This is useful when depending
on the usecase profile some converter devices are supposed to be disabled.

Add the cfg_links_disable[0x081] register for multi-link control and
propagate its value to the RX FSM.
2018-05-03 18:48:54 +03:00
Laszlo Nagy 3f94fec620 axi_dmac/dma_write_tb: added data integrity check
Added passing condition checking.
Added variable request sizes
2018-05-03 14:49:06 +02:00
Laszlo Nagy 5c2e10eca5 axi_dmac: added ModelSim support to run_tb.sh
Modified run_tb.sh to work with Modelsim if the SIMULATOR variable is set to
"modelsim"
2018-05-03 14:49:06 +02:00
Laszlo Nagy ee4932ecee axi_dmac: made vlog pass
Did minor changes to the code to make ModelSim vlog pass.
2018-05-03 14:49:06 +02:00
Lars-Peter Clausen 24d17e8bcc axi_dmac: Add transfer testbenches
Add simple transfer testbenches that test the read and write to AXI memory
paths of the DMAC.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
2018-05-03 14:49:06 +02:00
Lars-Peter Clausen b3f027fc89 axi_dmac: Add simple register map testbench
Add a testbench that exercises the basic functionality of the axi_dmac
register map module.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
2018-05-03 14:49:06 +02:00
Lars-Peter Clausen ef3687e99d axi_dmac: Split register map into separate sub-module
Split the register map code into a separate sub-module instead of having it
as part of the top-level axi_dmac.v file.

This makes it easier to component test the register map behavior
independently from the DMA transfer logic.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
2018-05-03 14:49:06 +02:00
Lars-Peter Clausen ccb69e71a3 axi_dmac: axi_dmac_hw.tcl: Use ad_ip_files helper
Use the ad_ip_files helper to reduce the amount of boiler plate code.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
2018-05-03 14:49:06 +02:00
Lars-Peter Clausen 6baf7612f7 ad_ip_alt.tcl: ad_ip_addfile: Add support for header files
Handle files with a .h suffix and add them as VERILOG_INCLUDE to the file
list.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
2018-05-03 14:49:06 +02:00
Lars-Peter Clausen b9b619d918 axi_ad9144: Hide unused ports in DUAL mode
In DUAL mode half of the data ports are unused and the unused inputs need
to be connected to dummy signals.

Completely hide the unused ports in DUAL mode to remove that requirement.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
2018-05-02 17:21:20 +02:00
Lars-Peter Clausen 7474ca36de axi_ad9144: Completely disable unused channels in DUAL mode
When the axi_ad9144 core is configured for DUAL mode two of the four
channels are unused. But there is still some residual logic left for those
unused channels that can't be removed by the optimizer.

Completely disable the unused channels by reducing the channel and lane
count. This slightly reduces utilization.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
2018-05-02 17:21:20 +02:00
Lars-Peter Clausen d26f929ecc axi_ad9152: Use the generic JESD204 DAC transmitter core
Replace the axi_ad9152 implementation with the new generic JESD204
interface DAC core. The replacement is functionally equivalent.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
2018-05-02 17:21:20 +02:00
Lars-Peter Clausen 0072476ad1 axi_ad9144: Use the generic JESD204 DAC transmitter core
Replace the axi_ad9144 implementation with the new generic JESD204
interface DAC core. The replacement is functionally equivalent.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
2018-05-02 17:21:20 +02:00
Lars-Peter Clausen e4c9c8734c library: Add a generic JESD204 DAC receiver core
For most of the DACs that use JESD204 as the data transport the digital
interface is very similar. They are mainly differentiated by number of
JESD204 lanes, number of converter channels and number of bits per sample.

Currently for each supported converter there exists a converter specific
core which has the converter specific requirements hard-coded.

Introduce a new generic core that has the number of lanes, number of
channels and bits per sample as synthesis-time configurable parameters. It
can be used as a drop-in replacement for the existing converter specific
cores.

This has the advantage of a shared and reduced code base. Code improvements
will automatically be available for all converters and don't have to be
manually ported to each core individually.

It also makes it very easy to introduce support for new converters that
follow the existing schema.

Since the JESD204 framer is now procedurally generated it is also very
easy to support board or application specific requirements where the lane
to converter ratio differs from the default (E.g. use 2 lanes/2 converters
instead of 4 lanes/2 converters).

This new core is primarily based on the existing axi_ad9144.

For the time being the core is not user instantiatable and will only be
used as a based to re-implement the converter specific cores. It will be
extended in the future to allow user instantiation.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
2018-05-02 17:21:20 +02:00
Lars-Peter Clausen b19d09e678 axi_ad9680: Use the generic JESD204 ADC receiver core
Replace the axi_ad9680 implementation with the new generic JESD204
interface ADC core. The replacement is functionally equivalent.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
2018-05-02 17:21:20 +02:00
Lars-Peter Clausen 77631c8717 axi_ad9250: Use the generic JESD204 ADC receiver core
Replace the axi_ad9250 implementation with the new generic JESD204
interface ADC core. The replacement is functionally equivalent, except that
the converter clock ratio is now correctly reported as 2 rather than 1 as
before.

Also the adc_rst output port is removed. It is not used in any design. The
current guidelines for the reset for the JESD204 subsystem is to use an
external reset generator.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
2018-05-02 17:21:20 +02:00
Lars-Peter Clausen 8a487816b9 axi_ad6676: Use the generic JESD204 ADC receiver core
Replace the axi_ad6676 implementation with the new generic JESD204
interface ADC core. The replacement is functionally equivalent, except that
the converter clock ratio is now correctly reported as 2 rather than 1 as
before.

Also the adc_rst output port is removed. It is not used in any design. The
current guidelines for the reset for the JESD204 subsystem is to use an
external reset generator.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
2018-05-02 17:21:20 +02:00
Istvan Csomortani bffe7e3fc0 ad_ip_jesd204_tpl_adc: Add IP definition file for Intel platforms 2018-05-02 17:21:20 +02:00
Lars-Peter Clausen 3516c4ca83 library: Add a generic JESD204 ADC receiver core
For most of the ADCs that use JESD204 as the data transport the digitial
interface is very similar. They are mainly differentiated by number of
JESD204 lanes, number of converter channels and number of bits per sample.

Currently for each supported converter there exists a converter specific
core which has the converter specific requirements hard-coded.

Introduce a new generic core that has the number of lanes, number of
channels and bits per sample as synthesis-time configurable parameters. It
can be used as a drop-in replacement for the existing converter specific
cores.

This has the advantage of a shared and reduced code base. Code improvements
will automatically be available for all converters and don't have to be
manually ported to each core individually.

It also makes it very easy to introduce support for new converters that
follow the existing schema.

Since the JESD204 deframer is now procedurally generated it is also very
easy to support board or application specific requirements where the lane
to converter ratio differs from the default (E.g. use 2 lanes/2 converters
instead of 4 lanes/2 converters).

This new core is primarily based on the existing axi_ad9680.

For the time being the core is not user instantiatable and will only be
used as a based to re-implement the converter specific cores. It will be
extended in the future to allow user instantiation.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
2018-05-02 17:21:20 +02:00
Lars-Peter Clausen 324da5f112 Remove unused DMA underflow signal from ADC DMA interface
The ADC DMA will never underflow and unsurprisingly the adc_dunf signal is
never used anywhere. It is very unlikely it will ever be used, so remove
it.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
2018-05-02 17:21:20 +02:00
Lars-Peter Clausen bd251a5fd5 Remove unused DMA overflow signal from DAC DMA interfaces
The DAC DMA will never overflow and unsurprisingly the dac_dovf signal is
never used anywhere. It is very unlikely it will ever be used, so remove
it.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
2018-05-02 17:21:20 +02:00
Lars-Peter Clausen f647dd4c0a xilinx: util_adxcvr: Add support for lane polarity inversion
Some designs choose to swap the positive and negative side of the of the
JESD204 lanes. One reason for this would be because it can simplify the
PCB layout. The polarity is in most cases also only applied to a subset of
the used lanes.

Add support for this to the util_adxcvr module. This done by adding new
parameter to the modules that allows to specify a per lane polarity
inversion. Each bit in the parameter corresponds to one lane. If the bit is
set the polarity is inverted for his lane. E.g. setting the parameter to
0xc will invert the 3rd and 4th lane.

The setting is forwarded to the Xilinx transceiver for the corresponding
lane.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
2018-05-02 09:37:23 +02:00
Lars-Peter Clausen cdf2150128 altera: jesd204: Add support for lane polarity inversion
Some designs choose to swap the positive and negative side of the of the
JESD204 lanes. One reason for this would be because it can simplify the
PCB layout. The polarity is in most cases also only applied to a subset of
the used lanes.

Add support for this to the adi_jesd204 and jesd204_phy for Altera modules.
This done by adding new parameter to the modules that allows to specify a
per lane polarity inversion. Each bit in the parameter corresponds to one
lane. If the bit is set the polarity is inverted for his lane. E.g. setting
the parameter to 0xc will invert the 3rd and 4th lane.

The setting is forwarded depending on whether soft or hard PCS is used to
either the soft PCS module or the transceiver block itself.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
2018-05-02 09:37:23 +02:00
Lars-Peter Clausen c514c5cc28 jesd204_soft_pcs_loopback_tb: Add parameter for lane polarity inversion
Add a parameter to the soft_pcs_loopback_tb that allows to test whether the
soft PCS modules work correctly when the lane polarity is inverted.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
2018-05-02 09:37:23 +02:00
Lars-Peter Clausen 18f535d1ba jesd204_soft_pcs_tx: Add support for lane polarity inversion
Some designs choose to swap the positive and negative side of the of the
JESD204 lanes. One reason for this would be because it can simplify the
PCB layout.

To support this add a parameter to the jesd204_soft_pcs_tx module that
allows to specify whether the lane polarity is inverted or not.

The way the polarity inversion is implemented is for free since it just
inverts the output mapping of the 8b10b encoder LUT tables.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
2018-05-02 09:37:23 +02:00
Lars-Peter Clausen 30c3f8244c jesd204_soft_pcs_rx: Add support for lane polarity inversion
Some designs choose to swap the positive and negative side of the of the
JESD204 lanes. One reason for this would be because it can simplify the
PCB layout.

To support this add a parameter to the jesd204_soft_pcs_rx module that
allows to specify whether the lane polarity is inverted or not.

The way the polarity inversion is implemented it is for free since it will
only invert the input mapping of the 8b10b decoder LUT tables.

The pattern align module does not care whether the polarity is inverted or
not since the pattern align symbols look the same in both cases.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
2018-05-02 09:37:23 +02:00
Lars-Peter Clausen ee57f869f1 axi_dmac: Fix bus resize block reset
When the source and destination bus widths don't match a resize block is
inserted on the side of the narrower bus. This resize block can contain
partial data.

To ensure that there is no residual partial data is left in the resize
block after a transfer shutdown the resize block is reset when the DMA is
disabled.

Currently this is implemented by tying the reset signal of the resize block
to the enable signal of the DMA. This enable signal is only a indicator
though that the DMA should shutdown. For a proper shutdown outstanding
transactions still need to be completed.

The data that is in the resize block might be required to complete those
transactions. So performing the reset when the enable signal goes low can
lead to a situation where the DMA tries to complete a transaction but can't
do it because the data required to do so has been erased by resetting the
resize block. This leads to a dead lock and the system has to be rebooted
to recover from it.

To solve this use the sync_id signal to reset the resize block. The sync_id
signal will only be asserted when both the destination and source side
module have indicated that they are ready to be reset and there are no more
pending transactions.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
2018-05-02 09:37:02 +02:00
Adrian Costina e4d579726d Renamed ad9379 to adrv9009 2018-04-26 18:19:11 +03:00
Lars-Peter Clausen f3102eea5a axi_dmac: Limit MAX_BYTES_PER_BURST to maximum supported value
The MAX_BYTES_PER_BURST option allows to configure the maximum bytes that
are part of a burst. This can be an arbitrary value.

At the same time there is a limit of how many bytes can be supported by the
memory buses. A AXI3 interface supports a maximum of 16 beats per burst
and a AXI4 interface supports a maximum of 256 beats per burst.

At the moment the it is possible to specify a MAX_BYTES_PER_BURST value
that exceeds what can be supported by the AXI memory-mapped bus. If that is
the case undefined behavior will occur and the DMAC will function
incorrectly.

To avoid this make sure that the MAX_BYTES_PER_BURST value does not exceed
the maximum that can be supported by the interfaces.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
2018-04-24 12:49:24 +02:00
Lars-Peter Clausen 5418dfeb50 axi_dmac: axi_dmac_hw.tcl: Fix indention
Fix some slight indentation issues in the axi_dmac_hw.tcl.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
2018-04-24 12:49:24 +02:00
Lars-Peter Clausen e609c7fd3b axi_dmac: Prevent destination AXI burst length truncation
The width of the AXI burst length field depends on the AXI standard
version. For AXI3 the width is 4 bits allowing a maximum burst length of 16
beats, for AXI4 it is 8 bits wide allowing a maximum burst length of 256
beats.

At the moment the width of the length signals are determined by type of the
source AXI interface, even if the source interface type is not AXI. This
means if the source interface is set to AXI3 and the destination interface
is set to AXI4 the internal width of the signal for all interfaces will be
4 bits. This leads to a truncation of the destination bus length field,
which is supposed to be 8 bits.

If burst are generated that are longer than 16 beats the upper bits of the
length signal will be truncated. The result of this will be that the
external AXI slave interface (e.g. the DDR memory) and the internal logic
in the DMA disagree about burst length.  The DMA will eventually lock up
when its internal buffers are full.

To avoid this issue have different configuration parameters for the source
and destination interface that configure the AXI bus length field width.

This way one of the interfaces can be configured for AXI3 and the other for
AXI4 without interfering with each other.

Fixes: commit 495d2f3056 ("axi_dmac: Propagate awlen/arlen width through the core")
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
2018-04-24 12:49:24 +02:00
Laszlo Nagy a3cd70ff1d adi_ip.tcl: reorder synthesis files in the file group
This commit fixes the following warning from the IP packaging flow:
"[IP_Flow 19-801] The last file in file group "Synthesis" should be an HDL file:
"axi_dmac_constr.ttcl".  During generation the IP Flow uses the last file to
determine library and other information when generating the top wrapper file.
If possible, please make sure that non-HDL files are located earlier in the list
of files for this file group."

Having the ttcl or other non HDL file at the end of the file group causes issues
when the project preferred language is set to VHDL. Since the synthesis file group
is set to "xilinx_anylanguagesynthesis" the tool tries to guess the type of wrapper
to be generated for that IP based on the last file from the file group.
If the file is non HDL then he defaults to the preferred language (this case VHDL)

Due some issue when the tool tries to create a VHDL wrapper for an IP that has
a Verilog top file with boolean parameters set from the IP packager he fails.
After we reorder the files after each non HDL file addition
he will create a correct Verilog wrapper for it with all parameters
which can be integrated in a VHDL system top file without issues.
2018-04-24 11:46:52 +03:00
Lars-Peter Clausen 8e90d5db20 axi_ad9162: Infer clock signal for tx_clk port
Fixes the following warning:
  [BD 41-1731] Type mismatch between connected pins: /util_fmcomms11_xcvr/tx_out_clk_0(clk) and /axi_ad9162_core/tx_clk(undef)

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
2018-04-18 15:16:13 +02:00
Laszlo Nagy bfac56199e axi_dmac: adding missing dependency for Intel flow
When the DMAC is used in async clock domains the data FIFO instantiate
an ad_mem component to handle properly the clock crossing.
For Intel, this mode is used only in FMCJESDADC1 designs but without this
an error could appear in other projects too if the user reconfigures the core.
2018-04-17 16:34:41 +03:00
Laszlo Nagy c42ed7dd52 axi_dmac: removed harmful SDC constraint
The set_false_path constraint targeted to the *ram* cells of the dmac
matched several intra clock domain paths where the timing analysis got
ignored resulting in intermitent data integrity issues.
2018-04-17 16:34:41 +03:00
Laszlo Nagy ad05a5ecc1 axi_dmac: AXI3 support on Intel qsys
Exposed AXI3 interface on the Intel version of the IP for UI and feature consistency.
Some of the signals that are defined as optional in the AMBA standard
are marked as mandatory in Qsys in case of AXI3. Because of this such signals
were added to the interface of the DMAC and driven with default values.

For Xilinx in order to keep existing behavior the newly added signals
are hidden from the interface.

New parameters are added to define the width of the AXI transaction IDs;
these are hidden from the UI; We can add them to the UI if the fixed size
of the IDs will cause port incompatibility issues.
2018-04-17 15:12:01 +03:00
Istvan Csomortani ae1ec06ce6 fmcomms2:pr: Move project to a feature branch 2018-04-13 18:22:15 +03:00
Lars-Peter Clausen c5b1b905e3 ad_sysref_gen: Fix quartus warnings
Fix the following warnings that are generated by Quartus:
	Warning (10230): Verilog HDL assignment warning at ad_sysref_gen.v(68): truncated value with size 32 to match size of target (8)

No functional changes.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
2018-04-13 11:32:57 +02:00
Lars-Peter Clausen 162248375c ad_datafmt: Fix Quartus warnings
Fix the following warnings that are generated by Quartus:
	Warning (10036): Verilog HDL or VHDL warning at ad_datafmt.v(69): object "sign_s" assigned a value but never read

Move the sign_s and signext_s signals into the generate block in which
they are used.

No functional changes.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
2018-04-13 11:32:57 +02:00
Lars-Peter Clausen b555218152 util_dacfifo: Fix Quartus warnings
Fix the following warnings that are generated by Quartus:
	Warning (10236): Verilog HDL Implicit Net warning at util_dacfifo.v(257): created implicit net for "dac_mem_ren_s"
	Warning (10230): Verilog HDL assignment warning at util_dacfifo.v(166): truncated value with size 32 to match size of target (10)
	Warning (10230): Verilog HDL assignment warning at util_dacfifo.v(266): truncated value with size 32 to match size of target (10)
	Warning (10230): Verilog HDL assignment warning at util_dacfifo.v(268): truncated value with size 32 to match size of target (10)

No functional changes.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
2018-04-13 11:32:57 +02:00
Lars-Peter Clausen 2c4d81a221 axi_dmac: Disable 2D transfer support by default
The primary use-case of the DMA controller is in non-2D mode. Make this the
default, since allows projects to instantiate the controller with the
default configuration without having to explicitly disable 2D support.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
2018-04-11 15:09:54 +03:00
Lars-Peter Clausen 05e8604ea7 axi_dmac: Remove unused pause signal from address generator
The pause signal is not used inside the address generator module. Remove
it.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
2018-04-11 15:09:54 +03:00
Lars-Peter Clausen 2b2c1f6a1e axi_dmac: Fix some indentation errors
Purely cosmetic.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
2018-04-11 15:09:54 +03:00
Istvan Csomortani 8b8d346193 jesd204: Update testbench with the new file names 2018-04-11 15:09:54 +03:00
Istvan Csomortani 09ff1f3a77 jesd204: Fix file names
All the file names must have the same name as its module. Change all the
files, which did not respect this rule.
Update all the make files and Tcl scripts.
2018-04-11 15:09:54 +03:00
Istvan Csomortani 6e4ad871a4 avl_dacfifo: Fix 'blocking statement in always block' issue 2018-04-11 15:09:54 +03:00
Istvan Csomortani 0fe3d4423d avl_dacfifo: Delete unused files 2018-04-11 15:09:54 +03:00
Lars-Peter Clausen 5b58fb67f0 library: Remove empty constraint files
Most of the cores are fully covered by the generic constraint files. When
the constraints where moved from the core specific to the generic
constraint files some empty core constraints files where left around. These
don't do anything, so remove them.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
2018-04-11 15:09:54 +03:00
Lars-Peter Clausen 1ea3ad28ae Add quiet mode to the Makefile system
The standard Makefile output is very noisy and it can be difficult to
filter the interesting information from this noise.

In quiet mode the standard Makefile output will be suppressed and instead a
short human readable description of the current task is shown.

E.g.
	> make adv7511.zed
	Building axi_clkgen library [library/axi_clkgen/axi_clkgen_ip.log] ... OK
	Building axi_hdmi_tx library [library/axi_hdmi_tx/axi_hdmi_tx_ip.log] ... OK
	Building axi_i2s_adi library [library/axi_i2s_adi/axi_i2s_adi_ip.log] ... OK
	Building axi_spdif_tx library [library/axi_spdif_tx/axi_spdif_tx_ip.log] ... OK
	Building util_i2c_mixer library [library/util_i2c_mixer/util_i2c_mixer_ip.log] ... OK
	Building adv7511_zed project [projects/adv7511/zed/adv7511_zed_vivado.log] ... OK

Quiet mode is enabled by default since it generates a more human readable
output. It can be disabled by passing VERBOSE=1 to make or setting the
VERBOSE environment variable to 1 before calling make.

E.g.
	> make adv7511.zed VERBOSE=1
	make[1]: Entering directory 'library/axi_clkgen'
	rm -rf *.cache *.data *.xpr *.log component.xml *.jou xgui
	*.ip_user_files *.srcs *.hw *.sim .Xil .timestamp_altera
	vivado -mode batch -source axi_clkgen_ip.tcl >> axi_clkgen_ip.log 2>&1
	...

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
2018-04-11 15:09:54 +03:00
Laszlo Nagy d8916e681e axi_ad9144: Infer clock signal 2018-04-11 15:09:54 +03:00
Laszlo Nagy 7ae0167a4d axi_ad9250: Infer clock signals 2018-04-11 15:09:54 +03:00
Lars-Peter Clausen 2b914d33c1 Move Altera IP core dependency tracking to library Makefiles
Currently the individual IP core dependencies are tracked inside the
library Makefile for Xilinx IPs and the project Makefiles only reference
the IP cores.

For Altera on the other hand the individual dependencies are tracked inside
the project Makefile. This leads to a lot of duplicated lists and also
means that the project Makefiles need to be regenerated when one of the IP
cores changes their files.

Change the Altera projects to a similar scheme than the Xilinx projects.
The projects themselves only reference the library as a whole as their
dependency while the library Makefile references the individual source
dependencies.

Since on Altera there is no target that has to be generated create a dummy
target called ".timestamp_altera" who's only purpose is to have a timestamp
that is greater or equal to the timestamp of all of the IP core files. This
means the project Makefile can have a dependency on this file and make sure
that the project will be rebuild if any of the files in the library
changes.

This patch contains quite a bit of churn, but hopefully it reduces the
amount of churn in the future when modifying Altera IP cores.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
2018-04-11 15:09:54 +03:00
Lars-Peter Clausen 48ef19ec60 library: Track additional file types as dependency in Makefile
Re-generate the Makefile with some additional file types added as
dependencies to the IP cores.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
2018-04-11 15:09:54 +03:00
Lars-Peter Clausen 3dac544d0a axi_dmac_ip.tcl: Add include files to file list
The include files are currently only implicitly added to the component file
list. Do it explicitly as this will make sure that they show up in the
generated Makefile dependency list.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
2018-04-11 15:09:54 +03:00
Adrian Costina dd69836473 util_dacfifo: Infer clock and reset signals 2018-04-11 15:09:54 +03:00
Adrian Costina 3436210429 axi_adcfifo: Infer clock and reset signals 2018-04-11 15:09:54 +03:00
Lars-Peter Clausen b7f8345f17 library: Remove unreferenced files from IP file lists
Some IP core have files in their file list for common modules that are not
used by the IP itself. Remove those.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
2018-04-11 15:09:54 +03:00
Lars-Peter Clausen dec0661f87 Move Xilinx specific DC filter implementation to library/xilinx/common/
The DC filter implementation in library/common/dc_filter.v is Xilinx
specific as it uses the Xilinx DSP48 hard-macro. There is a matching Altera
specific implementation in library/altera/common/dc_filter.v.

Move the Xilinx specific implementation from the generic common folder to
the Xilinx specific common folder in library/xilinx/common/ since that is
where all other Xilinx specific common modules reside.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
2018-04-11 15:09:54 +03:00
Lars-Peter Clausen 89ad5f7836 Makefile: Change IP component dependency to component definition file
Currently the IP component dependency in the Makefile system is the Vivado
project file. The project file is only a intermediary product in producing
the IP component definition file.

If building the component definition file fails or the process is aborted
half way through it is possible that the Vivado project file for the IP
component exists, but the IP component definition file does not.

In this case there will be no attempt to build the IP component definition
file when building a project that has a dependency on the IP component.
Building the project will fail in this case.

To avoid this update the Makefile rules so that the IP component definition
file is used as the dependency. In this case the IP component will be
re-build if the component definition file does not exist, even if the
project file exists.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
2018-04-11 15:09:54 +03:00
Lars-Peter Clausen 35a39ba2e6 Regenerate library Makefiles using the new shared Makefile include
This reduces the amount of boilerplate code that is present in these
Makefiles by a lot.

It also makes it possible to update the Makefile rules in future without
having to re-generate all the Makefiles.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
2018-04-11 15:09:54 +03:00
Lars-Peter Clausen 2b108c63db Add common library Makefile
The library Makefiles for share most of their code.  The only difference is
the list of project dependencies.

Create a file that has the common parts and can be included
by the library Makefiles.

This drastically reduces the size of the library Makefiles and also allows
to change the Makefile implementation without having to re-generate all
Makefiles.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
2018-04-11 15:09:54 +03:00
Laszlo Nagy bfc8ec28c3 util_axis_fifo: instantiate block ram in async mode
In cases when a shallow FIFO is requested the synthesizer infers distributed RAM
instead of block RAMs. This can be an issue when the clocks of the FIFO are
asynchronous since a timing path is created though the LUTs which implement the
memory, resulting in timing failures. Ignoring timing through the path is not a
solution since would lead to metastability.
This does not happens with block RAMs.

The solution is to use the ad_mem (block RAM) in case of async clocks and letting
the synthesizer do it's job in case of sync clocks for optimal resource utilization.
2018-04-11 15:09:54 +03:00
Istvan Csomortani 3277ea4be0 ad_dcfilter: Enable output registers in DSP48E1
Pipelining the DSP48 output will improve performance and often saves power so
it is suggested whenever possible to fully pipeline this function.
2018-04-11 15:09:54 +03:00
Istvan Csomortani 09a6eb5360 up_dac_common: Explicitly define boolean parameter as a 1 bit value 2018-04-11 15:09:54 +03:00
Istvan Csomortani a1e2b60cb3 ad_xcvr_rx_if: rx_ip_sof_d register has a width of 4 bits 2018-04-11 15:09:54 +03:00
Istvan Csomortani b6770effc5 avl_dacfifo: Add missing wire declaration 2018-04-11 15:09:54 +03:00
Istvan Csomortani f100a6bf21 avl_dacfifo: Delete deprecated false path definition 2018-04-11 15:09:54 +03:00
Istvan Csomortani 425e803364 license: Fix a spelling mistake 2018-04-11 15:09:54 +03:00
Istvan Csomortani 34994222b4 license: Update old license headers 2018-04-11 15:09:54 +03:00
Laszlo Nagy ee79ba5686 axi_hdmi_tx: removed unused registers 2018-04-11 15:09:54 +03:00
Istvan Csomortani 9a76bd4536 axi_adxcvr: Set the init value of the configuration registers 2018-04-11 15:09:54 +03:00
Istvan Csomortani 571b721274 util_adxcvr: CPLLPD should be used for reset
For CPLL reset the CPLLPD ports should be used, instead of the
CPLLRESET. The recommended reset width is above 2us.
See UG576 pg. 60 for more detail.
2018-04-11 15:09:54 +03:00
Istvan Csomortani 4e60f15e7f axi_clkgen: Add a parameter to control the clock source options
Add a parameter to the control the clock source option of the MMCM. If
the MMCM has only one clock source the CLKSEL pin will be tied to VDD.

The previous version added a redundant path between the CLKSEL port and
register map.
2018-04-11 15:09:54 +03:00
Rejeesh Kutty 72431ff952 a10soc: Connect AXI register reset 2018-04-11 15:09:54 +03:00
Adrian Costina a5407702bb util_adxcvr: Don't show reset ports for disabled lanes 2018-04-11 15:09:54 +03:00
Laszlo Nagy 0d01c08b00 util_[c|u]pack_dsf: clear syntehsis warnings
Remove unused registers and move register definitions to the generate block
that is actually using it.
2018-04-11 15:09:54 +03:00
Laszlo Nagy bce0cf8e22 util_[w|r]fifo: Reduce synthesis warnings 2018-04-11 15:09:54 +03:00
Laszlo Nagy eedd8ed5d8 up_delay_cntrl: Fix synthesis warnings, no functional changes
Reduce the number of synthesis warnings with the help of a generate
statement. When the block is disabled do not generate any logic.
2018-04-11 15:09:54 +03:00
Laszlo Nagy b4ab639db5 up_[adc|dac]_common: Define the DPR registers only when the interface is enabled 2018-04-11 15:09:54 +03:00
Laszlo Nagy 5cba46165a axi_dmac: fix synthesis warnings
Separated the 2D transfer registers to a separate generate block
2018-04-11 15:09:54 +03:00
Laszlo Nagy 4bcf45a17a common: clean up synthesis warnings
Removed unused registers and define registers only when they are in use.
2018-04-11 15:09:54 +03:00
Laszlo Nagy b6d2def504 axi_ad9361: clear synthesis warnings
Defined the delay registers only when they are used.
2018-04-11 15:09:54 +03:00
Adrian Costina 5bfc585524 axi_dmac: Added MAX_BYTES_PER_BURST and DISABLE_DEBUG_REGISTERS parameters to Intel IP 2018-04-11 15:09:54 +03:00
Adrian Costina 25ffb91dc6 axi_hdmi_tx: Updated .sdc constraints 2018-04-11 15:09:54 +03:00
Adrian Costina a0cb3af11d axi_hdmi_tx: Use abstract multiplier module supporting both Xilinx and Intel FPGAs 2018-04-11 15:09:54 +03:00
Istvan Csomortani d13ff8df1e axi_dmac: In SDP mode REGCEB is connected to GND
In newer version of Vivado (e.g. 2017.4) the REGCEB pin of the block ram
macro is connected to ground. So the following false path became
redundant.
2018-04-11 15:09:54 +03:00
Istvan Csomortani fcbc977cd8 axi_ad7616: Add missing port to instantiation 2018-04-11 15:09:54 +03:00
Istvan Csomortani f605b428fc spi_engine:axi_spi_engine: Add missing port to instantiations 2018-04-11 15:09:54 +03:00
Istvan Csomortani 7d0b162eda axi_ad9963: Fix port dependency definition 2018-04-11 15:09:54 +03:00
Istvan Csomortani a7b98c397a ad_tdd_control: Fix the tdd_burst_counter implementation 2018-04-11 15:09:54 +03:00
Istvan Csomortani cd94f2f249 util_axis_upscale: Initial commit
This module upscale an n*sample_width data bus into a 16 or 32*n data
bus. The samples are right aligned and supports offset binary or two's
complement data format.
2018-04-11 15:09:54 +03:00
Istvan Csomortani 269ae40f66 spi_engine: Add support for 8 SDI lines 2018-04-11 15:09:54 +03:00
Istvan Csomortani e16f45c792 util_pulse_gen: Use equal-to for counter reset 2018-04-11 15:09:54 +03:00
Adrian Costina 017dcaed82 up_[adc|dac]_common: DRP_DISABLE should be boolean 2018-04-11 15:09:54 +03:00
Adrian Costina d3bfb33871 constraints: up_xfer_cntrl and up_xfer_status have its own constraints
The up_xfer_cntrl and up_xfer_status modules have its own constraints files
in library/xilinx/common. Each IP which has an instance of these
modules, have to use these constraints files.

The following IPs were modified:
  - axi_adc_decimate
  - axi_adc_trigger
  - axi_dac_interpolate
  - axi_logic_analyzer
2018-04-11 15:09:54 +03:00
Laszlo Nagy ae02773480 axi_dacfifo: Rewrote constraints to be more specific
Some of the wildcards matched too many paths and disabled the timing
checks on intraclock paths.
2018-04-11 15:09:54 +03:00
Adrian Costina b2d63bf9e0 axi_ad9434: Make adc_enable controllable from the channel register map 2018-04-11 15:09:54 +03:00
Adrian Costina 493fc1d48b axi_*: Fix instantiation of up_[adc|dac]_[common|channel]
A couple of new parameters and new ports are missing in several
up_[adc|dac]_[common|channel] instance, and generates warnings. The rule of
thumb is to use full instantiations, defining all the existing parameter and
ports of the module.

Fix all the instantiation of up_[adc|dac]_[common|channel], by defining all its
parameters and ports.
2018-04-11 15:09:54 +03:00
Adrian Costina 74b922f9f8 axi_*: Infer clock and reset signals of an IP
A clock sink must be connected to clock source, and a reset sink to
reset source, otherwise the tool will throw a synthesis warning.
By properly inferring all the reset and clock signals of an IP, we can
get rid of unwanted warning messages.

The following IPs tcl script was updated:
  - axi_ad9434
  - axi_hdmi_tx
  - util_cpack
  - util_adxcvr
  - axi_ad6676
  - axi_ad9625
  - axi_ad9379
  - axi_ad9265
  - util_tdd_sync
  - util_rfifo
  - util_wfifo
  - axi_ad9361
  - axi_ad9467
  - util_upack
  - axi_dacfifo
  - axi_ad9152
  - axi_ad9680
  - util_clkdiv
  - axi_ad9122
  - axi_ad9684
  - axi_mc_speed
  - axi_mc_current_monitor
  - axi_mc_controller
  - util_gmii_to_rgmii
  - util_adxcvr
  - axi_ad9379
  - axi_hdmi
  - library
  - axi_fmcadc5_sync
  - util_adcfifo
  - util_mfifo
  - axi_jesd204_rx
  - axi_jesd204_tx
  - axi_ad9361
  - axi_adxcvr_ip
2018-04-11 15:09:54 +03:00
Istvan Csomortani 3b34e8b594 up_clock_com: Fix the false path definitions for CDCs 2018-04-11 15:09:54 +03:00
AndreiGrozav c313c67585 axi_adcfifo_constr.xdc: Add missing backslash to command 2018-04-11 15:09:54 +03:00
Istvan Csomortani d81f605ae9 axi_ad9162: Fix code alignment, no functional changes 2018-04-11 15:09:54 +03:00
Istvan Csomortani 758c617c77 common/up_* : Make up_rstn synchronous to up_clk
The up_rstn is driven by s_axi_resetn, which is generated by a
Processor System Reset module. (connected to port peripheral_aresetn)
Therefor using this reset signal as an asynchronous reset is redundant,
and a bad design practice at the same time. Asynchronous reset should be
used if it's inevitable.
2018-04-11 15:09:54 +03:00
Adrian Costina 8234ba1029 scripts:adi_ip: Update web address format
Change format for web address so that IP GUI considers it valid
2018-04-11 15:09:54 +03:00
Istvan Csomortani 7c04e36656 scripts: Message severity changes on Vivado
Vivado sometimes generates semi-valid or invalid warnings and critical warnings.
In the past these messages were silenced, by changing its message severity.
These setups were scattered in multiple scripts. This commit is an attempt
to centralize it and make it more maintainable and easier to review it.
2018-04-11 15:09:54 +03:00
Istvan Csomortani 47e95fc4a9 scripts: Update tools for the next release
The next supported tool versions are:
  + Vivado 2017.4.1
  + Quartus 17.1
2018-04-11 15:09:54 +03:00
Istvan Csomortani 377848ef52 cftl: Delete unused projects and libraries 2018-04-11 15:09:54 +03:00
Istvan Csomortani bee392253b jesd204:tb: Fix the loopback_tb test bench
The jesd204_rx instantiation contained a port that did not exist. (phy_ready)
2018-03-28 15:19:18 +01:00
Adrian Costina 9baf910339 axi_logic_analyzer: Fix push-pull/open-drain selection 2018-03-07 10:19:51 +02:00
Istvan Csomortani a740b6012f Make: Use $(MAKE) for recursive make commands
This commit should resolve the issue #64.

Recursive make commands should always use the variable MAKE, not the explicit
command name ‘make’.
2018-03-07 07:40:19 +00:00
Lars-Peter Clausen e95f1b282e Remove unused Q_OR_I_N parameter from JESD204 ADC cores
The cores that handle the JESD204 ADC cores do not feature IQ correction
logic. The Q_OR_I_N parameter for the channel modules is unused, so remove
it.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
2018-02-20 16:33:16 +01:00
Lars-Peter Clausen 0c2fad54d7 Remove unused IO_DELAY_GROUP parameter from JESD204 ADC cores
The cores that handle the JESD204 ADC converters do not feature any direct
IO and subsequently no IO-delay blocks either. Remove the unused
IO_DELAY_GROUP parameter.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
2018-02-20 16:33:16 +01:00
AndreiGrozav 64c8fd7e5e axi_clkgen: add ultrascale series support 2018-02-13 17:33:38 +02:00
Matt Fornero 3e7399913f axi_dmac: Include TLAST in AXIS slave port
Bundle the TLAST signal in with the other AXIS slave signals to enable
easier connection between AXIS devices that use TLAST

Signed-off-by: Matt Fornero <matt.fornero@mathworks.com>
2018-01-23 17:43:48 +01:00
Lars-Peter Clausen c6073954d9 axi_dmac: Add limited TLAST support for streaming AXI source interface
Add some limit TLAST support for the streaming AXI source interface. An
asserted TLAST signal marks the end of a packet and the following data beat
is the first beat for the next packet.

Currently the DMAC does not support for completing a transfer before all
requested bytes have been transferred. So the way this limited TLAST
support is implemented is by filling the remainder of the buffer with 0x00.

While the DMAC is busy filling the buffer with zeros back-pressure is
asserted on the external streaming AXI interface by keeping TREADY
de-asserted.

The end of a buffer is marked by a transfer that has the last bit set in
the FLAGS control register.

In the future we might add support for transfer completion before all
requested bytes have been transferred.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
2018-01-23 17:43:48 +01:00
Lars-Peter Clausen da28ee3cce axi_ad9361: xilinx LVDS interface: Restore previous feedback clock polarity
Commit ff50963c7f ("axi_ad9361- altera/xilinx reconcile- may be broken-
do not use") inverted the polarity of the TX feedback clock.

This exposed some issues in the existing drivers which can cause the
interface tuning to fail randomly under certain conditions.

To keep backwards compatibility with existing drivers restore the previous
behavior.

A separate fix will be applied to the drivers that resolves the issue that
has been exposed by the polarity inversion. So that interface calibration
works reliably under all conditions.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
2018-01-19 18:17:50 +01:00
AndreiGrozav 92321f0534
ad9434: Specified DEVICE_TYPE parameter options 2018-01-19 14:13:37 +02:00
AndreiGrozav 28830b4b66
axi_ad9434.v Add description for parameter 2018-01-18 15:52:11 +02:00
AndreiGrozav d44f7d1e4f axi_ad9434: Fix bad parameter definition
Assigning the value of a local parameter(localparam) to a parameter
will end up with a conflict(not highlighted by the tool). In this
case, the parameter type was defined as a string instead of an
integer. Furthermore, this scenario leads to an undesired choice
between primitive types.
2018-01-18 14:46:08 +02:00
Istvan Csomortani 3e3955ce91 avl_dacfifo: Fix avl_address generation
+ Define address limit at 2GByte
  + Address is WORD aligned, increment accordingly
2017-12-15 12:17:47 +00:00
Istvan Csomortani 60d2fb939d avl_dacfifo: Control the avl_burstcount inside the FSM 2017-12-15 08:56:57 +00:00
Istvan Csomortani b8e8410cbc avl_dacfifo: Fix the last address buffer control 2017-12-15 08:56:57 +00:00
Istvan Csomortani aaff5a8d6a avl_dacfifo: dma_last_beats is transfered to avalon clock domain, without conditioning
The dma_last_beats is used by the Avalon Memory Mapped interface
controller, to define the last burst length.
Its value get stable after the last valid data of the DMA interface, and staying
stable until the positive edge of the DMA's xfer_req.

No need to condition the transfer of this register to avalon clock
domain.
2017-12-15 08:55:01 +00:00
Istvan Csomortani 6bbf1ae83c avl_dacfifo: End of burst is not always end of a transaction
The XFER_END state defines the end of a transaction, when the entire
data set is written or read to/from the DDRx memory.
A transaction can contain multiple Avalon bursts. Make sure that the FSM
goes back into staging phase at the end of each burst; also define a
signals which indicate the end of each burst for control.
2017-12-09 09:56:33 +00:00
Luca Ceresoli ba24909a25 axi_streaming_dma_rx_fifo: fix period_count clock and TLAST
The period_count should be updated once per clock cycle. This is not
enforced with the current implementation, which probably leads to
period_count being decremented on both m_axis_aclk edges.

A problem observed due to this is that the m_axis_tlast output is not
asserted or is asserted for a too short time for the consumer to
detect it.

Fix by letting the decrement (and thus the m_axis_tlast toggling)
happen only on the rising edge of the m_axis_aclk clock.

Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net>
2017-12-05 13:04:46 +00:00
Istvan Csomortani 2b2c6b57f9 axi_dmac: Align the data_ready to data
The commit 6900c have added an additional register stage into the fifo read
data path, but the control signals (ready/valid/underflow) were not realigned
to the data. This can cause data lose or duplicated samples in some case.
Realign the control signals to the data.
2017-11-21 13:15:03 +00:00
Adrian Costina b54dab33e0 Make: Update makefiles 2017-11-20 14:27:39 +02:00
AndreiGrozav 74ad0d1e46 library: Update
Older Vivado versions where incorrectly inferring interfaces
-axi_ad9361
-axi_ad9963
-axi_adc_decimate
-axi_adc_trigger
-axi_clkgen
-axi_dac_interpolate
-axi_hdmi_tx
-axi_i2s_adi
-axi_logic_analyzer
-spi_engine
2017-11-15 17:08:45 +02:00
Lars-Peter Clausen 631f9253b2 axi_adxcvr: Correctly report the transceiver type in the register map
The util_adxcvr supports GTX2, GTH3 and GTH4. The transceiver is selected
using the XCVR_TYPE parameter.

The axi_adxcvr on the other hand only has a configuration parameter to
indicate whether a GTX or GTH transceiver is used (GTH_OR_GTX_N). Since
there are some minor differences between GTH3 and GTH4 that software needs
to know about rename the GTH_OR_GTX_N to XCVR_TYPE and match use the same
semantics as util_adxcvr.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
2017-11-14 14:31:03 +01:00
Istvan Csomortani 6900c9979b axi_dmac: Reset fifo_rd_data without delaying the valid data 2017-11-03 13:41:50 +00:00
Istvan Csomortani 960883c789 avl_dacfifo: Fix dac_xfer_req generation
The dac_xfer_req should indicate one single thing, that the FIFO is in
read phase. Should not be affected by any signals, which indicates data
validity on any interface. (e.g. dac_valid)
This signal is not used by the device core, its main purpose is to
indicate the state of the interface for a posible intermediat processing
module.
2017-11-03 09:32:10 +00:00
Istvan Csomortani 572cd10c35 avl_dacfifo: Fix reset architecture in avl_dacfifo_rd
Make sure that all address registers are reset during the initialization
phase of the FIFO.
2017-11-03 09:29:43 +00:00
Istvan Csomortani 17c749962c avl_dacfifo: Fix the loopback of avl_xfer_req
When the read FSM is not in a burst, the incomming avl_xfer_req can be
looped back to the write module.
2017-11-02 12:02:54 +00:00
Istvan Csomortani 610a237730 avl_dacfifo: Fix write enable generation
Data is written into the CDC FIFO if both dma_ready and dma_valid are
asserted. This two signals is enough to validate the data coming from
the DMA.
2017-11-01 12:22:18 +00:00
Istvan Csomortani 6895915076 avl_dacfifo: Fix reset of write address register
Fix the reset of the dma_mem_waddr (write address register of the CDC
FIFO on DMA's clock domain). This solves the occasional invalid read backs after
multiple re-initialization of the PL_DDR_FIFO.
2017-11-01 12:21:56 +00:00
Istvan Csomortani e3ea51ade3 avl_dacfifo: Refactor the fifo
+ Build both the read and write logic around an FSM
 + Consistent naming of registers and wires
 + Add support for burst lenghts higher than one, current burst lenght
is 64
 + Fix all the bugs, and make it work (first bring up with
adrv9371x/a10soc)
2017-10-31 14:30:06 +00:00
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
Matt Fornero e8bab0b45f adi_env: Normalize environment variables
If the ADI_HDL_DIR or ADI_PHDL_DIR are set on Windows platforms, an
invalid TCL character (e.g. backslash) may be used as a file separator,
causing issues with the build / library scripts.

Normalize the paths before using them as global TCL variables.
2017-10-23 12:15:14 +01:00
Istvan Csomortani 5a1e77b6dc axi_ad9361: Fix dac_datarate counter implementation
Update the dac_data_rate counter inmplementation to be infered as a
loadable down counter. This patch will prevent failing paths inside the counter.
2017-10-11 10:07:28 +01:00
Istvan Csomortani 06bab87733 axi_dmac: Reset fifo_rd_data when DMA is off - v2
The first attempt (f3daf0) faild miserably. When the data_req signal
from the device had more than 1 cycle of deassert state, because of the
added latency of the data stream, the device got 'zeros' too.
In this fix, the DMA will hold the valid data on the bus, between two
consecutive data request. The bus is reseted just after all the data
were sent out.
2017-10-10 08:10:24 +01:00
Istvan Csomortani bdd7e29bae util_dacfifo: Integrate grey coder/decoder module
The grey coder/decoder function was limited to 10 bits, and this
resulted an unwanted limitation of the FIFO size. Using this
module, the coder/decoder data width can be adjusted to the current
address width.
2017-10-05 12:25:50 +01:00
Istvan Csomortani f3daf0dacb axi_dmac: Reset the fifo_rd_data if the DMA is off
Reset the fifo_rd_data if the DMA does not have an active transfer.
Becasue all the DAC device cores are transfering the data from the FIFO
interface to the data interface without any validation signal, DMA needs to put
the data bus into a known state, to prevent the device core to send the
last known data again and again.
2017-10-05 08:54:15 +01:00
Istvan Csomortani a2ee478027 axi_ad9361: Fix incorrect merge
Fix paramter propegation for DAC_CLK_EDGE_SEL
2017-10-03 10:51:35 +01:00
Istvan Csomortani 0064004d34 axi_dmac: Control s_axis_user/fifo_wr_sync validity
The ports s_axis_user or fifo_wr_sync will be active just
if the SYNC_TRANSFER_START is enabled.
2017-10-03 09:32:14 +01:00
Istvan Csomortani 08a31a7d9f axi_dmac: Fix the last incorrect merge 2017-10-03 09:15:45 +01:00
Istvan Csomortani 49293f7a87 axi_ad9361: Fix the last incorrect merge
The last merge broke a couple of source files of this core. This
commit brings all the core to a functional state.
2017-10-03 09:15:23 +01:00
Istvan Csomortani 89bd8b44d4 Merge branch 'dev' into hdl_2017_r1 2017-09-26 07:42:19 +01:00
Istvan Csomortani a386a42642 interface: Update the transceiver interfaces
On commit 6d4430 the signal called sel was removed from the transceiver
interfaces. Update the interface definition script.
2017-09-25 18:02:04 +01:00
Istvan Csomortani 2926a6aaf9 altera/ad_mem_asym: Delete it, QSYS flow is used 2017-09-25 08:57:26 +01:00
Istvan Csomortani 700ed156ab [axi|avl]_dacfifo: Create a separate bypass module for altera/xilinx 2017-09-25 08:56:40 +01:00
Lars-Peter Clausen 55daa786fa axi_adcfifo: Add missing constraints
Add missing timing exceptions on paths between the DMA and DDR clock
domains. All these paths are properly synchronized using CDC in the HDL,
but are missing timing exceptions in the XDC file. This can lead to timing
errors when building a design using the axi_adc_fifo.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
2017-09-13 19:52:48 +02:00
Adrian Costina 9a32240cc5 axi_ad9379: Initial commit 2017-09-01 17:26:37 +03:00
Adrian Costina 6d5b5b50a5 axi_logic_analyzer: Compensate the 4 word latency of util_var_fifo 2017-08-30 18:17:41 +03:00
Adrian Costina f6288dc0a3 util_extract: Compensate 4 word latency 2017-08-30 18:02:09 +03:00
Adrian Costina 54e96c49ae util_var_fifo: Set fix latency of 4 for all interpolation values 2017-08-30 18:01:06 +03: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
Adrian Costina 421b4bed41 axi_ad9963: Moved RX configuration bit SCALECORRECTION_ONLY to bit 9 2017-08-28 15:58:00 +03:00
Rejeesh Kutty f19b8c62a1 library- add a timer for quick start 2017-08-25 13:28:05 -04:00
Rejeesh Kutty 4050f5ae58 adrv9361- add adl5904 2017-08-24 15:47:17 -04:00
Lars-Peter Clausen e4bb2beaf1 altera: adi_jesd204: Export link domain reset
Export the reset signal for the link clock domain. This can be used by
external logic that is in the link clock domain to reset itself.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
2017-08-24 17:43:12 +02:00
Lars-Peter Clausen 853342b201 altera: adi_jesd204: Disable FPLL phase alignment mode
Enabling the phase alignment mode of the FPLL seems to break manual
re-calibration, which is required when changing the lane rates. The
calibration seems to select the wrong VCO frequency band and the PLL no
longer locks.

Disable phase alignment mode for now, this has a negative effects on
deterministic latency, but it is better than not working at all.

Waiting for feedback from Altera/Intel on how to make manual re-calibration
work in phase alignment mode.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
2017-08-24 17:43:12 +02:00
Lars-Peter Clausen 72a23eeb71 altera: adi_jesd204: Enable avmm_busy flag in the link FPLL register map
To be able to check the FPLL re-configuration arbitration status from
software enable the avmm_busy flag in the register map.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
2017-08-24 17:42:44 +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 e6aacd2f56 axi_dmac: Better support debug IDs when ID_WIDTH != 3
The current layout of the debug ID register assumes that the ID_WIDTH is 3.
Change things so that the padding 0 width depends on the ID_WIDTH
parameter so that we end up with the same register layout regardless of the
value of ID_WIDTH.

Also split things into two registers, this allows for an ID_WIDTH up to 8
(which should hopefully be enough for all practical applications).

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
2017-08-24 17:42:20 +02:00
Istvan Csomortani deefb33490 avl_dacfifo: Update IP to qsys flow 2017-08-22 09:16:21 +01:00
Istvan Csomortani b2550b7aa0 axi_dacfifo: Update constraints 2017-08-22 09:16:21 +01:00
Istvan Csomortani 85a7cebc0e axi_dacfifo: Major update and redesign
Redesign the axi_dacfifo, to increase the supported datarates.
Major modifications:
  + The FIFO consist of two module: WRITE and READ. The axi_dacfifo_dac
was deprecated.
  + Both the AXI write and AXI read transaction are controlled by two
FSM, to increase redability of the code.
  + Support all the possible burst lengths [0..225], handles the last
fractional burst on both sides correctly.
  + Common reset architecture throughout the design, all the internal
registers and memories are reset on the posedge of dma_xfer_req
  + Delete all Altera related sources, for Altera projects
avl_dacfifo should be used.

WIP: foobar

[WIP]axi_dacfifo: Update

axi_dacfifo: Few minor updates, almost working state
2017-08-22 09:16:21 +01:00
Lars-Peter Clausen 4de0a94e37 altera: jesd204_phy: Fix indention issues
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
2017-08-21 13:57:55 +02:00
Lars-Peter Clausen 9c5b48c151 library: Add ADI JESD204 wrapper for Altera/Intel platforms
Add a wrapper module for Altera/Intel platforms that instantiates and
connects all the components required to for a JESD204 link.

The following components are created:
  * Transceiver for each lane
  * Transceiver lane PLL (TX only)
  * Transceiver reset controller
  * Link PLL
  * JESD204 link layer processing
  * JESD204 link layer processing control interface
  * axi_adxcvr link management peripheral

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
2017-08-21 11:21:42 +02:00
Lars-Peter Clausen 0108d01043 library: Add JESD204 PHY wrapper for Arria10 Native PHY
Add a wrapper that instantiates the Arria10 Native PHY and configures it
for JESD204 operation. The datapath width is set to 4 octets per beat.

The maximum lane rate that is achievable with hard-logic PCS included in
the PHY is below the requirements of the JESD204 for some of the PHY speed
grades. For projects that require a lane rate that is higher than what the
hard-logic PCS can support a soft-logic PCS module can be instantiated. The
external interface of the jesd204_phy is identical regardless of whether
soft- or hard-logic PCS is used.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
2017-08-21 11:20:57 +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 2d2477e552 util_cdc: Add helper function for creating constraints for the CDC blocks
Add a set of helper functions for the CDC library that creates the correct
constraints for the CDC blocks. This makes it easier to specify the
constraints in the individual user's SDC files.

This only works for Altera where full scripting capabilities are available
in the SDC files.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
2017-08-21 11:05:16 +02:00
Lars-Peter Clausen 27d243ad14 adi_ip_alt.tcl: ad_ip_parameter: Allow to specify additional properties
Allow to specify additional properties when defining a IP parameter. The
properties take the form of a list of key value pairs. E.g.

ad_ip_parameter ... { \
  DISPLAY_NAME "Name" \
  DISPLAY_HINT "radio" \
}

This helps to reduce the amount of boilerplate when additional properties
need to be specified for a parameter.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
2017-08-21 11:05:16 +02:00
Lars-Peter Clausen 9bf852fff2 adi_ip_alt.tcl: Allow to add TCL files to the fileset
TCL files can be helpful to automate certain tasks like creating timing
constraints. Add handling for them to the ad_ip_addfile function.

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 cefb2b062e util_adcfifo: Remove always false check
dma_raddr is only incremented if it is less than dma_waddr_rel_s.
dma_waddr_rel_s is always less or equal to adc_waddr_rel << RATIO and
adc_waddr_rel is less than DMA_ADDR_LIMIT >> RATIO.

By induction we can conclude that this means that dma_raddr will always be
less then DMA_ADDR_LIMIT and the check for this will always evaluate to
false can be removed.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
2017-08-18 09:26:24 +02:00
Lars-Peter Clausen a46b9cfa5a util_adcfifo: Fix data corruption at faster DMA clock rates
When the DMA clock to ADC data rate ratio exceeds a certain threshold it is
possible that an erroneous dma_waddr_rel toggle event is generated. This
causes the last address of the previous DMA transfer to be transferred to
the DMA domain. And the DMA side will start reading from the FIFO even
though data is not available yet.

This results in data corruption with the current transfer containing data
from the previous transfer.

The root cause here is that the toggle signal CDC synchronizer register are
reset in the DMA when a new transfer starts, but not in the ADC domain,
causing a potential mismatch and the incorrect toggle event. To fix this
remove the reset from the DMA side. This is OK since the registers are
self-resetting if the reset signal is asserted for more than 3 clock cycles.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
2017-08-18 09:26:23 +02:00
Lars-Peter Clausen f9fe66694d axi_logic_anlayzer: Fix trigger AND logic
AND logic means that all enabled triggers need to evaluate to true, others
are don't care. Fix the logic to behave accordingly.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
2017-08-17 11:36:56 +02:00
Lars-Peter Clausen 42ff5d4f80 axi_streaming_dma_tx_fifo: Fix drain logic
At the moment the drain signal is always asserted when the controller is
enabled. This breaks backpressure and data is lost. The drain signal should
only be asserted when the controller gets disabled until the last beat of
the current DMA transfer.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
2017-08-14 16:02:32 +02:00
Lars-Peter Clausen 38f495b2cf axi_i2s_adi: Make constraints work on UltraScale
The 'PRIMITIVE_SUBGROUP == flop' filter only works on 7-Series. Replace it
with 'IS_SEQUENTIAL' which works on both 7-Series and UltraScale.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
2017-08-14 16:02:32 +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