Skip to content

Commit 0bfc909

Browse files
error out when simple lookahead is used with a 3-d arch
1 parent 1b799d7 commit 0bfc909

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

vpr/src/route/router_lookahead/router_lookahead_simple.cpp

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ std::pair<float, float> SimpleLookahead::get_expected_delay_and_cong(RRNodeId fr
6767

6868
e_rr_type from_type = rr_graph.node_type(from_node);
6969
util::Cost_Entry cost_entry(0, 0);
70-
if (is_chanxy(from_type) || is_chanz(from_type)) {
70+
if (is_chanxy(from_type)) {
7171
// TODO: handle CHANZ nodes
7272
int from_layer_num = rr_graph.node_layer_low(from_node);
7373
int to_layer_num = rr_graph.node_layer_low(to_node);
@@ -94,10 +94,16 @@ std::pair<float, float> SimpleLookahead::get_expected_delay_and_cong(RRNodeId fr
9494
}
9595

9696
void SimpleLookahead::read(const std::string& file) {
97+
const size_t num_layers = g_vpr_ctx.device().grid.get_num_layers();
98+
VTR_ASSERT_MSG(num_layers == 1, "Simple router look-ahead does not support 3-d architectures.");
99+
97100
read_router_lookahead(file);
98101
}
99102

100103
void SimpleLookahead::write(const std::string& file) const {
104+
const size_t num_layers = g_vpr_ctx.device().grid.get_num_layers();
105+
VTR_ASSERT_MSG(num_layers == 1, "Simple router look-ahead does not support 3-d architectures.");
106+
101107
if (vtr::check_file_name_extension(file, ".csv")) {
102108
std::vector<int> simple_cost_map_size(simple_cost_map.ndims());
103109
for (size_t i = 0; i < simple_cost_map.ndims(); ++i) {

0 commit comments

Comments
 (0)