Skip to content

Commit 8255ada

Browse files
authored
Merge pull request #3132 from verilog-to-routing/skip_netlist_sync
Skip syncing netlist to routing resutls
2 parents 8824298 + e48162d commit 8255ada

File tree

5 files changed

+25
-10
lines changed

5 files changed

+25
-10
lines changed

vpr/src/base/SetupVPR.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -720,6 +720,7 @@ static void SetupAnalysisOpts(const t_options& Options, t_analysis_opts& analysi
720720

721721
analysis_opts.timing_update_type = Options.timing_update_type;
722722
analysis_opts.write_timing_summary = Options.write_timing_summary;
723+
analysis_opts.skip_sync_clustering_and_routing_results = Options.skip_sync_clustering_and_routing_results;
723724
analysis_opts.generate_net_timing_report = Options.generate_net_timing_report;
724725
}
725726

vpr/src/base/read_options.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3095,6 +3095,13 @@ argparse::ArgumentParser create_arg_parser(const std::string& prog_name, t_optio
30953095
.help("Writes implemented design final timing summary to the specified JSON, XML or TXT file.")
30963096
.show_in(argparse::ShowIn::HELP_ONLY);
30973097

3098+
analysis_grp.add_argument<bool, ParseOnOff>(args.skip_sync_clustering_and_routing_results, "--skip_sync_clustering_and_routing_results")
3099+
.help(
3100+
"Select to skip the synchronization on clustering results based on routing optimization results."
3101+
"Note that when this sync-up is disabled, clustering results may be wrong (leading to incorrect bitstreams)!")
3102+
.default_value("off")
3103+
.show_in(argparse::ShowIn::HELP_ONLY);
3104+
30983105
analysis_grp.add_argument<bool, ParseOnOff>(args.generate_net_timing_report, "--generate_net_timing_report")
30993106
.help(
31003107
"Generates a net timing report in CSV format, reporting the delay and slack\n"

vpr/src/base/read_options.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -273,6 +273,7 @@ struct t_options {
273273
argparse::ArgValue<e_post_synth_netlist_unconn_handling> post_synth_netlist_unconn_output_handling;
274274
argparse::ArgValue<bool> post_synth_netlist_module_parameters;
275275
argparse::ArgValue<std::string> write_timing_summary;
276+
argparse::ArgValue<bool> skip_sync_clustering_and_routing_results;
276277
argparse::ArgValue<bool> generate_net_timing_report;
277278
};
278279

vpr/src/base/vpr_api.cpp

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1426,30 +1426,35 @@ bool vpr_analysis_flow(const Netlist<>& net_list,
14261426
VTR_LOG("*****************************************************************************************\n");
14271427
}
14281428

1429-
/* If routing is successful, apply post-routing annotations
1429+
/* If routing is successful and users do not force to skip the sync-up,
1430+
* - apply post-routing annotations
14301431
* - apply logic block pin fix-up
14311432
*
14321433
* Note:
14331434
* - Turn on verbose output when users require verbose output
14341435
* for packer (default verbosity is set to 2 for compact logs)
14351436
*/
14361437
if (route_status.success()) {
1437-
if (is_flat) {
1438-
sync_netlists_to_routing_flat();
1438+
if (!analysis_opts.skip_sync_clustering_and_routing_results) {
1439+
if (is_flat) {
1440+
sync_netlists_to_routing_flat();
1441+
} else {
1442+
sync_netlists_to_routing(net_list,
1443+
g_vpr_ctx.device(),
1444+
g_vpr_ctx.mutable_atom(),
1445+
g_vpr_ctx.mutable_clustering(),
1446+
g_vpr_ctx.placement(),
1447+
vpr_setup.PackerOpts.pack_verbosity > 2);
1448+
}
14391449
} else {
1440-
sync_netlists_to_routing(net_list,
1441-
g_vpr_ctx.device(),
1442-
g_vpr_ctx.mutable_atom(),
1443-
g_vpr_ctx.mutable_clustering(),
1444-
g_vpr_ctx.placement(),
1445-
vpr_setup.PackerOpts.pack_verbosity > 2);
1450+
VTR_LOG_WARN("Synchronization between packing and routing results was not applied due to skip_sync_clustering_and_routing_results being set to true\n");
14461451
}
14471452

14481453
std::string post_routing_packing_output_file_name = vpr_setup.PackerOpts.output_file + ".post_routing";
14491454
write_packing_results_to_xml(Arch.architecture_id,
14501455
post_routing_packing_output_file_name.c_str());
14511456
} else {
1452-
VTR_LOG_WARN("Synchronization between packing and routing results is not applied due to illegal circuit implementation\n");
1457+
VTR_LOG_WARN("Synchronization between packing and routing results was not applied due to illegal circuit implementation\n");
14531458
}
14541459
VTR_LOG("\n");
14551460

vpr/src/base/vpr_types.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1352,6 +1352,7 @@ struct t_analysis_opts {
13521352
bool generate_net_timing_report;
13531353

13541354
e_timing_update_type timing_update_type;
1355+
bool skip_sync_clustering_and_routing_results;
13551356
};
13561357

13571358
/// Stores NoC specific options, when supplied as an input by the user

0 commit comments

Comments
 (0)