22
22
# pylint: disable=too-few-public-methods
23
23
class VtrStageArgparseAction (argparse .Action ):
24
24
"""
25
- Class to parse the VTR stages to begin and end at.
25
+ Class to parse the VTR stages to begin and end at.
26
26
"""
27
27
28
28
def __call__ (self , parser , namespace , value , option_string = None ):
@@ -43,7 +43,7 @@ def __call__(self, parser, namespace, value, option_string=None):
43
43
44
44
def vtr_command_argparser (prog = None ):
45
45
"""
46
- The VTR command arg parser
46
+ The VTR command arg parser
47
47
"""
48
48
usage = "%(prog)s circuit_file architecture_file [options]"
49
49
description = textwrap .dedent (
@@ -327,7 +327,9 @@ def vtr_command_argparser(prog=None):
327
327
help = "Tells VPR the amount of iterations allowed to obtain the critical path." ,
328
328
)
329
329
vpr .add_argument (
330
- "-fix_pins" , type = str , help = "Controls how the placer handles I/O pads during placement." ,
330
+ "-fix_pins" ,
331
+ type = str ,
332
+ help = "Controls how the placer handles I/O pads during placement." ,
331
333
)
332
334
vpr .add_argument (
333
335
"-relax_w_factor" ,
@@ -354,7 +356,10 @@ def vtr_command_argparser(prog=None):
354
356
help = "Tells VPR to run final analysis stage." ,
355
357
)
356
358
vpr .add_argument (
357
- "-check_place" , default = False , action = "store_true" , help = "Tells VPR to run routing stage" ,
359
+ "-check_place" ,
360
+ default = False ,
361
+ action = "store_true" ,
362
+ help = "Tells VPR to run routing stage" ,
358
363
)
359
364
vpr .add_argument (
360
365
"-sdc_file" , default = None , type = str , help = "Path to SDC timing constraints file."
@@ -371,14 +376,14 @@ def vtr_command_argparser(prog=None):
371
376
372
377
def main ():
373
378
"""
374
- Main function to call vtr_command_main to run VTR
379
+ Main function to call vtr_command_main to run VTR
375
380
"""
376
381
return vtr_command_main (sys .argv [1 :], prog = sys .argv [0 ])
377
382
378
383
379
384
def vtr_command_main (arg_list , prog = None ):
380
385
"""
381
- Running VTR with the specified arguemnts.
386
+ Running VTR with the specified arguemnts.
382
387
"""
383
388
start = datetime .now ()
384
389
# Load the arguments
@@ -431,8 +436,8 @@ def vtr_command_main(arg_list, prog=None):
431
436
check_incremental_sta_consistency = args .check_incremental_sta_consistency ,
432
437
use_old_abc_script = args .use_old_abc_script ,
433
438
relax_w_factor = args .relax_w_factor ,
434
- check_route = args .check_route ,
435
- check_place = args .check_place ,
439
+ check_route = args .check_route ,
440
+ check_place = args .check_place ,
436
441
)
437
442
error_status = "OK"
438
443
except vtr .VtrError as error :
@@ -521,7 +526,7 @@ def process_unknown_args(unknown_args):
521
526
522
527
def process_abc_args (args ):
523
528
"""
524
- Finds arguments needed in the ABC stage of the flow
529
+ Finds arguments needed in the ABC stage of the flow
525
530
"""
526
531
abc_args = OrderedDict ()
527
532
if args .iterative_bb :
@@ -543,7 +548,7 @@ def process_abc_args(args):
543
548
544
549
def process_odin_args (args ):
545
550
"""
546
- Finds arguments needed in the ODIN stage of the flow
551
+ Finds arguments needed in the ODIN stage of the flow
547
552
"""
548
553
odin_args = OrderedDict ()
549
554
odin_args ["adder_type" ] = args .adder_type
@@ -562,7 +567,7 @@ def process_odin_args(args):
562
567
563
568
def process_vpr_args (args , prog , temp_dir , vpr_args ):
564
569
"""
565
- Finds arguments needed in the VPR stage of the flow
570
+ Finds arguments needed in the VPR stage of the flow
566
571
"""
567
572
if args .crit_path_router_iterations :
568
573
if "max_router_iterations" not in vpr_args :
@@ -580,7 +585,7 @@ def process_vpr_args(args, prog, temp_dir, vpr_args):
580
585
581
586
def get_sdc_file (sdc_file , prog ):
582
587
"""
583
- takes in the sdc_file and returns a path to that file if it exists.
588
+ takes in the sdc_file and returns a path to that file if it exists.
584
589
"""
585
590
if not Path (sdc_file ).exists ():
586
591
if sdc_file .startswith ("/" ):
@@ -593,7 +598,7 @@ def get_sdc_file(sdc_file, prog):
593
598
594
599
def except_vtr_error (error , expect_fail , verbose ):
595
600
"""
596
- Handle vtr exceptions
601
+ Handle vtr exceptions
597
602
"""
598
603
error_status = None
599
604
actual_error = None
0 commit comments