Skip to content

Commit 454f71e

Browse files
committed
HLS template project and scripts update
1 parent 8b1b2ef commit 454f71e

27 files changed

+125
-52
lines changed

example_projects/vitis_hls_test_prj_template_v1/hls_operator.cpp

-19
This file was deleted.

example_projects/vitis_hls_test_prj_template_v1/hls_operator.h

-9
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
#------------------------------------------------------------------------------
2+
# .gitignore for Vitis HLS projects
3+
# published as part of https://github.com/pConst/basic_verilog
4+
# Konstantin Pavlov, [email protected]
5+
#------------------------------------------------------------------------------
6+
7+
# INFO ------------------------------------------------------------------------
8+
# rename the file to ".gitignore" and place into your HLS project directory
9+
#
10+
11+
/prj
12+
13+
vitis_hls.log
14+

example_projects/vitis_hls_test_prj_template_v1/run_hls.tcl renamed to example_projects/vitis_hls_test_prj_template_v2/run_hls.tcl

+3-3
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44
#------------------------------------------------------------------------------
55

66
# Create a project
7-
open_project proj -reset
8-
add_files hls_operator.cpp
9-
add_files -tb hls_operator_tb.cpp
7+
open_project prj -reset
8+
add_files src/hls_operator.cpp
9+
add_files -tb src/hls_operator_tb.cpp
1010
set_top hls_operator
1111

1212
# Create a solution
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
//------------------------------------------------------------------------------
2+
// published as part of https://github.com/pConst/basic_verilog
3+
// Konstantin Pavlov, [email protected]
4+
//------------------------------------------------------------------------------
5+
6+
#include "ap_int.h"
7+
#include "hls_stream.h"
8+
9+
void hls_operator(
10+
hls::stream<int> &a,
11+
hls::stream<int> &b,
12+
hls::stream<int> &c,
13+
hls::stream<int> &d
14+
){
15+
16+
#pragma HLS DATAFLOW disable_start_propagation
17+
#pragma HLS INTERFACE mode=ap_ctrl_none port=return
18+
19+
#pragma HLS INTERFACE port=a ap_fifo
20+
#pragma HLS INTERFACE port=b axis
21+
#pragma HLS INTERFACE port=c ap_fifo
22+
#pragma HLS INTERFACE port=d axis
23+
24+
c.write( a.read() + b.read() );
25+
d.write( a.read() - b.read() );
26+
}
27+

example_projects/vitis_hls_test_prj_template_v2/src/hls_operator.h

Whitespace-only changes.

example_projects/vitis_hls_test_prj_template_v1/vitis_hls_clean.sh renamed to example_projects/vitis_hls_test_prj_template_v2/vitis_hls_clean.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
# Script to clean Vitis HLS project
88
# see ../example_projects/vitis_hls_prj_template_v1/ for complete example
99

10-
rm -rf proj
10+
rm -rf prj
1111

1212
rm vitis_hls.log
1313

example_projects/vitis_hls_test_prj_template_v1/vitis_hls_cosim.sh renamed to example_projects/vitis_hls_test_prj_template_v2/vitis_hls_cosim.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
# Script to perform HLS component co-simulation
99
# see ../example_projects/vitis_hls_prj_template_v1/ for complete example
1010

11-
if [ ! -d "./proj" ]; then
11+
if [ ! -d "./prj" ]; then
1212
source vitis_hls_csynth.sh
1313
fi
1414

example_projects/vitis_hls_test_prj_template_v1/vitis_hls_csim.sh renamed to example_projects/vitis_hls_test_prj_template_v2/vitis_hls_csim.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
# Script to perform HLS component simulation
99
# see ../example_projects/vitis_hls_prj_template_v1/ for complete example
1010

