Commit Graph

346 Commits (6e6f1347d7f61527462215316db2b5ae0307a91a)

Author SHA1 Message Date
Istvan Csomortani 77ffa1f8ac util_dec256sinc24b: Fix the accumulator
Do a similar fix as for the decimation stage. (ab2788)
2019-06-28 11:18:29 +03:00
Istvan Csomortani 94f8d1b424 util_axis_upscale: Sign extension must be done separately for each channel 2019-06-28 11:18:29 +03:00
Istvan Csomortani 8fb6fb329e util_dec256sinc24b: Fix the differentiator
Move the subtraction outside of the always block. In this way we're not adding
an additional delay element on to the output of the differentiator,
which brakes the transfer function of the filter.
2019-06-28 11:18:29 +03:00
Istvan Csomortani a15afa6c03 util_dec256sinc24b: Avoid generated clock from logic
Do not use word_clk, create a clock enable signal instead.
2019-06-28 11:18:29 +03:00
Istvan Csomortani 59ce663479 util_dec256sinc24b: Fix resets 2019-06-28 11:18:29 +03:00
Istvan Csomortani 6668accc96 ad7405 : Initial commit
This project is an inital version of the ADuM7701 (CMOS) or AD7405 (LVDS)
reference board.
2019-06-28 11:18:29 +03:00
Istvan Csomortani 70b7d69ff8 whitespace: Delete all trailing white spaces 2019-06-07 10:20:15 +03:00
Edward Kigwana 036dc92b55 up_axi: Remove dead code.
Signed-off-by: Edward Kigwana <ekigwana@scires.com>
2019-04-09 14:27:31 +03:00
AndreiGrozav 7dcb2050c7 dev info parameter update: Increase pcore version 2019-03-30 11:26:11 +02: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
Istvan Csomortani ac4d78b95d ad_datafmt: Add support for 8 bit data width 2019-03-20 15:51:28 +02:00
Istvan Csomortani f15ed8475e util_pulse_gen: Change the counter to a down-counter
To prevent the case, when after an invalid configuration, the generated
output PWM signal is constant HIGH, change the counter to a
down-counter. In this way the pulse will be placed at the end of the
PWM period, and if the configured width value is higher than the
configured period the output signal will be constant LOW.
2019-03-20 08:21:08 +00:00
Istvan Csomortani 2d7b189ba3 util_pulse_gen: Add an input configuration port for pulse width attribute 2019-03-19 16:33:10 +00:00
Laszlo Nagy c10c4d4f5e up_dac_common: fix address decoding
Patch the typo introduced in a previous commit while attempting the
address space reduction.
2019-02-19 15:38:45 +02:00
AndreiGrozav fae4d478d4 ad_csc: Generalize for CrYCB 2 RGB conversion 2019-02-12 10:43:46 +02:00
AndreiGrozav 74eacc2369 ad_csc(RGB2CrYCb): use signed multiplication. 2019-02-12 10:43:46 +02:00
AndreiGrozav 265781f29a axi_hdmi: Let the tools assign the csc resources
Write code to pipeline data path for better DSP utilization on the
color space conversion.
In the old method the addition operations were performed outside the
DSPs
2019-02-12 10:43:46 +02:00
Laszlo Nagy 93df754800 up_adc_common/up_dac_common: reduce address space to half
Limit the adc/dac common space to 128 registers mapped 0-127 in the COMMON_ID segment.
2019-01-23 17:44:33 +02:00
Laszlo Nagy f41806c1be common/ad_xcvr_rx_if: make core more generic 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 67f204e10e library: Add perfect shuffle module
The perfect shuffle is a common operation in data processing. Add a shared
module that implements this operation.

Having this in a shared module rather than open-coding every instance makes
sure that there are clear and well defined semantics associated with the
operation that are the same each time. This should ease review, maintenance and
understanding of the code.

The perfect shuffle splits the input vector into NUM_GROUPS groups and then
each group in WORDS_PER_GROUP. The output vector consists of
WORDS_PER_GROUP groups and each group has NUM_GROUPS words. The data is
remapped, so that the i-th word of the j-th word in the output vector is
the j-th word of the i-th group of the input vector.

