@@ -383,7 +383,7 @@ def vtr_command_argparser(prog=None):
383
383
help = "Tells VPR the amount of iterations allowed to obtain the critical path." ,
384
384
)
385
385
vpr .add_argument (
386
- "-fix_pins" ,
386
+ "-- fix_pins" ,
387
387
type = str ,
388
388
help = "Controls how the placer handles I/O pads during placement." ,
389
389
)
@@ -424,7 +424,7 @@ def vtr_command_argparser(prog=None):
424
424
help = "Tells VPR to run routing stage" ,
425
425
)
426
426
vpr .add_argument (
427
- "-sdc_file" , default = None , type = str , help = "Path to SDC timing constraints file."
427
+ "-- sdc_file" , default = None , type = str , help = "Path to SDC timing constraints file."
428
428
)
429
429
vpr .add_argument (
430
430
"-read_vpr_constraints" , default = None , type = str , help = "Path to vpr constraints file."
@@ -524,7 +524,11 @@ def vtr_command_main(arg_list, prog=None):
524
524
error_status = "Error"
525
525
526
526
assert args .temp_dir
527
+
527
528
temp_dir = Path (args .temp_dir )
529
+ if not str (temp_dir ).startswith ("/" ):
530
+ temp_dir = Path (os .getcwd () + "/" + args .temp_dir )
531
+
528
532
# Specify how command should be run
529
533
command_runner = vtr .CommandRunner (
530
534
track_memory = args .track_memory_usage ,
@@ -538,6 +542,9 @@ def vtr_command_main(arg_list, prog=None):
538
542
exit_status = 0
539
543
return_status = 0
540
544
try :
545
+ # Create temp dir
546
+ os .makedirs (temp_dir , exist_ok = True )
547
+
541
548
vpr_args = process_unknown_args (unknown_args )
542
549
vpr_args = process_vpr_args (args , prog , temp_dir , vpr_args )
543
550
if args .sdc_file :
@@ -765,11 +772,10 @@ def get_sdc_file(sdc_file, prog, temp_dir):
765
772
takes in the sdc_file and returns a path to that file if it exists.
766
773
"""
767
774
if not sdc_file .startswith ("/" ):
768
- sdc_file = Path ( prog ). parent . parent / sdc_file
775
+ sdc_file = os . getcwd () + "/" + str ( sdc_file )
769
776
sdc_file_name = Path (sdc_file ).name
770
777
sdc_file_copy = Path (temp_dir ) / Path (sdc_file_name )
771
778
shutil .copy (str (sdc_file ), str (sdc_file_copy ))
772
-
773
779
return str (vtr .verify_file (sdc_file_copy , "sdc file" ))
774
780
775
781
@@ -778,7 +784,7 @@ def get_read_vpr_constraints(read_vpr_constraints, prog, temp_dir):
778
784
takes in the read_vpr_constraints and returns a path to that file if it exists.
779
785
"""
780
786
if not read_vpr_constraints .startswith ("/" ):
781
- read_vpr_constraints = Path ( prog ). parent . parent / read_vpr_constraints
787
+ read_vpr_constraints = os . getcwd () + "/" + str ( read_vpr_constraints )
782
788
vpr_constraint_file_name = Path (read_vpr_constraints ).name
783
789
vpr_constraint_file_copy = Path (temp_dir ) / Path (vpr_constraint_file_name )
784
790
shutil .copy (str (read_vpr_constraints ), str (vpr_constraint_file_copy ))
0 commit comments