11-
if [ ! -d "./proj" ]; then
11+
if [ ! -d "./prj" ]; then
1212
source vitis_hls_csynth.sh
1313
fi
1414

Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
#! /usr/bin/env bash
2+
#------------------------------------------------------------------------------
3+
# published as part of https://github.com/pConst/basic_verilog
4+
# Konstantin Pavlov, [email protected]
5+
#------------------------------------------------------------------------------
6+
7+
# Script to initialize HLS project solution and make CSYNTH compilation step
8+
# see ../example_projects/vitis_hls_prj_template_v1/ for complete example
9+
10+
11+
12+
rm -rf ./prj/sol1/syn
13+
rm -rf ./prj/sol1/impl
14+
15+
vitis_hls -f run_hls.tcl
16+
17+
# open top Verilog
18+
subl ./prj/sol1/syn/verilog/hls_operator.v
19+
20+
# open main report
21+
subl ./prj/sol1/syn/report/csynth.rpt
22+

example_projects/vitis_hls_test_prj_template_v1/vitis_hls_export.sh renamed to example_projects/vitis_hls_test_prj_template_v2/vitis_hls_export.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
# Script to export HLS component to Vivado IP catalog
99
# see ../example_projects/vitis_hls_prj_template_v1/ for complete example
1010

11-
if [ ! -d "./proj" ]; then
11+
if [ ! -d "./prj" ]; then
1212
source vitis_hls_csynth.sh
1313
fi
1414

scripts_for_xilinx_hls/vitis_hls_open_gui.sh renamed to example_projects/vitis_hls_test_prj_template_v2/vitis_hls_gui.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@
88
# Script to open Vitis HLS GUI
99
# see ../example_projects/vitis_hls_prj_template_v1/ for complete example
1010

11-
if [ ! -d "./proj" ]; then
11+
if [ ! -d "./prj" ]; then
1212
source vitis_hls_csynth.sh
1313
fi
1414

15-
vitis_hls -p proj
15+
nohup vitis_hls -p prj &> /dev/null & disown
1616

example_projects/vitis_hls_test_prj_template_v1/vitis_hls_impl.sh renamed to example_projects/vitis_hls_test_prj_template_v2/vitis_hls_impl.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
# Script to perform HLS IP synthesis and implementation
99
# see ../example_projects/vitis_hls_prj_template_v1/ for complete example
1010

11-
if [ ! -d "./proj" ]; then
11+
if [ ! -d "./prj" ]; then
1212
source vitis_hls_csynth.sh
1313
fi
1414

Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
#! /usr/bin/env bash
2+
23
#------------------------------------------------------------------------------
34
# published as part of https://github.com/pConst/basic_verilog
45
# Konstantin Pavlov, [email protected]
56
#------------------------------------------------------------------------------
67

7-
# Script to initialize HLS project solution and make CSYNTH compilation step
8+
# Script to open Vitis HLS GUI
89
# see ../example_projects/vitis_hls_prj_template_v1/ for complete example
910

10-
vitis_hls -f run_hls.tcl
11+
killall vitis_hls
1112

example_projects/vitis_hls_test_prj_template_v1/vitis_hls_syn.sh renamed to example_projects/vitis_hls_test_prj_template_v2/vitis_hls_syn.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
# Script to perform HLS IP synthesis
99
# see ../example_projects/vitis_hls_prj_template_v1/ for complete example
1010

11-
if [ ! -d "./proj" ]; then
11+
if [ ! -d "./prj" ]; then
1212
source vitis_hls_csynth.sh
1313
fi
1414

gitignores/.gitignore_vitis_hls

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
#------------------------------------------------------------------------------
2+
# .gitignore for Vitis HLS projects
3+
# published as part of https://github.com/pConst/basic_verilog
4+
# Konstantin Pavlov, [email protected]
5+
#------------------------------------------------------------------------------
6+
7+
# INFO ------------------------------------------------------------------------
8+
# rename the file to ".gitignore" and place into your HLS project directory
9+
#
10+
11+
/prj
12+
13+
vitis_hls.log
14+

scripts_for_xilinx_hls/run_hls.tcl

+3-3
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44
#------------------------------------------------------------------------------
55

