Skip to content

Commit ac2fa5a

Browse files
authored
Merge pull request Xilinx#1212 from Xilinx/hotfix/tutorial
Update folding configuration for FPGA flow tutorial
2 parents 8da09eb + b48147e commit ac2fa5a

File tree

2 files changed

+35
-24
lines changed

2 files changed

+35
-24
lines changed

tutorials/fpga_flow/README.md

Lines changed: 28 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -25,20 +25,29 @@ This demo was created using Vivado 2022.1.
2525
Prior to running, insure the following prerequisites have been met:
2626
- Install FINN and prerequisites. The [Getting Started](https://finn.readthedocs.io/en/latest/getting_started.html#quickstart) section of the FINN documentation might be helpful for this.
2727
- Ensure you have the `FINN_XILINX_PATH` and `FINN_XILINX_VERSION` env variables set appropriately for your install. For example:
28-
> export FINN_XILINX_PATH=/opt/Xilinx
29-
> export FINN_XILINX_VERSION=2022.1
28+
```shell
29+
export FINN_XILINX_PATH=/opt/Xilinx
30+
export FINN_XILINX_VERSION=2022.1
31+
```
32+
3033
- Set the env variable for your `finn` install top directory (where you cloned the FINN compiler repo):
31-
> export FINN_ROOT=/home/foo/finn
34+
```shell
35+
export FINN_ROOT=/home/foo/finn
36+
```
3237

3338
Then, change to `finn` install directory and invoke the build as follows:
34-
> cd ${FINN_ROOT}
35-
> ./run-docker.sh build_custom ${FINN_ROOT}/tutorials/fpga_flow/
39+
```shell
40+
cd ${FINN_ROOT}
41+
./run-docker.sh build_custom ${FINN_ROOT}/tutorials/fpga_flow/
42+
```
3643

3744
Alternatively, since the tutorials folder is already part of the FINN compiler installation, you can invoke it from within the Docker container:
38-
> cd ${FINN_ROOT}
39-
> ./run-docker.sh
40-
> cd tutorials/fpga_flow
41-
> python build.py
45+
```shell
46+
cd ${FINN_ROOT}
47+
./run-docker.sh
48+
cd tutorials/fpga_flow
49+
python build.py
50+
```
4251

4352
The build should finish in about 10 minutes, and the FINN docker will close on success.
4453

@@ -59,12 +68,14 @@ The build should finish in about 10 minutes, and the FINN docker will close on s
5968
### Examine the Stitched IP
6069

6170
Navigate to the stitched IP project directory:
62-
63-
> cd ${FINN_ROOT}/tutorials/fpga_flow/output_tfc_w0a1_fpga/stitched_ip
71+
```shell
72+
cd ${FINN_ROOT}/tutorials/fpga_flow/output_tfc_w0a1_fpga/stitched_ip
73+
```
6474

6575
And, open the project:
66-
67-
> vivado finn_vivado_stitch_proj.xpr
76+
```shell
77+
vivado finn_vivado_stitch_proj.xpr
78+
```
6879

6980
Explore the IPI board design and note the interfaces.
7081

@@ -89,9 +100,10 @@ them under `${FINN_ROOT}/tutorials/fpga_flow/output_tfc_w0a1_fpga/sim`. Let's ex
89100
the FINN compiler. Used for launching the testbench simulation.
90101

91102
You can now launch the simulation as follows:
92-
93-
> cd ${FINN_ROOT}/tutorials/fpga_flow/output_tfc_w0a1_fpga/sim
94-
> vivado -mode gui -source make_sim_proj.tcl
103+
```shell
104+
cd ${FINN_ROOT}/tutorials/fpga_flow/output_tfc_w0a1_fpga/sim
105+
vivado -mode gui -source make_sim_proj.tcl
106+
```
95107

96108
The simulation should complete with:
97109

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,29 @@
11
{
22
"Defaults": {},
3-
"Thresholding_Batch_0": {
4-
"PE": 49,
5-
"ram_style": "block"
3+
"Thresholding_rtl_0": {
4+
"PE": 49
65
},
7-
"MatrixVectorActivation_0": {
6+
"MVAU_hls_0": {
87
"PE": 16,
98
"SIMD": 49,
109
"ram_style": "block"
1110
},
12-
"MatrixVectorActivation_1": {
11+
"MVAU_hls_1": {
1312
"PE": 8,
1413
"SIMD": 8,
1514
"ram_style": "auto"
1615
},
17-
"MatrixVectorActivation_2": {
16+
"MVAU_hls_2": {
1817
"PE": 8,
1918
"SIMD": 8,
2019
"ram_style": "auto"
2120
},
22-
"MatrixVectorActivation_3": {
21+
"MVAU_hls_3": {
2322
"PE": 10,
2423
"SIMD": 8,
2524
"ram_style": "distributed"
2625
},
27-
"LabelSelect_Batch_0": {
26+
"LabelSelect_hls_0": {
2827
"PE": 1
2928
}
3029
}

0 commit comments

Comments
 (0)