Skip to content

Commit d290af9

Browse files
committed
vtr_flow: add possibility to have add additional arch data files
Signed-off-by: Alessandro Comodi <[email protected]>
1 parent bad6b53 commit d290af9

File tree

2 files changed

+22
-4
lines changed
  • vtr_flow
    • scripts/python_libs/vtr
    • tasks/regression_tests/vtr_reg_nightly/symbiflow/config

2 files changed

+22
-4
lines changed

vtr_flow/scripts/python_libs/vtr/task.py

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,8 @@ def __init__(
4343
qor_parse_file=None,
4444
cmos_tech_behavior=None,
4545
pad_file=None,
46+
additional_files=None,
47+
additional_files_list_add=None
4648
):
4749
self.task_name = task_name
4850
self.config_dir = config_dir
@@ -61,6 +63,8 @@ def __init__(
6163
self.qor_parse_file = qor_parse_file
6264
self.cmos_tech_behavior = cmos_tech_behavior
6365
self.pad_file = pad_file
66+
self.additional_files = additional_files
67+
self.additional_files_list_add = additional_files_list_add
6468

6569

6670
# pylint: enable=too-few-public-methods
@@ -169,6 +173,7 @@ def load_task_config(config_file):
169173
[
170174
"circuits_dir",
171175
"archs_dir",
176+
"additional_files",
172177
"parse_file",
173178
"script_path",
174179
"script_params",
@@ -211,7 +216,7 @@ def load_task_config(config_file):
211216
elif repeated_key_pattern in key:
212217
if key not in key_values:
213218
key_values[key] = []
214-
if key == "script_params_list_add":
219+
if key == "script_params_list_add" or key == "additional_files_list_add":
215220
key_values[key] += [value]
216221
else:
217222
key_values[key].append(value)
@@ -229,7 +234,7 @@ def load_task_config(config_file):
229234
if "script_params_common" in key_values:
230235
key_values["script_params_common"] = split(key_values["script_params_common"])
231236

232-
check_required_feilds(config_file, required_keys, key_values)
237+
check_required_fields(config_file, required_keys, key_values)
233238

234239
# Useful meta-data about the config
235240
config_dir = str(Path(config_file).parent)
@@ -240,7 +245,7 @@ def load_task_config(config_file):
240245
return TaskConfig(**key_values)
241246

242247

243-
def check_required_feilds(config_file, required_keys, key_values):
248+
def check_required_fields(config_file, required_keys, key_values):
244249
"""
245250
Check that all required fields were specified
246251
"""
@@ -307,6 +312,14 @@ def create_jobs(args, configs, longest_name=0, longest_arch_circuit=0, after_run
307312
# Collect any extra script params from the config file
308313
cmd = [abs_circuit_filepath, abs_arch_filepath]
309314

315+
# Check if additional architectural data files are present
316+
if config.additional_files_list_add:
317+
for additional_file in config.additional_files_list_add:
318+
flag, file_name = additional_file.split(',')
319+
320+
cmd += [flag]
321+
cmd += [resolve_vtr_source_file(config, file_name, config.arch_dir)]
322+
310323
if hasattr(args, "show_failures") and args.show_failures:
311324
cmd += ["-show_failures"]
312325
cmd += config.script_params if config.script_params else []

vtr_flow/tasks/regression_tests/vtr_reg_nightly/symbiflow/config/config.txt

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,11 @@ circuit_list_add=symbiflow_counter.eblif
1414
# Add architectures to list to sweep
1515
arch_list_add=arch.timing.xml
1616

17+
# Add additional required architectural data files
18+
additional_files_list_add=--read_rr_graph,rr_graph_xc7a50t_test.rr_graph.real.bin
19+
additional_files_list_add=--read_router_lookahead,rr_graph_xc7a50t_test.lookahead.bin
20+
additional_files_list_add=--read_placement_delay_lookup,rr_graph_xc7a50t_test.place_delay.bin
21+
1722
# Parse info and how to parse
1823
parse_file=vpr_standard.txt
1924

@@ -23,4 +28,4 @@ qor_parse_file=qor_standard.txt
2328
# Pass requirements
2429
pass_requirements_file=pass_requirements.txt
2530

26-
script_params=-starting_stage vpr --max_router_iterations 500 --routing_failure_predictor off --router_high_fanout_threshold 1000 --constant_net_method route --route_chan_width 500 --router_heap bucket --clock_modeling route --place_delta_delay_matrix_calculation_method dijkstra --place_delay_model delta_override --router_lookahead extended_map --check_route quick --strict_checks off --allow_dangling_combinational_nodes on --disable_errors check_unbuffered_edges:check_route --congested_routing_iteration_threshold 0.8 --incremental_reroute_delay_ripup off --base_cost_type delay_normalized_length_bounded --bb_factor 10 --initial_pres_fac 4.0 --check_rr_graph off --read_rr_graph ../../../../rr_graph_xc7a50t_test.rr_graph.real.bin --read_router_lookahead ../../../../rr_graph_xc7a50t_test.lookahead.bin --read_placement_delay_lookup ../../../../rr_graph_xc7a50t_test.place_delay.bin
31+
script_params=-starting_stage vpr --max_router_iterations 500 --routing_failure_predictor off --router_high_fanout_threshold 1000 --constant_net_method route --route_chan_width 500 --router_heap bucket --clock_modeling route --place_delta_delay_matrix_calculation_method dijkstra --place_delay_model delta_override --router_lookahead extended_map --check_route quick --strict_checks off --allow_dangling_combinational_nodes on --disable_errors check_unbuffered_edges:check_route --congested_routing_iteration_threshold 0.8 --incremental_reroute_delay_ripup off --base_cost_type delay_normalized_length_bounded --bb_factor 10 --initial_pres_fac 4.0 --check_rr_graph off

0 commit comments

Comments
 (0)