Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add information about Vivado for part 7 #90

Merged
merged 4 commits into from
Dec 12, 2024
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ conda activate hls4ml-tutorial
source /path/to/your/installtion/Xilinx/Vitis_HLS/202X.X/settings64.(c)sh
```

Note that part 7 of the tutorial makes use of the `VivadoAccelator` backend of hls4ml for which no Vitis equivalent is available yet. For this part of the tutorial it is therefore necesary to install and source Vivado HLS version 2019.2 or 2020.1, which can be obtained [here](https://www.xilinx.com/support/download/index.html/content/xilinx/en/downloadNav/vivado-design-tools/archive.html).

## Companion material
We have prepared a set of slides with some introduction and more details on each of the exercises.
Please find them [here](https://docs.google.com/presentation/d/1c4LvEc6yMByx2HJs8zUP5oxLtY6ACSizQdKvw5cg5Ck/edit?usp=sharing).
Expand Down
6 changes: 3 additions & 3 deletions part7a_bitstream.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"source": [
"# Part 7a: Bitstream Generation\n",
"\n",
"In the previous sections we've seen how to train a Neural Network with a small resource footprint using QKeras, then to convert it to `hls4ml` and create an IP. That IP can be interfaced into a larger design to deploy on an FPGA device. In this section, we introduce the `VivadoAccelerator` backend of `hls4ml`, where we can easily target some supported devices to get up and running quickly. Specifically, we'll deploy the model on a [pynq-z2 board](http://www.pynq.io/)."
"In the previous sections we've seen how to train a Neural Network with a small resource footprint using QKeras, then to convert it to `hls4ml` and create an IP. That IP can be interfaced into a larger design to deploy on an FPGA device. In this section, we introduce the `VivadoAccelerator` backend of `hls4ml`, where we can easily target some supported devices to get up and running quickly. Specifically, we'll deploy the model on a [pynq-z2 board](http://www.pynq.io/). NOTE: This tutorial reuires on Vivado HLS instead of Vitis."
jmitrevs marked this conversation as resolved.
Show resolved Hide resolved
]
},
{
Expand All @@ -26,7 +26,7 @@
"_add_supported_quantized_objects(co)\n",
"import os\n",
"\n",
"os.environ['PATH'] = os.environ['XILINX_Vivado'] + '/bin:' + os.environ['PATH']"
"os.environ['PATH'] = os.environ['XILINX_VIVADO'] + '/bin:' + os.environ['PATH']"
]
},
{
Expand Down Expand Up @@ -74,7 +74,7 @@
"import hls4ml\n",
"import plotting\n",
"\n",
"config = hls4ml.utils.config_from_keras_model(model, granularity='name', backend='Vitis')\n",
"config = hls4ml.utils.config_from_keras_model(model, granularity='name')\n",
"config['LayerName']['softmax']['exp_table_t'] = 'ap_fixed<18,8>'\n",
"config['LayerName']['softmax']['inv_table_t'] = 'ap_fixed<18,4>'\n",
"for layer in ['fc1', 'fc2', 'fc3', 'output']:\n",
Expand Down
Loading