Skip to content

Commit 648413c

Browse files
committed
[vpr][rr_graph] remove flat router parameter from vpr_create_device
1 parent 53b0cad commit 648413c

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

vpr/src/base/vpr_api.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -384,9 +384,7 @@ bool vpr_flow(t_vpr_setup& vpr_setup, t_arch& arch) {
384384
}
385385
}
386386

387-
// For the time being, we decided to create the flat graph after placement is done. Thus, the is_flat parameter for this function
388-
//, since it is called before routing, should be false.
389-
vpr_create_device(vpr_setup, arch, false);
387+
vpr_create_device(vpr_setup, arch);
390388

391389
// TODO: Placer still assumes that cluster net list is used - graphics can not work with flat routing yet
392390
vpr_init_graphics(vpr_setup, arch, false);
@@ -449,7 +447,7 @@ bool vpr_flow(t_vpr_setup& vpr_setup, t_arch& arch) {
449447
return route_status.success();
450448
}
451449

452-
void vpr_create_device(t_vpr_setup& vpr_setup, const t_arch& arch, bool is_flat) {
450+
void vpr_create_device(t_vpr_setup& vpr_setup, const t_arch& arch) {
453451
vtr::ScopedStartFinishTimer timer("Create Device");
454452
vpr_create_device_grid(vpr_setup, arch);
455453

@@ -458,7 +456,9 @@ void vpr_create_device(t_vpr_setup& vpr_setup, const t_arch& arch, bool is_flat)
458456
vpr_setup_noc(vpr_setup, arch);
459457

460458
if (vpr_setup.PlacerOpts.place_chan_width != NO_FIXED_CHANNEL_WIDTH) {
461-
vpr_create_rr_graph(vpr_setup, arch, vpr_setup.PlacerOpts.place_chan_width, is_flat);
459+
// The RR graph built by this function should contain only the intra-cluster resources.
460+
// If the flat router is used, additional resources are added when routing begins.
461+
vpr_create_rr_graph(vpr_setup, arch, vpr_setup.PlacerOpts.place_chan_width, false);
462462
}
463463
}
464464

vpr/src/base/vpr_api.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ void vpr_analysis(const Netlist<>& net_list,
138138
/* Device creating */
139139

140140
///@brief Create the device (grid + rr graph)
141-
void vpr_create_device(t_vpr_setup& vpr_setup, const t_arch& Arch, bool is_flat);
141+
void vpr_create_device(t_vpr_setup& vpr_setup, const t_arch& Arch);
142142

143143
///@brief Create the device grid
144144
void vpr_create_device_grid(const t_vpr_setup& vpr_setup, const t_arch& Arch);

vpr/test/test_vpr.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ TEST_CASE("read_rr_graph_metadata", "[vpr]") {
132132
vpr_init(sizeof(argv) / sizeof(argv[0]), argv,
133133
&options, &vpr_setup, &arch);
134134
vpr_setup.RouterOpts.read_rr_edge_metadata = true;
135-
vpr_create_device(vpr_setup, arch, false);
135+
vpr_create_device(vpr_setup, arch);
136136

137137
const auto& device_ctx = g_vpr_ctx.device();
138138
auto& mutable_device_ctx = g_vpr_ctx.mutable_device();
@@ -195,7 +195,7 @@ TEST_CASE("read_rr_graph_metadata", "[vpr]") {
195195
vpr_init(sizeof(argv) / sizeof(argv[0]), argv,
196196
&options, &vpr_setup, &arch);
197197
vpr_setup.RouterOpts.read_rr_edge_metadata = true;
198-
vpr_create_device(vpr_setup, arch, false);
198+
vpr_create_device(vpr_setup, arch);
199199

200200
const auto& device_ctx = g_vpr_ctx.device();
201201

0 commit comments

Comments
 (0)