The inverse operation of the perfect shuffle is the perfect shuffle with
both parameters swapped.
I.e. [perfect_suffle B A [perfect_shuffle A B data]] == data

Examples:
  NUM_GROUPS = 2, WORDS_PER_GROUP = 4
    [A B C D a b c d] => [A a B b C c D d]
  NUM_GROUPS = 4, WORDS_PER_GROUP = 2
    [A a B b C c D d] => [A B C D a b c d]
  NUM_GROUPS = 3, WORDS_PER_GROUP = 2
    [A B a b 1 2] => [A a 1 B b 2]

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
2018-10-15 15:34:31 +03:00
Lars-Peter Clausen f98c9e439b ad_dds_2: Don't try to round if signal is not truncated
If DDS_DW is equal to DDS_D_DW there is no signal truncation and
consequentially no rounding should be performed. But the check whether
rounding should be performed currently is for if DDS_DW is less or equal to
DDS_D_DW.

When both are equal C_T_WIDTH is 0. This results in the expression
'{(C_T_WIDTH){dds_data_int[DDS_D_DW-1]}};' being a 0 width signal. This is
not legal Verilog, but both the Intel and Xilinx tools seem to accept it
nevertheless.

But the iverilog simulation tools generates the following error:

	ad_dds_2.v:102: error: Concatenation repeat may not be zero in this context.

Xilinx Vivado also generates the following warning:

	WARNING: [Synth 8-693] zero replication count - replication ignored [ad_dds_2.v:102]

Change the condition so that truncation is only performed when DDS_DW is
less than DDS_D_DW. This fixes both the error and the warning.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
2018-08-28 10:08:22 +02:00
Istvan Csomortani bc692b9bd5 ad_rst: Synthesis attribute 'preserve' is redundant 2018-08-14 17:54:14 +03:00
Istvan Csomortani 495ba3891a ad_tdd_control: Register tdd_endof_frame
Register the tdd_endof_frame control signal to improve timing.
2018-08-10 14:06:38 +03:00
Istvan Csomortani 9eba3e8370 ad_tdd_control: Delete redundant reset from tdd_burst_counter logic
This way we can slightly improve timing.
2018-08-10 14:06:38 +03:00
Istvan Csomortani 375ccac072 ad_tdd_control: Switch '> 0' to '!= 0' to improve design 2018-08-10 14:06:38 +03:00
Istvan Csomortani 1e7f567e16 ad_rst: Initial value of the registers should be its default value
This patch will fix the following critical warning, generated by Quartus:

"Critical Warning (18061): Ignored Power-Up Level option on the following
registers
  Critical Warning (18010): Register ad_rst:i_core_rst_reg|rst_sync will power
  up to High File: ad_rst.v Line: 50"
2018-08-07 13:35:10 +01:00
Istvan Csomortani 11071516d1 ad_rst: Update all the modules, which instantiate the ad_rst 2018-08-06 21:24:41 +03:00
Istvan Csomortani 472b12feb7 ad_rst: Update the reset synchronizer module
For a proper reset synchronization, the asynchronous reset signal should
be connected to the reset pins of the two synchronizer flop, and the
data input of the first flop should be connected to VCC.

In the first stage  we're synchronizing just the reset de-assertion, avoiding
the scenario when different parts of the design are reseting at different time,
causing unwanted behaviours.

In the second stage we're synchronizing the reset assertion.

The module expects an ACTIVE_HIGH input reset signal, and provides an ACTIVE_LOW
(rstn) and an ACTIVE_HIGH (rst) synchronized reset output signal.
2018-08-06 21:24:41 +03:00
Istvan Csomortani c152b60137 ad_mem_asym: Improve the implementation of the asymmetric RAM
Because the read interface got a read enable port too, update all the
ad_mem_asym instances.
2018-08-06 17:29:05 +03:00
AndreiGrozav 79003c53db ad_dds: Fix synthesis updates
- remove reset logic
- add wait for dac valid logic
- rewrite sine concatenation on wires for different path width to
suppress warnings
- use computed atan LUT tables
2018-07-18 18:19:30 +03:00
AndreiGrozav 892febe68a ad_dds_2: Remove unused disable logic feature 2018-07-18 18:19:30 +03:00
AndreiGrozav a7f5746afb ad_dds: Add selectable phase width option. 2018-07-18 18:19:30 +03:00
AndreiGrozav 7b553997ab Add ad_dds.v
It will act as a wrapper for the previous dds modules(phase to angle conv.)
this module will furthermore contain the phase accumulator logic.
2018-07-18 18:19:30 +03:00
AndreiGrozav 35e8454fe7 Rename ad_dds.v to ad_dds_2.v 2018-07-18 18:19:30 +03:00
AndreiGrozav ad7e95b169 ad_dds: Add selectable out data width and fair rounding
The CORDIC has a selectable width range for phase and data of 8-24.
Regarding the width of phase and data, the wider they are the smaller
the precision loss when shifting but with the cost of more FPGA
utilization. The user must decide between precision and utilization.

