Skip to content

Commit a8ab0de

Browse files
committed
Use getcwd() instead of PWD env var
1 parent dd95ff0 commit a8ab0de

4 files changed

Lines changed: 6 additions & 6 deletions

File tree

src/finn/transformation/fpgadataflow/create_stitched_ip.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -627,7 +627,7 @@ def apply(self, model):
627627
f.write(tcl_string)
628628
# create a shell script and call Vivado
629629
make_project_sh = vivado_stitch_proj_dir + "/make_project.sh"
630-
working_dir = os.environ["PWD"]
630+
working_dir = os.getcwd()
631631
with open(make_project_sh, "w") as f:
632632
f.write("#!/bin/bash \n")
633633
f.write("cd {}\n".format(vivado_stitch_proj_dir))

src/finn/transformation/fpgadataflow/make_zynq_proj.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -395,7 +395,7 @@ def apply(self, model):
395395

396396
# create a TCL recipe for the project
397397
synth_project_sh = vivado_pynq_proj_dir + "/synth_project.sh"
398-
working_dir = os.environ["PWD"]
398+
working_dir = os.getcwd()
399399
with open(synth_project_sh, "w") as f:
400400
f.write("#!/bin/bash \n")
401401
f.write("cd {}\n".format(vivado_pynq_proj_dir))

src/finn/transformation/fpgadataflow/vitis_build.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ def apply(self, model):
135135

136136
# create a shell script and call Vivado
137137
package_xo_sh = vivado_proj_dir + "/gen_xo.sh"
138-
working_dir = os.environ["PWD"]
138+
working_dir = os.getcwd()
139139
with open(package_xo_sh, "w") as f:
140140
f.write("#!/bin/bash \n")
141141
f.write("cd {}\n".format(vivado_proj_dir))
@@ -307,7 +307,7 @@ def apply(self, model):
307307

308308
# create a shell script and call Vitis
309309
script = link_dir + "/run_vitis_link.sh"
310-
working_dir = os.environ["PWD"]
310+
working_dir = os.getcwd()
311311
with open(script, "w") as f:
312312
f.write("#!/bin/bash \n")
313313
f.write("cd {}\n".format(link_dir))
@@ -340,7 +340,7 @@ def apply(self, model):
340340

341341
# run Vivado to gen xml report
342342
gen_rep_xml_sh = link_dir + "/gen_report_xml.sh"
343-
working_dir = os.environ["PWD"]
343+
working_dir = os.getcwd()
344344
with open(gen_rep_xml_sh, "w") as f:
345345
f.write("#!/bin/bash \n")
346346
f.write("cd {}\n".format(link_dir))

src/finn/util/hls.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ def build(self, code_gen_dir):
5454
assert which("vitis_hls") is not None, "vitis_hls not found in PATH"
5555
self.code_gen_dir = code_gen_dir
5656
self.ipgen_script = str(self.code_gen_dir) + "/ipgen.sh"
57-
working_dir = os.environ["PWD"]
57+
working_dir = os.getcwd()
5858
f = open(self.ipgen_script, "w")
5959
f.write("#!/bin/bash \n")
6060
f.write("cd {}\n".format(code_gen_dir))

0 commit comments

Comments
 (0)