Skip to content

Commit 3af4f41

Browse files
deploy: c6a9b3c #241 (synchronize)
1 parent d8c8c00 commit 3af4f41

File tree

82 files changed

+5833
-153
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

82 files changed

+5833
-153
lines changed

pull/241/_images/adrv9001_tb.svg

Lines changed: 4336 additions & 0 deletions
Loading
Lines changed: 357 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,357 @@
1+
.. _adrv9001:
2+
3+
ADRV9001
4+
================================================================================
5+
6+
Overview
7+
-------------------------------------------------------------------------------
8+
9+
The purpose of this testbench is to validate the serial interface functionality
10+
of the :git-hdl:`projects/adrv9001` reference design.
11+
12+
The entire HDL documentation can be found here
13+
:external+hdl:ref:`ADRV9001 HDL project <adrv9001>`.
14+
15+
Block design
16+
-------------------------------------------------------------------------------
17+
18+
The testbench block design includes part of the ADRV9001 HDL reference design,
19+
along with VIPs used for clocking, reset, PS and DDR simulations.
20+
21+
Block diagram
22+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
23+
24+
The data path and clock domains are depicted in the below diagram:
25+
26+
.. image:: ./adrv9001_tb.svg
27+
:width: 800
28+
:align: center
29+
:alt: adrv9001/Testbench block diagram
30+
31+
Configuration parameters and modes
32+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
33+
34+
The following parameters of this project can be configured:
35+
36+
- CMOS_LVDS_N: Defines the physical interface type:
37+
Options: 0 - LVDS, 1 - CMOS
38+
- SDR_DDR_N: Select interface type:
39+
Options: 0 - DDR, 1 - SDR
40+
- SINGLE_LANE: Defines the single lane mode:
41+
Options: 0 - Multiple Lanes (2/4), 1 - Single Lane
42+
- USE_RX_CLK_FOR_T: Select the clock to drive the TX SSI interface:
43+
Options: 0 - TX1 dedicated clock, 1 - RX SSI clock
44+
- SYMB_OP: Select symbol data format mode:
45+
Options: 0 - Disable, 1 - Enable
46+
- SYMB_8_16B: Select number of bits for symbol format mode:
47+
Options: 0 - 16 bits, 1 - 8 bits
48+
- DDS_DISABLE: By setting this parameter you can remove the dual tone DDS logic
49+
from the TX channels. This will reduce resource utilization significantly,
50+
but will lose the ability to generate a test tone:
51+
Options: 0 - Enable DDS, 1 - Disable DDS
52+
53+
Configuration files
54+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
55+
56+
The following configuration files are available:
57+
58+
+--------------------------------+-----------------------------------------------------------------------------------------------+
59+
| Configuration mode | Parameters |
60+
| +-------------+-----------+-------------+------------------+---------+------------+-------------+
61+
| | CMOS_LVDS_N | SDR_DDR_N | SINGLE_LANE | USE_RX_CLK_FOR_T | SYMB_OP | SYMB_8_16B | DDS_DISABLE |
62+
+================================+=============+===========+=============+==================+=========+============+=============+
63+
| cfg1_CMOS_SDR_1Lanes | 1 | 1 | 1 | 0 | 0 | 0 | 0 |
64+
+--------------------------------+-------------+-----------+-------------+------------------+---------+------------+-------------+
65+
| cfg2_CMOS_DDR_1Lanes | 1 | 0 | 1 | 0 | 0 | 0 | 0 |
66+
+--------------------------------+-------------+-----------+-------------+------------------+---------+------------+-------------+
67+
| cfg4_CMOS_SDR_4Lanes | 1 | 1 | 0 | 0 | 0 | 0 | 0 |
68+
+--------------------------------+-------------+-----------+-------------+------------------+---------+------------+-------------+
69+
| cfg5_CMOS_DDR_4Lanes | 1 | 0 | 0 | 0 | 0 | 0 | 0 |
70+
+--------------------------------+-------------+-----------+-------------+------------------+---------+------------+-------------+
71+
| cfg6_LVDS_DDR_1Lanes | 0 | 0 | 1 | 0 | 0 | 0 | 0 |
72+
+--------------------------------+-------------+-----------+-------------+------------------+---------+------------+-------------+
73+
| cfg7_LVDS_DDR_2Lanes | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
74+
+--------------------------------+-------------+-----------+-------------+------------------+---------+------------+-------------+
75+
| cfg7_LVDS_DDR_2Lanes_noDDS | 0 | 0 | 0 | 0 | 0 | 0 | 1 |
76+
+--------------------------------+-------------+-----------+-------------+------------------+---------+------------+-------------+
77+
| cfg8_CMOS_SDR_1Lanes_SYMB_8b | 1 | 1 | 1 | 0 | 1 | 1 | 0 |
78+
+--------------------------------+-------------+-----------+-------------+------------------+---------+------------+-------------+
79+
| cfg9_CMOS_DDR_1Lanes_SYMB_8b | 1 | 0 | 1 | 0 | 1 | 1 | 0 |
80+
+--------------------------------+-------------+-----------+-------------+------------------+---------+------------+-------------+
81+
| cfg10_CMOS_SDR_1LANES_SYMB_16b | 1 | 1 | 1 | 0 | 1 | 0 | 0 |
82+
+--------------------------------+-------------+-----------+-------------+------------------+---------+------------+-------------+
83+
| cfg11_CMOS_DDR_1Lanes_SYMB_16b | 1 | 0 | 1 | 0 | 1 | 0 | 0 |
84+
+--------------------------------+-------------+-----------+-------------+------------------+---------+------------+-------------+
85+
86+
Tests
87+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
88+
89+
The following test program file is available:
90+
91+
============ ========================================
92+
Test program Usage
93+
============ ========================================
94+
test_program Tests the adrv9001 project capabilities.
95+
============ ========================================
96+
97+
Available configurations & tests combinations
98+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
99+
100+
The test program is compatible with the above mentioned configurations.
101+
102+
CPU/Memory interconnect addresses
103+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
104+
105+
Below are the CPU/Memory interconnect addresses used in this project:
106+
107+
========================= ===========
108+
Instance Address
109+
========================= ===========
110+
axi_intc 0x4120_0000
111+
axi_adrv9001 0x44A0_0000
112+
axi_adrv9001_rx1_dma 0x44A3_0000
113+
axi_adrv9001_rx2_dma 0x44A4_0000
114+
axi_adrv9001_tx1_dma 0x44A5_0000
115+
axi_adrv9001_tx2_dma 0x44A6_0000
116+
ddr_axi_vip 0x8000_0000
117+
========================= ===========
118+
119+
Interrupts
120+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
121+
122+
Below are the Programmable Logic interrupts used in this project:
123+
124+
==================== ===
125+
Instance name HDL
126+
==================== ===
127+
axi_adrv9001_rx1_dma 12
128+
axi_adrv9001_rx2_dma 11
129+
axi_adrv9001_tx1_dma 6
130+
axi_adrv9001_tx2_dma 5
131+
==================== ===
132+
133+
Test stimulus
134+
-------------------------------------------------------------------------------
135+
136+
The test program is structured into several tests as follows:
137+
138+
Environment bringup
139+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
140+
141+
The steps of the environment bringup are:
142+
143+
* Create the environment
144+
* Start the environment
145+
* Start the clocks
146+
* Assert the resets
147+
148+
Sanity test
149+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
150+
151+
This test is used to check the RX and TX DMAs sanity.
152+
153+
R2T2 test
154+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
155+
156+
This test is used for the R2T2 configuration and comprises the following steps:
157+
158+
PN test
159+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
160+
161+
The PN test verifies the PN data.
162+
163+
.. note::
164+
165+
PN Test Skipped in 8 bits symbol mode.
166+
167+
The steps of this test are for:
168+
* NIBBLE_RAMP
169+
* FULL_RAMP
170+
* PN7
171+
* PN15
172+
173+
DDS test
174+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
175+
176+
The DDS test verifies the DDS path, if DDS is enabled.
177+
178+
The steps of this test are:
179+
180+
* Link setup
181+
* Select DDS as source
182+
* Enable normal data path for RX1
183+
* Configure tone amplitude and frequency
184+
* Enable RX channels, enable sign extension
185+
* Sync DAC channels
186+
* Link down
187+
188+
DMA test
189+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
190+
191+
The DMA test verifies the DMA path, if DMA is enabled.
192+
193+
The steps of this test are:
194+
195+
* Init test data
196+
* Clear destination region
197+
* Configure TX DMA
198+
* Select DMA as source
199+
* Enable normal data path for RX1
200+
* Enable RX channel, enable sign extension
201+
* Sync DAC channels
202+
* Link setup
203+
* Configure RX DMA
204+
* Transfer start
205+
* Clear interrupt
206+
* Check captured data from DDR against incremental pattern based on first sample
207+
208+
Independent R1T1 test
209+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
210+
211+
This test is used for the R1T1 configuration and comprises the following steps:
212+
213+
* Enable normal data path for RX2
214+
215+
DMA test procedure for RX2/TX2 independent pairs
216+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
217+
218+
The steps of this test are:
219+
220+
* Init test data
221+
* Clear destination region
222+
* Configure TX DMA
223+
* Select DMA as source
224+
* Enable RX channel, enable sign extension
225+
* Sync DAC channels
226+
* Link setup
227+
* Configure RX DMA
228+
* Transfer start
229+
* Clear interrupt
230+
* Check captured data from DDR against incremental pattern based on first sample
231+
232+
Test internal loopback DAC2->ADC2
233+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
234+
235+
* Enable internal loopback
236+
* DMA test procedure for RX2/TX2 independent pairs
237+
238+
Stop the environment
239+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
240+
241+
* Stop the clocks
242+
243+
Building the testbench
244+
-------------------------------------------------------------------------------
245+
246+
The testbench is built upon ADI's generic HDL reference design framework.
247+
ADI does not distribute compiled files of these projects so they must be built
248+
from the sources available :git-hdl:`here </>` and :git-testbenches:`here </>`,
249+
with the specified hierarchy described :ref:`build_tb set_up_tb_repo`.
250+
To get the source you must
251+
`clone <https://git-scm.com/book/en/v2/Git-Basics-Getting-a-Git-Repository>`__
252+
the HDL repository, and then build the project as follows:.
253+
254+
**Linux/Cygwin/WSL**
255+
256+
*Example 1*
257+
258+
Build all the possible combinations of tests and configurations, using only the
259+
command line.
260+
261+
.. shell::
262+
:showuser:
263+
264+
$cd testbenches/project/adrv9001
265+
$make
266+
267+
*Example 2*
268+
269+
Build all the possible combinations of tests and configurations, using the
270+
Vivado GUI. This command will launch Vivado, will run the simulation and display
271+
the waveforms.
272+
273+
.. shell::
274+
:showuser:
275+
276+
$cd testbenches/project/adrv9001
277+
$make MODE=gui
278+
279+
*Example 3*
280+
281+
Build a particular combination of test and configuration, using the Vivado GUI.
282+
This command will launch Vivado, will run the simulation and display the
283+
waveforms.
284+
285+
.. shell::
286+
:showuser:
287+
288+
$cd testbenches/project/adrv9001
289+
$make MODE=gui CFG=cfg1_CMOS_SDR_1Lanes TST=test_program
290+
291+
The built projects can be found in the ``runs`` folder, where each configuration
292+
specific build has it's own folder named after the configuration file's name.
293+
Example: if the following command was run for a single configuration in the
294+
clean folder (no runs folder available):
295+
296+
``make CFG=cfg1_CMOS_SDR_1Lanes``
297+
298+
Then the subfolder under ``runs`` name will be:
299+
300+
``cfg1_CMOS_SDR_1Lanes``
301+
302+
Resources
303+
-------------------------------------------------------------------------------
304+
305+
HDL related dependencies forming the DUT
306+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
307+
308+
.. list-table::
309+
:widths: 30 45 25
310+
:header-rows: 1
311+
312+
* - IP name
313+
- Source code link
314+
- Documentation link
315+
* - AXI_ADRV9001
316+
- :git-hdl:`library/axi_adrv9001`
317+
- :external+hdl:ref:`axi_adrv9001`
318+
* - AXI_DMAC
319+
- :git-hdl:`library/axi_dmac`
320+
- :external+hdl:ref:`axi_dmac`
321+
* - UTIL_CPACK2
322+
- :git-hdl:`library/util_pack/util_cpack2`
323+
- :external+hdl:ref:`util_cpack2`
324+
* - UTIL_UPACK2
325+
- :git-hdl:`library/util_pack/util_upack2`
326+
- :external+hdl:ref:`util_upack2`
327+
328+
Testbenches related dependencies
329+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
330+
331+
.. include:: ../../common/dependency_common.rst
332+
333+
Testbench specific dependencies:
334+
335+
.. list-table::
336+
:widths: 30 45 25
337+
:header-rows: 1
338+
339+
* - SV dependency name
340+
- Source code link
341+
- Documentation link
342+
* - ADC_API
343+
- :git-testbenches:`library/drivers/adc_api_pkg.sv`
344+
- ---
345+
* - COMMON_API
346+
- :git-testbenches:`library/drivers/common_api_pkg.sv`
347+
- ---
348+
* - DAC_API
349+
- :git-testbenches:`library/drivers/dac_api_pkg.sv`
350+
- ---
351+
* - DMAC_API
352+
- :git-testbenches:`library/drivers/dmac/dmac_api.sv`
353+
- ---
354+
355+
.. include:: ../../../common/more_information.rst
356+
357+
.. include:: ../../../common/support.rst

pull/241/_static/app.min.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)