Skip to content

Commit 7597c28

Browse files
authored
Merge pull request #2411 from verilog-to-routing/par_router3_1
Improved parallel router: add NetlistRouter
2 parents ce30051 + 7a323de commit 7597c28

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

61 files changed

+3468
-4557
lines changed

utils/route_diag/src/main.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
#include "router_delay_profiling.h"
3434
#include "route_tree.h"
3535
#include "route_common.h"
36-
#include "route_timing.h"
36+
#include "route_net.h"
3737
#include "route_export.h"
3838
#include "rr_graph.h"
3939
#include "rr_graph2.h"
@@ -124,8 +124,7 @@ static void do_one_route(const Netlist<>& net_list,
124124
cost_params,
125125
bounding_box,
126126
router_stats,
127-
conn_params,
128-
true);
127+
conn_params);
129128

130129
if (found_path) {
131130
VTR_ASSERT(cheapest.index == sink_node);

vpr/src/base/SetupVPR.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -481,6 +481,7 @@ static void SetupRouterOpts(const t_options& Options, t_router_opts* RouterOpts)
481481
RouterOpts->generate_rr_node_overuse_report = Options.generate_rr_node_overuse_report;
482482
RouterOpts->flat_routing = Options.flat_routing;
483483
RouterOpts->has_choking_spot = Options.has_choking_spot;
484+
RouterOpts->with_timing_analysis = Options.timing_analysis;
484485
}
485486

486487
static void SetupAnnealSched(const t_options& Options,

vpr/src/base/place_and_route.cpp

Lines changed: 28 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
#include "place.h"
2121
#include "read_place.h"
2222
#include "read_route.h"
23+
#include "route.h"
2324
#include "route_export.h"
2425
#include "draw.h"
2526
#include "stats.h"
@@ -191,19 +192,19 @@ int binary_search_place_and_route(const Netlist<>& placement_net_list,
191192
arch->num_directs,
192193
false);
193194
}
194-
success = try_route(router_net_list,
195-
current,
196-
router_opts,
197-
analysis_opts,
198-
det_routing_arch, segment_inf,
199-
net_delay,
200-
timing_info,
201-
delay_calc,
202-
arch->Chans,
203-
arch->Directs,
204-
arch->num_directs,
205-
(attempt_count == 0) ? ScreenUpdatePriority::MAJOR : ScreenUpdatePriority::MINOR,
206-
is_flat);
195+
success = route(router_net_list,
196+
current,
197+
router_opts,
198+
analysis_opts,
199+
det_routing_arch, segment_inf,
200+
net_delay,
201+
timing_info,
202+
delay_calc,
203+
arch->Chans,
204+
arch->Directs,
205+
arch->num_directs,
206+
(attempt_count == 0) ? ScreenUpdatePriority::MAJOR : ScreenUpdatePriority::MINOR,
207+
is_flat);
207208

208209
attempt_count++;
209210
fflush(stdout);
@@ -331,19 +332,20 @@ int binary_search_place_and_route(const Netlist<>& placement_net_list,
331332
false);
332333
}
333334

334-
success = try_route(router_net_list,
335-
current,
336-
router_opts,
337-
analysis_opts,
338-
det_routing_arch, segment_inf,
339-
net_delay,
340-
timing_info,
341-
delay_calc,
342-
arch->Chans,
343-
arch->Directs,
344-
arch->num_directs,
345-
ScreenUpdatePriority::MINOR,
346-
is_flat);
335+
success = route(router_net_list,
336+
current,
337+
router_opts,
338+
analysis_opts,
339+
det_routing_arch,
340+
segment_inf,
341+
net_delay,
342+
timing_info,
343+
delay_calc,
344+
arch->Chans,
345+
arch->Directs,
346+
arch->num_directs,
347+
ScreenUpdatePriority::MINOR,
348+
is_flat);
347349

