Skip to content

Commit f70d8bf

Browse files
committed
Allow Pynq Z2 board to use Pynq Z1 files
1 parent 7b2e93b commit f70d8bf

File tree

2 files changed

+12
-6
lines changed

2 files changed

+12
-6
lines changed

README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -125,14 +125,14 @@ dummy_out = accel.execute(dummy_in)
125125
## Example Neural Network Accelerators
126126
| Dataset | Topology | Quantization | Supported boards | Supported build flows
127127
|:----------------------------------------------------------------:|:-------------------------:|:------------------------------------------------------------:|:------------------:|:------------------:|
128-
| CIFAR-10 | CNV (VGG-11-like) | several variants:<br>1/2-bit weights/activations | Pynq-Z1<br>ZCU104<br>Ultra96<br>U250 | Pynq-Z1<br>ZCU104<br>Ultra96<br>U250 |
129-
| MNIST | 3-layer fully-connected | several variants:<br>1/2-bit weights/activations | Pynq-Z1<br>ZCU104<br>Ultra96<br>U250 | Pynq-Z1<br>ZCU104<br>Ultra96<br>U250 |
128+
| CIFAR-10 | CNV (VGG-11-like) | several variants:<br>1/2-bit weights/activations | Pynq-Z1<br>Pynq-Z2<br>ZCU104<br>Ultra96<br>U250 | Pynq-Z1<br>ZCU104<br>Ultra96<br>U250 |
129+
| MNIST | 3-layer fully-connected | several variants:<br>1/2-bit weights/activations | Pynq-Z1<br>Pynq-Z2<br>ZCU104<br>Ultra96<br>U250 | Pynq-Z1<br>ZCU104<br>Ultra96<br>U250 |
130130
| ImageNet | MobileNet-v1 | 4-bit weights & activations<br>8-bit first layer weights | Alveo U250 | Alveo U250 |
131131
| ImageNet | ResNet-50 | 1-bit weights 2-bit activations<br>4-bit residuals<br>8-bit first/last layer weights | Alveo U250 | - |
132132
| RadioML 2018 | 1D CNN (VGG10) | 4-bit weights & activations | ZCU104 | ZCU104 |
133-
| MaskedFace-Net | [BinaryCoP](https://arxiv.org/pdf/2102.03456)<br/>*Contributed by TU Munich+BMW* | 1-bit weights & activations | Pynq-Z1 | Pynq-Z1 |
134-
| Google Speech Commands v2 | 3-layer fully-connected | 3-bit weights & activations | Pynq-Z1 | Pynq-Z1 |
135-
| UNSW-NB15 | 4-layer fully-connected | 2-bit weights & activations | Pynq-Z1 <br> ZCU104 <br> Ultra96 | Pynq-Z1 <br> ZCU104 <br> Ultra96 |
133+
| MaskedFace-Net | [BinaryCoP](https://arxiv.org/pdf/2102.03456)<br/>*Contributed by TU Munich+BMW* | 1-bit weights & activations | Pynq-Z1<br>Pynq-Z2 | Pynq-Z1 |
134+
| Google Speech Commands v2 | 3-layer fully-connected | 3-bit weights & activations | Pynq-Z1<br>Pynq-Z2 | Pynq-Z1 |
135+
| UNSW-NB15 | 4-layer fully-connected | 2-bit weights & activations | Pynq-Z1<br>Pynq-Z2<br>ZCU104<br>Ultra96 | Pynq-Z1<br>ZCU104<br>Ultra96 |
136136

137137
*Please note that the build flow for ResNet-50 for the Alveo U250 has known issues and we're currently working on resolving them. However, you can still execute the associated notebook, as we provide a pre-built FPGA bitfile generated with an older Vivado (/FINN) version targeting the [xilinx_u250_xdma_201830_2](https://www.xilinx.com/products/boards-and-kits/alveo/package-files-archive/u250-2018-3-1.html) platform.* <br>
138138
*Furthermore, please note that you can target other boards (such as the Pynq-Z2 or ZCU102) by changing the build script manually, but these accelerators have not been tested.*
@@ -145,7 +145,7 @@ We welcome community contributions to add more examples to this repo!
145145

146146
`finn-examples` provides pre-built FPGA bitfiles for the following boards:
147147

148-
* **Edge:** Pynq-Z1, Ultra96 and ZCU104
148+
* **Edge:** Pynq-Z1, Pynq-Z2, Ultra96 and ZCU104
149149
* **Datacenter:** Alveo U250
150150

151151
It's possible to generate Vivado IP for the provided examples to target *any*

finn_examples/models.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828

2929
import pkg_resources as pk
3030

31+
import logging
3132
import os
3233
import platform
3334
import pynq
@@ -180,6 +181,11 @@ def get_edge_or_pcie():
180181

181182

182183
def find_bitfile(model_name, target_platform):
184+
if target_platform == "Pynq-Z2":
185+
# Pynq Z2 board can use Pynq Z1 bitfiles
186+
logging.info(f"Requested platform Pynq-Z2 not built, using Pynq-Z1")
187+
target_platform = "Pynq-Z1"
188+
183189
bitfile_exts = {"edge": "bit", "pcie": "xclbin"}
184190
bitfile_ext = bitfile_exts[get_edge_or_pcie()]
185191
bitfile_name = "%s.%s" % (model_name, bitfile_ext)

0 commit comments

Comments
 (0)