Skip to content

Commit f1f9cc3

Browse files
saaramahmoudiSrivat97
authored andcommitted
update run and parse scripts for NoC regression tests
1 parent ae5f984 commit f1f9cc3

File tree

3 files changed

+22
-5
lines changed

3 files changed

+22
-5
lines changed

vtr_flow/parse/qor_config/qor_noc_spec.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@ total_wirelength;vpr.out;\s*Total wirelength:\s*(\d+)
33
total_runtime;vpr.out;The entire flow of VPR took (.*) seconds
44
min_chan_width;vpr.out;Best routing used a channel width factor of (\d+)
55
crit_path_delay;vpr.crit_path.out;Final critical path delay \(least slack\): (.*) ns
6-
NoC_agg_bandwidth;vpr.out;NoC Placement Costs. noc_aggregate_bandwidth_cost: (\d+)
7-
NoC_latency;vpr.out;NoC Placement Costs. noc_aggregate_bandwidth_cost: \d+, noc_latency_cost: (.*),
6+
NoC_agg_bandwidth;vpr.out;NoC Placement Costs. noc_aggregate_bandwidth_cost: (.*), noc_latency_cost: .*,
7+
NoC_latency;vpr.out;NoC Placement Costs. noc_aggregate_bandwidth_cost: .*, noc_latency_cost: (.*),

vtr_flow/scripts/python_libs/vtr/parse_vtr_task.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -209,6 +209,9 @@ def parse_task(config, config_jobs, flow_metrics_basename=FIRST_PARSE_FILE, alt_
209209
max_circuit_len = len("circuit")
210210
for job in config_jobs:
211211
work_dir = job.work_dir(get_latest_run_dir(find_task_dir(config, alt_tasks_dir)))
212+
job.parse_command()[0] = work_dir
213+
# job.second_parse_command()[0] = work_dir
214+
job.qor_parse_command()[0] = work_dir
212215
if job.parse_command():
213216
parse_filepath = str(PurePath(work_dir) / flow_metrics_basename)
214217
with open(parse_filepath, "w+") as parse_file:

vtr_flow/scripts/python_libs/vtr/task.py

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -497,12 +497,24 @@ def create_job(
497497
Create an individual job with the specified parameters
498498
"""
499499
param_string = "common" + (("_" + param.replace(" ", "_")) if param else "")
500-
for spec_char in [":", "<", ">", "|", "*", "?"]:
500+
501+
#remove any address-related characters that might be in the param_string
502+
#To avoid creating invalid URL path
503+
path_str = "../"
504+
if(path_str in param_string):
505+
param_string = param_string.replace("../","")
506+
param_string = param_string.replace('-','')
507+
circuit_2 = circuit.replace(".blif","")
508+
if(circuit_2 in param_string):
509+
ind = param_string.find(circuit_2)
510+
param_string = param_string[ind+len(circuit_2)+1:]
511+
512+
for spec_char in [":", "<", ">", "|", "*", "?","/","."]:
501513
# replaced to create valid URL path
502514
param_string = param_string.replace(spec_char, "_")
503515
if not param:
504516
param = "common"
505-
517+
506518
expected_min_w = ret_expected_min_w(circuit, arch, golden_results, param)
507519
expected_min_w = (
508520
int(expected_min_w * args.minw_hint_factor)
@@ -525,7 +537,7 @@ def create_job(
525537
]
526538
current_parse_cmd.insert(0, run_dir + "/{}".format(load_script_param(param)))
527539
current_second_parse_cmd = second_parse_cmd.copy() if second_parse_cmd else None
528-
540+
529541
if config.second_parse_file:
530542
current_second_parse_cmd += [
531543
"arch={}".format(arch),
@@ -544,8 +556,10 @@ def create_job(
544556
current_qor_parse_command.insert(0, run_dir + "/{}".format(load_script_param(param)))
545557
current_cmd = cmd.copy()
546558
current_cmd += ["-temp_dir", run_dir + "/{}".format(param_string)]
559+
547560
if param_string != "common":
548561
current_cmd += param.split(" ")
562+
549563
return Job(
550564
config.task_name,
551565
arch,

0 commit comments

Comments
 (0)