Commit Graph

2971 Commits (ab4ea30f6b98b97dac336dda11aefceb79350a78)

Author SHA1 Message Date
PIoandan ab4ea30f6b
Pulsar_LVDS: Add Project on Zedboard
* Add axi_pulsar_lvds IP core

---------

Signed-off-by: Ioan-daniel Pop <Pop.Ioan-daniel@analog.com>
2024-04-16 11:25:32 +03:00
Jorge Marques e646e61ce4 i3c_controller: Add I3C Controller IP
Add I3C Controller IP with required I3C features support.
Uses IRQ based DAA.
Supports speeds at 100MHz clk: 12.50MHz, 6.25MHz, 3.12MHz, 1.56MHz
Basic IBI support with/without MDB.
Compatible with AMD Xilinx and Altera FPGAs.

Signed-off-by: Jorge Marques <jorge.marques@analog.com>
2024-04-12 09:19:18 -03:00
Jorge Marques 6c8dd7ee15 common: Add ad_mem_dual
Dual access memory abstraction.

Signed-off-by: Jorge Marques <jorge.marques@analog.com>
2024-04-12 09:19:18 -03:00
Jorge Marques a2a8518911
spi_engine: Remove nonexistent interface, add dep (#1289)
Remove nonexistant pulse_gen_* interface on axi_spi_engine_hw.
Add sync_event.v to spi_engine_offload's intel_deps.
Fixes simultation on questasim.

Signed-off-by: Jorge Marques <jorge.marques@analog.com>
2024-04-12 09:17:18 -03:00
IstvanZsSzekely 74089397b3
util_do_ram: Added keep signal to the FIFO (#1291)
util_do_ram: Added keep signal to the FIFO

Signed-off-by: Istvan-Zsolt Szekely <istvan.szekely@analog.com>
2024-04-04 14:35:13 +03:00
Villyam fd81a821b0 library/axi_pwm_gen: Replaced blocking assignments in reset.
Lattice tools give error for using blocking assignments at one side
and non blocking in the other.

Signed-off-by: Villyam <Vilmoscsaba.Jozsa@analog.com>
2024-03-28 17:16:04 +02:00
Villyam 5ebd95004d library/axi_clock_monitor: Removed ID offset check, regmap optimized.
Signed-off-by: Villyam <Vilmoscsaba.Jozsa@analog.com>
2024-03-28 09:34:21 +02:00
Jorge Marques f2a00c8528
spi_engine: Revert Offload AXI signals, ctrl fixup (#1288)
Revert AXI bus signals back to upper case on SPI Engine Offload IP,
changed on e2ca5a991a.
Fixup signals from sd*_data_* to sd*_* for spi_engine_ctrl interface.
Non-breaking mistake, but added warnings to the IP.

Signed-off-by: Jorge Marques <jorge.marques@analog.com>
2024-03-14 11:45:33 -03:00
LBFFilho 2052817dcb
SPI Engine: Add registers for Offload memory and FIFO sizes (#1279)
* SPI Engine: Add registers for Offload memory and FIFO sizes

Adds registers at dword 0x04 and 0x05, respectively allowing software
to get the sizes of the Offload Module memories (command and sdo) or
the sizes of the FIFOs on the AXI regmap.

Signed-off-by: Laez Barbosa <laez.barbosa@analog.com>
2024-03-08 08:40:48 -03:00
Jorge Marques e2ca5a991a
spi_engine: Create interface_ip.tcl (#1251)
Use tcl script instead of static xmls for the interface.
Easier to maintain and are not gitignored.
Rename spi_master to spi_engine because every interface should be
prefixed by the IP name; in this case, spi_engine.
Also, remove interface/*.sv files on make clean and git ignore them.

Signed-off-by: Jorge Marques <jorge.marques@analog.com>
2024-02-28 10:31:46 -03:00
Iulia Moldovan 1e4dc519fc adi_util_hbm.tcl: Change wrong var name rx_tx_n->tx_rx_n
Signed-off-by: Iulia Moldovan <Iulia.Moldovan@analog.com>
2024-02-20 17:43:30 +02:00
Iulia Moldovan 608044d124 util_hbm_ip.tcl: Fix LENGTH_WIDTH and HBM_SEGMENTS_PER_MASTER errors
* Value 24 was wrongfully set for parameter LENGTH_WIDTH, because
  it is not among the valid values, which are 28, 29, ..., 34. Set '28'
  to be the default value
* Vivado Tcl somehow didn't accept the old expression set for
  calculating the HBM_SEGMENTS_PER_MASTER parameter, so it was changed
  accordingly to work. Dropped "expr", ".0" and "int ()" parsing and now
  it works

Signed-off-by: Iulia Moldovan <Iulia.Moldovan@analog.com>
2024-02-20 17:43:30 +02:00
PIoandan 86cd484865
lib/axi_pwm_gen: Update pause_cnt logic (#1271)
Signed-off-by: Ioan-daniel Pop <Pop.Ioan-daniel@analog.com>
2024-02-07 11:16:40 +02:00
LBFFilho f01d7e5951
SPI Engine: fix early sdi data clear (#1231)
* SPI Engine: fix early sdi data clear

In case an SPI read was immediately followed by a cs assert, the sdi
register was being cleared one cycle too soon, so that the data being
passed on was always 'b0.

Signed-off-by: Laez Barbosa <laez.barbosa@analog.com>
2024-02-05 17:18:27 -03:00
IstvanZsSzekely 57356cc4ee
util_axis_fifo: Update (#1255)
* util_axis_fifo: Update

- Added missing signal drivers for tlast and tkeep

Signed-off-by: Istvan-Zsolt Szekely <istvan.szekely@analog.com>
2024-01-26 13:31:21 +02:00
Laez Barbosa d300b9c55c SPI Engine: Formatting on spi_engine_offload
Signed-off-by: Laez Barbosa <laez.barbosa@analog.com>
2024-01-17 09:11:24 -03:00
Laez Barbosa d45be68ac4 SPI Engine: edge-based trigger
Previous level-based trigger could cause issues in some low
sampling rate setups. This commit changes it to edge-based.

Signed-off-by: Laez Barbosa <laez.barbosa@analog.com>
2024-01-17 09:11:24 -03:00
Iulia Moldovan b45e7a7313 Replace other master branch references to main
* README.md
* adi_regmap_xcvr.txt
* build_hdl.rst
* hdl_coding_guideline.rst
* data_offload/README.md

Signed-off-by: Iulia Moldovan <Iulia.Moldovan@analog.com>
2024-01-16 16:48:45 +02:00
Iulia Moldovan 68461110aa Replace link in license header from master to main
Signed-off-by: Iulia Moldovan <Iulia.Moldovan@analog.com>
2024-01-16 16:48:45 +02:00
Jorge Marques 107b043550
library: jesd204: Fixup Vivado exiting with error (#1243)
The lack of the create_xgui_files causes Vivado to exit with an error
when running multiple Vivado instances (parallel make case)

Signed-off-by: Jorge Marques <jorge.marques@analog.com>
2024-01-16 12:43:03 +00:00
caosjr bad1d03678
spi_engine: Fixup param ranges and CPHA info (#1239)
Set validation ranges for DATA_WIDTH and NUM_OF_CS for the expected
min/max values in the verilog source code.
Also, fix swapped description for CPHA in the documentation.

Signed-off-by: Carlos Oliveira <caosjr8@gmail.com>
2023-12-18 10:52:26 -03:00
AndreiGrozav 870b27d3d3 axi_pwm_gen: Update ttcl constraints
Signed-off-by: AndreiGrozav <andrei.grozav@analog.com>
2023-12-15 15:03:07 +02:00
AndreiGrozav e0fc09fc9e axi_pwm_gen: Start, Stop fix
Previously when issuing a load_config, each pwm channel
was stopped in its tracks and waited for an external sync,
if that was active, or load_config release.
The desired behaviour is to wait for the pwm channels to finish
their events from the current period, before a new aligned start.
Also, the first positive edge of each pulse was initiated only
in the second pwm channel period.
This niche behaviours have not affected any functionality in the
long term alignments for current setups.

Signed-off-by: AndreiGrozav <andrei.grozav@analog.com>
2023-12-15 15:03:07 +02:00
AndreiGrozav e7dd5ce394 axi_pwm_gen: Offset mecanism fix
When leaving the offset equal to zero for a pwm
channel. That pwm channel was not waiting for all
channels to get in sync after a load config.

Signed-off-by: AndreiGrozav <andrei.grozav@analog.com>
2023-12-15 15:03:07 +02:00
Alin-Tudor Sferle 119d4e43a3 axi_pwm_gen: Add support for 16 channels
Signed-off-by: Alin-Tudor Sferle <Alin-Tudor.Sferle@analog.com>
Signed-off-by: AndreiGrozav <andrei.grozav@analog.com>
2023-12-15 15:03:07 +02:00
Liam Beguin 887ffac0ed
scripts: Parallel build with pattern rules (#1202)
Drop shell for loops in favor of makefile pattern rules,
so make can run targets in parallel using -j.
This doesn't affect Vivado's own settings.

As a benchmark, 12th Gen Intel(R) Core(TM) i9-12900H 5GHz(max):
	$ make -C projects/adrv9009/zcu102/ clean-all
	$ time make -C projects/adrv9009/zcu102/ -j$CORES lib
CORES=1:
	real    9m27.223s
	user    9m2.556s
	sys     0m32.358s
CORES=8:
	real    1m54.639s
	user    16m26.512s
	sys     1m2.317s
i.e. about 5 times faster to build IP core dependencies.

Signed-off-by: Liam Beguin <liambeguin@gmail.com>
Signed-off-by: Jorge Marques <jorge.marques@analog.com>
2023-12-14 17:27:23 +00:00
AndreiGrozav 39b2a2b8bb axi_dac_interpolate: Improve the ctrl logic
1. Simplify the control logic by adding a state machine.
The improvements are on code readability and reliability.

2.Add a flush feature which can be used to clean the data from the DMA fifo.
This is useful when the DMA is programmed in cyclic mode and
data transmission is stopped by dma_transfer_suspend flag
The software intervention is reduced at setting the flag(dma_flush_en).
Flushing can also be done when activating the raw value with dma_flush_en active.

3. Add raw value support. Through this changes a user can set
the dac output to a fixed predefined value in the following two cases:
  1. direct, without using the dma.
  2. with dma, as a hold value. The fixed value will be kipped after a cyclic
buffer is stopped by axi_dac_interpolate, through dma_transfer_suspend
register/signal.
The raw value ca be set and transmitted independently on each channel.
The predefined value is stored in reg 0x19(0x64). For more details se
the documentation available at
https://wiki.analog.com/resources/fpga/docs/axi_dac_interpolate
2023-12-12 16:51:05 +02:00
AndreiGrozav 6998cc99b4 m2k: Remove dac last_sample_hold control
axi_dac_interpolate - Remove last sample hold control
axi_ad9963 - Remove last sample hold control and set as default the
last sample hold functionality plus code optimization changes.
2023-12-12 16:51:05 +02:00
Ionut Podgoreanu 2687bbc02e util_hbm: Add the SG interface in DMA instances
Signed-off-by: Ionut Podgoreanu <ionut.podgoreanu@analog.com>
2023-12-04 14:34:33 +02:00
Ionut Podgoreanu f41391fa93 axi_dmac: Add support for DMA Scatter-Gather
This commit introduces a different interface to submit transfers, using
DMA descriptors.

The structure of the DMA descriptor is as follows:

struct dma_desc {
    u32 flags,
    u32 id,
    u64 dest_addr,
    u64 src_addr,
    u64 next_sg_addr,
    u32 y_len,
    u32 x_len,
    u32 src_stride,
    u32 dst_stride,
};

The 'flags' field currently offers two control bits:
- bit 0: if set, the transfer will complete after this last descriptor
  is processed, and the DMA core will go back to idle state; if cleared,
  the next DMA descriptor pointed to by 'next_sg_addr' will be loaded.
- bit 1: if set, an end-of-transfer interrupt will be raised after the
  memory segment pointed to by this descriptor has been transferred.

The 'id' field corresponds to an identifier of the descriptor.

The 'dest_addr' and 'src_addr' contain the destination and source
addresses to use for the transfer, respectively.

The 'x_len' field contains the number of bytes to transfer,
minus one.

The 'y_len', 'src_stride' and 'dst_stride' fields are only useful for
2D transfers, and should be set to zero if 2D transfers are not
required.

To start a transfer, the address of the first DMA descriptor must be
written to register 0x47c and the HWDESC bit of CONTROL register must
be set. The Scatter-Gather transfer is queued similarly to the simple
transfers, by writing 1 in TRANSFER_SUBMIT.

The Scatter-Gather interface has a dedicated AXI-MM bus configured for
read transfers, with its own dedicated clock, which can be asynchronous.

The Scatter-Gather reset is generated by the reset manager to reset the
logic after completing any pending transactions on the bus.

When the Scatter-Gather is enabled during runtime, the legacy cyclic
functionality of the DMA is disabled.

Signed-off-by: Ionut Podgoreanu <ionut.podgoreanu@analog.com>
2023-12-04 14:34:33 +02:00
Stanca Pop 9ba84cf7c0 axi_ad7616: Remove serial dependencies 2023-11-09 14:43:20 +02:00
Alin-Tudor Sferle 03c4276a2b axi_ad7606x: Add the correct IP's name
Signed-off-by: Alin-Tudor Sferle <Alin-Tudor.Sferle@analog.com>
2023-11-07 15:00:06 +02:00
LBFFilho becc035ba9
SPI Engine: Fixed delay behaviour on Chip-Select and Sleep instructions (#1200)
Fixed wrong behaviour on chip select instruction:
- previously, a sleep time happened before the chip select change
- the intended behaviour was for another sleep time, of equal amount, to happen after the chip select change as well
- additionally, the counter logic implementation was creating an additional factor of 2 on the sleep time

All of the above points were fixed. The changes introduced also fix another issue where the sleep instruction was likewise happening with a duration larger than intended by a factor of 2


Signed-off-by: Laez Barbosa <laez.barbosa@analog.com>
2023-10-30 09:52:04 -03:00
AndreiGrozav f8ee407f34 axi_ad4858: Initial commit
The axi_ad4858 IP core is design as the HDL interface for the AD4858 ADC.
Features:
 - AXI based configuration
 - LVDS and CMOS support
 - Configurable number of active data lines (CMOS - build-time configurable)
 - Oversampling support
 - Supports packet formats 0,1,2 or 3
 - CRC check support
 - Real-time data header access
 - Channel based raw data access(0x0408)
 - Xilinx devices compatible

Documentation at https://wiki.analog.com/resources/fpga/docs/axi_ad4858
2023-10-05 10:19:03 +03:00
AndreiGrozav 6128dd1ab5 up_dac_channel: Cosmetics - fix indentation 2023-10-02 11:14:57 +03:00
PopPaul2021 cd33c99b94 library/axi_ad3552r: Added interface IP for Xilinx projects.
The custom interface IP for AD3552R DAC has more operation capabilities:
  - 8b register read/write SDR/DDR
  - 16b register read/write SDR/DDR
  - data stream SDR/DDR ( clk_in/8 or clk_in/4 update rate)
  - selectable input source : DMA/ADC/TEST_RAMP
  - data out clock(SCLK) has clk_in/8 frequency when the converter is configured and clk_in/2 when the converter is in stream mode
  - the IP reference clock (clk_in) can have a maximum frequency of 132MHz
  - the IP has multiple device synchronization capability when the DMA is set as an input data source

Signed-off-by: PopPaul2021 <Paul.Pop@analog.com>
2023-10-02 11:07:08 +03:00
PopPaul2021 86836f5a40 library/common: Added DAC custom read/write interface in up_dac_common.
The DAC common regmap was updated with 3 registers(rd/wr/ctrl) and 1 interface status flag for converters with custom control interface.
2023-10-02 11:07:08 +03:00
Jem Geronimo 4abb8b3b97 dc2677a: add initial design
Signed-off-by: Jem Geronimo <Johnerasmusmari.Geronimo@analog.com>
2023-10-02 15:10:04 +08:00
Jem Geronimo 32e29ad753 axi_ltc235x: Add initial design
Signed-off-by: Jem Geronimo <Johnerasmusmari.Geronimo@analog.com>
2023-10-02 15:10:04 +08:00
Iulia Moldovan c3aa014105 data_offload: Fix error regarding invalid value for param MEM_TYPE
Signed-off-by: Iulia Moldovan <Iulia.Moldovan@analog.com>
2023-09-29 14:57:03 +03:00
AndreiGrozav 385e135561 axi_adrv9001: Change the DDS sync structure
The DDS for each channel was synchronized by the main channel.
One problem with this aporoach is that when a user sets a DDS that
is not from the main channel the sinchronization does not happend.
This behavior is not user friendly in IIO-Oscilloscope or within other
configuration methods.

This commit keeps all channels in sync by triggering the sync on all
channels from each individual channel.
2023-09-29 10:11:49 +03:00
AndreiGrozav 9f824554aa up_dac_channel: Cosmetic additions 2023-09-26 18:39:28 +03:00
AndreiGrozav a4add963d4 ad9361: Add support for config DDS phase resolution 2023-09-26 18:39:28 +03:00
AndreiGrozav 92be583369 ad_ip_jesd204_tpl_dac: Increase DDS phase DW support
Allow upto 32 bit phase data width support.
2023-09-26 18:39:28 +03:00
AndreiGrozav 782b27e894 DAC DDS: Add support for DDS phase width > 16
Add support for DDS phase width greather than 16.
The software should read the DDS phase data width register and configure
the DDS init and increment registers accordingly, otherwise the obtained
DDS output frequency will not be the desired one for DDS phase width
different than 16.

DDS_incr = (f_out * 2^(phase_width) * clkratio)/f_if
2023-09-26 18:39:28 +03:00
Iulia Moldovan ff7b8ef6ae Add LICENSE_ADIJESD204. Delete jesd204/README.md
Signed-off-by: Iulia Moldovan <Iulia.Moldovan@analog.com>
2023-09-07 10:45:49 +03:00
Iulia Moldovan 860010e050 library/common/tb/tb_base.v: Update license header
* Removed the commercial JESD license and put the ADIBSD or GPL v2 like
   for other Verilog files

Signed-off-by: Iulia Moldovan <Iulia.Moldovan@analog.com>
2023-09-07 10:45:49 +03:00
Iulia Moldovan 0590a4046c Add copyright & license for all files needing ADI JESD specific license
* Added every year when the file was edited, with comma
 * Range if it's consecutive years

Signed-off-by: Iulia Moldovan <Iulia.Moldovan@analog.com>
2023-09-07 10:45:49 +03:00
AndreiGrozav aa11f4311c xilinx/ad_data_in.v: Add SDR support 2023-09-07 10:43:29 +03:00
alin724 c8a131ec0a ad7606x: Add dynamic configuration for AD7606X operation modes
AD7606x operation mode configuration:
REG_CNTRL_3
bit 8 - 'b1 - set operation mode indicated in bits [7:0];
bit [7:0] - set desired operation mode: 0 - SIMPLE, 1 - CRC, 2 - STATUS_HEADER, 3 - CRC_STATUS
2023-09-06 17:09:22 +03:00