66
# Create a project
7-
open_project proj -reset
8-
add_files hls_operator.cpp
9-
add_files -tb hls_operator_tb.cpp
7+
open_project prj -reset
8+
add_files src/hls_operator.cpp
9+
add_files -tb src/hls_operator_tb.cpp
1010
set_top hls_operator
1111

1212
# Create a solution

scripts_for_xilinx_hls/vitis_hls_clean.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
# Script to clean Vitis HLS project
88
# see ../example_projects/vitis_hls_prj_template_v1/ for complete example
99

10-
rm -rf proj
10+
rm -rf prj
1111

1212
rm vitis_hls.log
1313

scripts_for_xilinx_hls/vitis_hls_cosim.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
# Script to perform HLS component co-simulation
99
# see ../example_projects/vitis_hls_prj_template_v1/ for complete example
1010

11-
if [ ! -d "./proj" ]; then
11+
if [ ! -d "./prj" ]; then
1212
source vitis_hls_csynth.sh
1313
fi
1414

scripts_for_xilinx_hls/vitis_hls_csim.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
# Script to perform HLS component simulation
99
# see ../example_projects/vitis_hls_prj_template_v1/ for complete example
1010

11-
if [ ! -d "./proj" ]; then
11+
if [ ! -d "./prj" ]; then
1212
source vitis_hls_csynth.sh
1313
fi
1414

scripts_for_xilinx_hls/vitis_hls_csynth.sh

+11
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,16 @@
77
# Script to initialize HLS project solution and make CSYNTH compilation step
88
# see ../example_projects/vitis_hls_prj_template_v1/ for complete example
99

10+
11+
12+
rm -rf ./prj/sol1/syn
13+
rm -rf ./prj/sol1/impl
14+
1015
vitis_hls -f run_hls.tcl
1116

17+
# open top Verilog
18+
subl ./prj/sol1/syn/verilog/hls_operator.v
19+
20+
# open main report
21+
subl ./prj/sol1/syn/report/csynth.rpt
22+

scripts_for_xilinx_hls/vitis_hls_export.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
# Script to export HLS component to Vivado IP catalog
99
# see ../example_projects/vitis_hls_prj_template_v1/ for complete example
1010

11-
if [ ! -d "./proj" ]; then
11+
if [ ! -d "./prj" ]; then
1212
source vitis_hls_csynth.sh
1313
fi
1414

example_projects/vitis_hls_test_prj_template_v1/vitis_hls_open_gui.sh renamed to scripts_for_xilinx_hls/vitis_hls_gui.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@
88
# Script to open Vitis HLS GUI
99
# see ../example_projects/vitis_hls_prj_template_v1/ for complete example
1010

11-
if [ ! -d "./proj" ]; then
11+
if [ ! -d "./prj" ]; then
1212
source vitis_hls_csynth.sh
1313
fi
1414

15-
vitis_hls -p proj
15+
nohup vitis_hls -p prj &> /dev/null & disown
1616

scripts_for_xilinx_hls/vitis_hls_impl.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
# Script to perform HLS IP synthesis and implementation
99
# see ../example_projects/vitis_hls_prj_template_v1/ for complete example
1010

11-
if [ ! -d "./proj" ]; then
11+
if [ ! -d "./prj" ]; then
1212
source vitis_hls_csynth.sh
1313
fi
1414

Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
#! /usr/bin/env bash
2+
3+
#------------------------------------------------------------------------------
4+
# published as part of https://github.com/pConst/basic_verilog
5+
# Konstantin Pavlov, [email protected]
6+
#------------------------------------------------------------------------------
7+
8+
# Script to open Vitis HLS GUI
9+
# see ../example_projects/vitis_hls_prj_template_v1/ for complete example
10+
11+
killall vitis_hls
12+

scripts_for_xilinx_hls/vitis_hls_syn.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
# Script to perform HLS IP synthesis
99
# see ../example_projects/vitis_hls_prj_template_v1/ for complete example
1010

11-
if [ ! -d "./proj" ]; then
11+
if [ ! -d "./prj" ]; then
1212
source vitis_hls_csynth.sh
1313
fi
1414

0 commit comments

Comments
 (0)