Skip to content

Commit

Permalink
fix: use open_component instead of open_project
Browse files Browse the repository at this point in the history
Create HLS components from the auto-generated Tcl script
instead of just open_project/open_solution flow.  Without
the use of open_project -ide vitis or open_component, you
create "see" the corresponding HLS component in the Vitis
Unified IDE (and therefore can't use the set of support
tools within Vitis IDE).
  • Loading branch information
Mark Pettigrew committed Nov 25, 2024
1 parent 1fc270f commit 662cc58
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ main.pdf

# hls projects
**/*.proj/
**/*.comp/

# ignore any python virtual environments
**/.venv/
Expand Down
8 changes: 4 additions & 4 deletions examples/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -136,10 +136,10 @@ CXX_HLS_TARGET_FILES = \
spmv2_restructured.cpp \
spmv_unrolled.cpp

HLS_TARGETS = $(patsubst %.c,%.proj,$(CC_HLS_TARGET_FILES))
HLS_TARGETS += $(patsubst %.cpp,%.proj,$(CXX_HLS_TARGET_FILES))
HLS_TARGETS = $(patsubst %.c,%.comp,$(CC_HLS_TARGET_FILES))
HLS_TARGETS += $(patsubst %.cpp,%.comp,$(CXX_HLS_TARGET_FILES))

%.proj: %.tcl
%.comp: %.tcl
# vivado_hls -f $?
$(HLS_COMPILER) $? || (echo "$(HLS_COMPILER) $? failed $$?"; exit 0)

Expand All @@ -159,7 +159,7 @@ test: $(EXAMPLES_LOG)


clean:
rm -rf *.o *.log *.bin *.tcl *.proj logs/* hls/*
rm -rf *.o *.log *.bin *.tcl *.comp logs/* hls/*

.PHONY: clean hls test

Expand Down
3 changes: 1 addition & 2 deletions scripts/gen_hls_runner_script.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,12 +107,11 @@ def write_script(

with open(output_file, "w", encoding="utf-8") as file:
script_text = f"""\
open_project {file_root}.proj -reset
open_component {file_root}.comp -reset
add_files [list {files}]
{tb_add_files}
set_top {top}
puts "Running: set_top {top}"
open_solution solution -reset
set_part {part}
puts "Running: set_part {part}"
create_clock -period {period}
Expand Down

0 comments on commit 662cc58

Please sign in to comment.