348350
if (success && Fc_clipped == false) {
349351
final = current;

vpr/src/base/read_options.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2986,8 +2986,6 @@ void set_conditional_defaults(t_options& args) {
29862986
*/
29872987
//Base cost type
29882988
if (args.base_cost_type.provenance() != Provenance::SPECIFIED) {
2989-
VTR_ASSERT(args.RouterAlgorithm == TIMING_DRIVEN || args.RouterAlgorithm == PARALLEL);
2990-
29912989
if (args.RouteType == DETAILED) {
29922990
if (args.timing_analysis) {
29932991
args.base_cost_type.set(DELAY_NORMALIZED_LENGTH, Provenance::INFERRED);

vpr/src/base/vpr_api.cpp

Lines changed: 19 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@
5353
#include "pb_type_graph.h"
5454
#include "route_common.h"
5555
#include "timing_place_lookup.h"
56+
#include "route.h"
5657
#include "route_export.h"
5758
#include "vpr_api.h"
5859
#include "read_sdc.h"
@@ -61,9 +62,9 @@
6162
#include "lb_type_rr_graph.h"
6263
#include "read_activity.h"
6364
#include "net_delay.h"
64-
#include "AnalysisDelayCalculator.h"
6565
#include "concrete_timing_info.h"
6666
#include "netlist_writer.h"
67+
#include "AnalysisDelayCalculator.h"
6768
#include "RoutingDelayCalculator.h"
6869
#include "check_route.h"
6970
#include "constant_nets.h"
@@ -367,7 +368,6 @@ bool vpr_flow(t_vpr_setup& vpr_setup, t_arch& arch) {
367368
}
368369

369370
#ifdef VPR_USE_TBB
370-
371371
/* Set this here, because tbb::global_control doesn't control anything once it's out of scope
372372
* (contrary to the name). */
373373
tbb::global_control c(tbb::global_control::max_allowed_parallelism, vpr_setup.num_workers);
@@ -805,10 +805,11 @@ RouteStatus vpr_route_flow(const Netlist<>& net_list,
805805
std::shared_ptr<RoutingDelayCalculator> routing_delay_calc = nullptr;
806806
if (vpr_setup.Timing.timing_analysis_enabled) {
807807
auto& atom_ctx = g_vpr_ctx.atom();
808-
809808
routing_delay_calc = std::make_shared<RoutingDelayCalculator>(atom_ctx.nlist, atom_ctx.lookup, net_delay, is_flat);
810-
811809
timing_info = make_setup_hold_timing_info(routing_delay_calc, router_opts.timing_update_type);
810+
} else {
811+
/* No delay calculator (segfault if the code calls into it) and wirelength driven routing */
812+
timing_info = make_constant_timing_info(0);
812813
}
813814

814815
if (router_opts.doRouting == STAGE_DO) {
@@ -922,20 +923,20 @@ RouteStatus vpr_route_fixed_W(const Netlist<>& net_list,
922923
VPR_FATAL_ERROR(VPR_ERROR_ROUTE, "Fixed channel width must be specified when routing at fixed channel width (was %d)", fixed_channel_width);
923924
}
924925
bool status = false;
925-
status = try_route(net_list,
926-
fixed_channel_width,
927-
vpr_setup.RouterOpts,
928-
vpr_setup.AnalysisOpts,
929-
&vpr_setup.RoutingArch,
930-
vpr_setup.Segments,
931-
net_delay,
932-
timing_info,
933-
delay_calc,
934-
arch.Chans,
935-
arch.Directs,
936-
arch.num_directs,
937-
ScreenUpdatePriority::MAJOR,
938-
is_flat);
926+
status = route(net_list,
927+
fixed_channel_width,
928+
vpr_setup.RouterOpts,
929+
vpr_setup.AnalysisOpts,
930+
&vpr_setup.RoutingArch,
931+
vpr_setup.Segments,
932+
net_delay,
933+
timing_info,
934+
delay_calc,
935+
arch.Chans,
936+
arch.Directs,
937+
arch.num_directs,
938+
ScreenUpdatePriority::MAJOR,
939+
is_flat);
939940

940941
return RouteStatus(status, fixed_channel_width);
941942
}

vpr/src/base/vpr_types.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1449,6 +1449,8 @@ struct t_router_opts {
14491449
bool flat_routing;
14501450
bool has_choking_spot;
14511451

1452+
bool with_timing_analysis;
1453+
14521454
// Options related to rr_node reordering, for testing and possible cache optimization
14531455
e_rr_node_reorder_algorithm reorder_rr_graph_nodes_algorithm = DONT_REORDER;
14541456
int reorder_rr_graph_nodes_threshold = 0;

vpr/src/draw/draw.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@
8686
# endif
8787

8888
# include "rr_graph.h"
89-
# include "route_util.h"
89+
# include "route_utilization.h"
9090
# include "place_macro.h"
9191
# include "buttons.h"
9292
# include "draw_rr.h"

vpr/src/draw/draw_basic.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@
6060
# endif
6161

6262
# include "rr_graph.h"
63-
# include "route_util.h"
63+
# include "route_utilization.h"
6464
# include "place_macro.h"
6565
# include "buttons.h"
6666

vpr/src/draw/draw_rr.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
# include "manual_moves.h"
4444

4545
# include "rr_graph.h"
46-
# include "route_util.h"
46+
# include "route_utilization.h"
4747
# include "place_macro.h"
4848
# include "buttons.h"
4949

vpr/src/draw/draw_rr_edges.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
# include "manual_moves.h"
4444

4545
# include "rr_graph.h"
46-
# include "route_util.h"
46+
# include "route_utilization.h"
4747
# include "place_macro.h"
4848
# include "buttons.h"
4949

0 commit comments

Comments
 (0)