Skip to content

Commit 3f60acd

Browse files
authored
Merge pull request #204 from analogdevicesinc/tfcollins/doc
2 parents f2915f2 + c5f915f commit 3f60acd

4 files changed

Lines changed: 73 additions & 5 deletions

File tree

CI/doc/gen_pages/_templates/sysobj.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939

4040

4141
{% for prop in obj.props %}
42-
:::{dropdown} {{ prop.prop_name }}
42+
:::{collapsible} {{ prop.prop_name }}
4343
{{ prop.prop_description }}
4444
:::
4545
{% endfor -%}

CI/doc/requirements_doc.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,3 @@ sphinx-simplepdf
66
pillow
77
numpy
88
jinja2
9-
sphinx_design

CI/doc/source/conf.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,12 +65,14 @@
6565
"sphinxcontrib.mermaid",
6666
# "sphinx_copybutton",
6767
# "sphinx_togglebutton", # Using this?
68-
"sphinx_design",
6968
"adi_doctools",
7069
]
7170

7271
needs_extensions = {"adi_doctools": "0.4.21"}
7372

73+
# Collapsible property blocks (adi_doctools "collapsible" directive) are
74+
# collapsed by default.
75+
hide_collapsible_content = True
7476
myst_enable_extensions = [
7577
"colon_fence",
7678
]

CI/doc/source/targeting.md

Lines changed: 69 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,79 @@
11

22
# HDL Targeting with HDL-Coder
33

4-
Transceiver Toolbox supports the IP Core generation flow from MathWorks which allows for automated integration of DSP into HDL reference designs from Analog Devices. This workflow will take Simulink subsystems, run HDL-Coder to generate source Verilog, and then integrate that into a larger reference design. The figure below is a simplified block diagram of a SoC (Fabric+ARM) device, where specialized IP are inserted into the receive and transmit datapaths. This is supported on specific FPGA families and transceiver based reference designs. This support is based on the Zynq HDL-Coder and support
4+
Transceiver Toolbox supports the IP Core generation flow from MathWorks which allows for automated integration of DSP into HDL reference designs from Analog Devices. This workflow will take Simulink subsystems, run HDL-Coder to generate source Verilog, and then integrate that into a larger reference design. The figure below is a simplified block diagram of a SoC (Fabric+ARM) device, where specialized IP are inserted into the receive and transmit datapaths. This is supported on specific FPGA families and transceiver based reference designs, and is built on the Zynq HDL-Coder workflow and the HDL Coder Support Package for Xilinx Zynq Platform.
55

6-
<img src="/_static/assets/MATLAB_HDL_Ref_Design.png">
6+
```{figure} /_static/assets/MATLAB_HDL_Ref_Design.png
7+
8+
Simplified block diagram of a SoC (FPGA fabric + ARM) device. Simulink-generated IP is inserted into the receive and transmit datapaths of an ADI reference design.
9+
```
710

811
## Recommended Review
912

1013
- [Getting started with Zynq](https://www.mathworks.com/support/search.html/videos/getting-started-with-zynq-80338.html?fq%5B%5D=asset_type_name:video&fq%5B%5D=category:hdlcoder/index&page=1)
1114

15+
## Prerequisites
16+
17+
Targeting requires the HDL generation dependencies described in [Installation](install.md):
18+
19+
- Xilinx Vivado and Vitis, version matched to your toolbox release (for example, Vivado/Vitis 2022.2 for the R2023b-based release)
20+
- Simulink, [HDL Coder™](https://www.mathworks.com/products/hdl-coder.html), and the [HDL Coder™ Support Package for Xilinx Zynq Platform](https://www.mathworks.com/matlabcentral/fileexchange/40447-hdl-coder-support-package-for-xilinx-zynq-platform)
21+
22+
Targeting is only available for specific transceiver and FPGA carrier combinations. See the support table on the [home page](index.md) — the **Targeting** column lists the boards and minimum releases that support this flow.
23+
1224
## Getting Started
25+
26+
The targeting flow takes a Simulink subsystem (your DSP "DUT"), runs HDL Coder to generate Verilog, and integrates it into an ADI HDL reference design to produce a bitstream you can run on hardware. The steps below outline the user-facing workflow. For a detailed look at what happens internally — the generated TCL scripts, net trimming, and IP insertion — see [HDL Workflow](dev_hdl_workflow.md).
27+
28+
### 1. Point MATLAB at your Xilinx tools
29+
30+
Register Vivado with HDL Coder so it can drive the build. Adjust the path for your installation:
31+
32+
```matlab
33+
hdlsetuptoolpath('ToolName','Xilinx Vivado', ...
34+
'ToolPath','/opt/Xilinx/Vivado/2022.2/bin/vivado');
35+
```
36+
37+
### 2. Open a model
38+
39+
Start from one of the worked examples under `trx_examples/targeting/`:
40+
41+
- `frequency-hopping` — frequency hopping on the ADRV9361-Z7035
42+
- `loopback-delay-estimation` — loopback delay estimation
43+
- `tuneAGC-ad9361` — AGC tuning for the AD9361
44+
45+
or create your own model. The portion of the algorithm to be implemented in fabric must live in a single subsystem (the **HDL DUT**), with its inputs and outputs mapped to the transceiver datapath (for example, the AD9361 ADC/DAC data and valid interfaces).
46+
47+
### 3. Select a reference design
48+
49+
Open the HDL Workflow Advisor on your DUT subsystem (right-click the subsystem → **HDL Code → HDL Workflow Advisor**, or run `hdladvisor`). Set:
50+
51+
- **Target workflow:** IP Core Generation
52+
- **Synthesis tool:** Xilinx Vivado
53+
- **Reference design:** the ADI design matching your board and datapath — Rx, Tx, or Rx & Tx (for example, *AnalogDevices ADRV9361-Z7035*)
54+
55+
Each supported board registers its reference designs through the HDL Coder board and reference-design plugins shipped with the toolbox under `hdl/vendor/AnalogDevices/+AnalogDevices/`.
56+
57+
### 4. Generate IP, build, and (optionally) program
58+
59+
Step through the Workflow Advisor tasks. HDL Coder will:
60+
61+
1. generate Verilog from your DUT subsystem,
62+
2. build the reference-design Vivado project and trim the nets where your IP will be inserted,
63+
3. insert and connect your generated IP, and
64+
4. run synthesis and generate the bitstream.
65+
66+
To re-run the workflow without re-entering settings, use a workflow script. The examples ship a generated `hdlworkflow.m` for exactly this — it configures an `hdlcoder.WorkflowConfig` and calls `hdlcoder.runWorkflow`:
67+
68+
```matlab
69+
hWC = hdlcoder.WorkflowConfig('SynthesisTool','Xilinx Vivado', ...
70+
'TargetWorkflow','IP Core Generation');
71+
hWC.ProjectFolder = 'hdl_prj';
72+
hWC.RunTaskGenerateRTLCodeAndIPCore = true;
73+
hWC.RunTaskCreateProject = true;
74+
hWC.RunTaskBuildFPGABitstream = true;
75+
hWC.RunTaskProgramTargetDevice = false; % set true to program the board
76+
hdlcoder.runWorkflow('frequency_hopping/HDL_DUT', hWC, 'Verbosity', 'on');
77+
```
78+
79+
Once built, the bitstream and supporting files can be loaded onto the target (see [Connecting To Hardware](install.md)).

0 commit comments

Comments
 (0)