File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -118,7 +118,8 @@ TEST_CASE("test_add_link", "[vpr_noc]") {
118
118
// testing datastructure
119
119
NocStorage test_noc;
120
120
121
- int total_num_of_links = NUM_OF_ROUTERS * NOC_CONNECTIVITY;
121
+ // keeps track of the number of links created
122
+ int total_num_of_links = 0 ;
122
123
123
124
// noc router stuff (we need routers before being able to add links)
124
125
int router_id = 0 ;
@@ -150,6 +151,8 @@ TEST_CASE("test_add_link", "[vpr_noc]") {
150
151
151
152
// add the link to the NoC
152
153
test_noc.add_link (source, sink);
154
+
155
+ total_num_of_links++;
153
156
}
154
157
}
155
158
}
@@ -159,9 +162,9 @@ TEST_CASE("test_add_link", "[vpr_noc]") {
159
162
link_id = (NocLinkId)link_number;
160
163
161
164
// verify the link by checking its properties
162
- REQUIRE (golden_set[link_number].get_source_router () == test_noc.get_noc_link_source_router (link_id));
165
+ REQUIRE (test_noc. get_noc_router_id ( golden_set[link_number].get_source_router ()) == test_noc.get_noc_router_id (test_noc. get_noc_link_source_router (link_id) ));
163
166
164
- REQUIRE (golden_set[link_number].get_sink_router () == test_noc.get_noc_link_sink_router (link_id));
167
+ REQUIRE (test_noc. get_noc_router_id ( golden_set[link_number].get_sink_router ()) == test_noc.get_noc_router_id (test_noc. get_noc_link_sink_router (link_id) ));
165
168
}
166
169
}
167
170
TEST_CASE (" test_router_link_list" , " [vpr_noc]" ) {
You can’t perform that action at this time.
0 commit comments