The DDS_WD parameter is independent of CORDIC(CORDIC_DW) or
Polynomial(16bit), letting the user chose the output width.
Here we encounter two scenarios:
 * DDS_DW < DDS data width - in this case, a fair rounding will be
implemented corresponding to the truncated bits
 * DDS_DW > DDS data width - DDS out data left shift to get the
corresponding concatenation bits.
2018-07-18 18:19:30 +03:00
AndreiGrozav 2c1f9193cf ad_dds_1.v: Fully use the selectable data width feature
Update for the parametrized ad_mul module. This will scale
a selectable sine width in a multiplication module.
Rename the data and phase width parameters for legibility.
2018-07-18 18:19:30 +03:00
AndreiGrozav 3dc7be3eab ad_dds_sine_cordic: Fix sine pic to pic amplitude.
When the tool calculates the X value for different phase widths, we
get rounding errors for every width in the interval [8;24].
Depending on the width thess errors cause overflows or smaller amplitudes
of the sine waves.
The error is not linear nor proportional with the phase. To fix the issue
a simple aproximation was chosen.
2018-07-18 18:19:30 +03:00
AndreiGrozav 6a1853654a ad_dds: Separated phase width from data width 2018-07-18 18:19:30 +03:00
AndreiGrozav 664c46eb72 ad_dds_sine_cordic: Ajust for rounding errors
And fix comment typo
2018-07-18 18:19:30 +03:00
AndreiGrozav c6173023f8 ad_dds_cordic: Move the shifting operation
Perform the shifting operation before addition/subtraction in a
rotation stage. In the previous method, the result of the arithmetic
operation was shifted and the outcome was presented to the next stage.
In this way, data connections will be reduced between pipeline stages
2018-07-18 18:19:30 +03:00
AndreiGrozav a96d9bd3c2 ad_dds_sine: Cosmetic updates only 2018-07-18 18:19:30 +03:00
AndreiGrozav 43f460e744 ad_dds_cordic_pipe.v: Optimize for implementation
The present changes make better use of the Carry Chain blocks resulting in
fewer FPGA resources being used.
2018-07-18 18:19:30 +03:00
AndreiGrozav dc80048733 ad_dds_sine_cordic.v: Suppress warning
Width mismatch warning from 32 to dynamic width.
2018-07-18 18:19:30 +03:00
AndreiGrozav ad425dee5f ad_dds_1.v: Fix concatenation width mismatch 2018-07-18 18:19:30 +03:00
AndreiGrozav 4362c35125 ad_dds: Update for CORDIC algorithm integration
Add parameters:
  - to select the sine generator (polynomial/CORDIC)
  - to select the CORDIC data width(default 16)
Suppress the warnings generated when the DDS is disabled.
2018-07-18 18:19:30 +03:00
AndreiGrozav 4c32b47f6a ad_dds_1: Update for CORDIC algorithm integration
Add parameters and the mechanism:
  - to select the sine generator (polynomial/CORDIC)
  - to select the CORDIC data width(default 16)
2018-07-18 18:19:30 +03:00
AndreiGrozav 0e114a39e3 ad_dds: Add sine generator using CORDIC algorithm
https://en.wikipedia.org/wiki/CORDIC
Configurable in/out data width (14,16,18,20);
The HDL implementation requires pipelines, resulting in a
data_width + 2 clock cycles delay between the phase input data and the
sine data. For this reason, a ddata (delay data) was propagated through
the pipeline stages to help in future use scenarios
2018-07-18 18:19:30 +03: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