Repository navigation
Expand file tree
/
Copy pathREADME
More file actions
45 lines (37 loc) · 1.71 KB
/
Copy pathREADME
File metadata and controls
45 lines (37 loc) · 1.71 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
This is a simple example using HLS's hls::array_partition library
(hls::gather) to guarantee II=1 parallel access to a cyclically partitioned
array, even when the access indices are only known at runtime.
The design sums 4 strided elements of an array, A[i], A[i+s], A[i+2s],
A[i+3s], where the stride s is a runtime argument. Because s is not known
at compile time, #pragma HLS ARRAY_PARTITION alone cannot prove the 4
parallel accesses land in different banks and would fall back to
sequential (II>1) access. hls::gather<T, K> shifts that proof obligation
to the caller: as long as the stride is coprime with K (here K=4, so any
odd stride), the gather is guaranteed conflict-free and reaches II=1.
Files Included in this Package
==============================
* this file:
README
* design files:
array_partition_lib_simple.cpp
array_partition_lib_simple.h
array_partition_lib_simple_test.cpp
* scripts:
run_hls.tcl
run.py
run_vitis_commandline.sh
hls_config-for-commandline-use.cfg
Running the Design using Vitis HLS
==================================
Use vitis-run to execute the script "run_hls.tcl" ; edit it to set $hls_exec and enable specific run steps.
$ vitis-run --mode hls --tcl run_hls.tcl
Running the design using Vitis v++ and vitis-run commands
=========================================================
Use "run_vitis_commandline.sh" to run on the commands line the specified flow steps in the given order.
$ ./run_vitis_commandline.sh help
$ ./run_vitis_commandline.sh csim
$ ./run_vitis_commandline.sh csim csynth cosim
Running the design using Python and python script
=================================================
Use Vitis to set up a workspace and component from the script and runs csim csynth cosim.
$ vitis -s run.py