Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

windows 10 compatibility #17

Open
wants to merge 14 commits into
base: master
Choose a base branch
from
4 changes: 2 additions & 2 deletions hlsclt/build_commands/build_commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import click
import os
import subprocess
from hlsclt.helper_funcs import find_solution_num
from hlsclt.helper_funcs import *
from hlsclt.report_commands.report_commands import open_report
import shutil

Expand Down Expand Up @@ -153,7 +153,7 @@ def build_end_callback(ctx,sub_command_returns,keep,report):
ctx.obj.file.write("exit" + "\n")
ctx.obj.file.close()
# Call the Vivado HLS process
returncode = subprocess.call(["vivado_hls -f run_hls.tcl"],shell=True)
returncode = subprocess.call([vivado_hls, "-f", "run_hls.tcl"],shell=True)
# Check return status of the HLS process.
if returncode < 0:
raise click.Abort()
Expand Down
10 changes: 9 additions & 1 deletion hlsclt/helper_funcs.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,20 @@
import imp
from glob import glob
from .classes import *
import platform

mysys=platform.system()
if mysys=="Windows":
vivado_hls="vivado_hls.bat"
else:
vivado_hls="vivado_hls"

### Function Definitions ###
# Function to generate the default config dicttionary
def generate_default_config():
proj_name=os.path.relpath(".","..")
config = {
"project_name" : "proj_" + os.path.relpath(".",".."),
"project_name" : "proj_" + proj_name,
"top_level_function_name" : "",
"src_dir_name" : "src",
"tb_dir_name" : "tb",
Expand Down
4 changes: 2 additions & 2 deletions hlsclt/report_commands/report_commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
import os
import subprocess
from glob import glob
from hlsclt.helper_funcs import find_solution_num
from hlsclt.helper_funcs import *

### Supporting Functions ###
# Function to check if project exists
Expand Down Expand Up @@ -41,7 +41,7 @@ def open_report(ctx,report):
# Function for opening the HLS GUI
def open_project_in_gui(ctx):
config = ctx.obj.config
hls_process = subprocess.Popen(["vivado_hls", "-p", config["project_name"]])
hls_process = subprocess.Popen([vivado_hls, "-p", config["project_name"]])

# Function for gathering the project status
def gather_project_status(ctx):
Expand Down