benjmarshall / hlsclt Goto Github PK
View Code? Open in Web Editor NEWA Vivado HLS Command Line Helper Tool
License: MIT License
A Vivado HLS Command Line Helper Tool
License: MIT License
When configuration options are specified as blank strings "" the program should gracefully handle not merging them into the default confguration structure. This currently throws an error:
NameError: name 'ConfigError' is not define
Currently source and test bench directories must be specified along with individual files. This seems like a duplicate requirement to users.
The tool also forces users into maintaining a separate source directory which they may not want.
This often means that relative paths to include files must be maintained in multiple source files.
A neater solution must exist so this issue is here to discuss the best way forward towards something that makes sense to the various users whilst not making the tool onerously complex.
See #15 for additional context for this issue.
$ hlsclt status
Traceback (most recent call last):
File "/usr/local/bin/hlsclt", line 11, in <module>
load_entry_point('hlsclt==1.0.1', 'console_scripts', 'hlsclt')()
File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 764, in __call__
return self.main(*args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 717, in main
rv = self.invoke(ctx)
File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 1137, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 956, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 555, in invoke
return callback(*args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/click/decorators.py", line 17, in new_func
return f(get_current_context(), *args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/hlsclt/report_commands/report_commands.py", line 141, in status
print_project_status(ctx)
File "/usr/local/lib/python2.7/dist-packages/hlsclt/report_commands/report_commands.py", line 96, in print_project_status
project_status = gather_project_status(ctx)
File "/usr/local/lib/python2.7/dist-packages/hlsclt/report_commands/report_commands.py", line 70, in gather_project_status
with click.open_file(config["project_name"] + "/solution" + str(solution_num) + "/sim/report/" + config["top_level_function_name"] + "_cosim.rpt","r") as f:
File "/usr/local/lib/python2.7/dist-packages/click/utils.py", line 324, in open_file
atomic=atomic)
File "/usr/local/lib/python2.7/dist-packages/click/_compat.py", line 487, in open_stream
return open(filename, mode), True
IOError: [Errno 2] No such file or directory: 'proj_simple_adder_pynq-z2/solution1/sim/report/simple_adder_cosim.rpt'
If environment is set in the calling process/cmd the shell=True is needed in build_commands.py
hls_processs = subprocess.run(["vivado_hls", "-f", "run_hls.tcl"],shell=True)
The keep argument currently forces the use of solution1 as the solution folder which is unintended. This should be updated to use the current highest solution number.
Subprocess.run() is now used to call the vivado hls process. This breaks compatibilty with python 2.
Hello,
I'm a happy user of hlsclt. However, I tried to port a project of mine to a bigger part,
part_name = "xczu9eg-ffvc900-2i"
and now the build csim (and every other task) fails with
can't read "lib_specifications": no such variable
while executing
"source [lindex $::argv 1] "
("uplevel" body line 1)
invoked from within
"uplevel \#0 { source [lindex $::argv 1] } "
I can't make anything of this error. Developing under the GUI works for this part, too (no license issues). Google didn't help. Strangely, a 442-byte binary file named 'c' remains in the work directory after the unsuccessful run.
HLS 2017.4 here.
Best,
Peter
The recent changes trigger a small omission in the build steps. Apparently,
do_end_build_stuff() assumes that the source files are in src/ instead of using the src_dir_name configuration setting.
See this (src_dir_name = "." was specified in the hls_config.py)
Copying the source and config files to solution1
Traceback (most recent call last):
File "/usr/local/bin/hlsclt", line 11, in
sys.exit(cli())
File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 722, in call
return self.main(*args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 697, in main
rv = self.invoke(ctx)
File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 1066, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 1093, in invoke
return _process_result(rv)
File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 1031, in _process_result
**ctx.params)
File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 535, in invoke
return callback(*args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/click/decorators.py", line 17, in new_func
return f(get_current_context(), *args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/hlsclt/build_commands/build_commands.py", line 164, in build_end_callback
do_end_build_stuff(ctx,sub_command_returns,report)
File "/usr/local/lib/python2.7/dist-packages/hlsclt/build_commands/build_commands.py", line 122, in do_end_build_stuff
shutil.copytree("src", destiny_src)
File "/usr/lib/python2.7/shutil.py", line 171, in copytree
names = os.listdir(src)
OSError: [Errno 2] No such file or directory: 'src'
Ubuntu 16.04, HLS 2018.3
With a few recent enhancement suggestions this project will probably grow to a size where some slightly more formal testing will become increasingly useful.
Adding basic tests for key functionality would be a good start. I think initially aiming for a quicker method of testing nothing is broken by 'simple' enhancement PRs.
e.g. --std=c++11
say, I want to add the following command into hls_config.py But, how?
config_dataflow -strict_mode (off | error | warning)
A bug in the function used to determine the solution number to be used for a build. If the - k option is passed the determined current highest existing solution number is incremented by 1. If no solutions exist, ie a fresh project, then passing the - k option creates the first solution as solution 2. This has a knock on effect of incorrectly counting the solution num for the next build call.
how to translate the following into hls_config.py
add_files -tb tb/xxx.c -cflags -lnetpbm
Hi,
would be possible add -cflags to tb files?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.