Skip to content

Commit bbaefca

Browse files
authored
Merge pull request #1899 from RapidSilicon/api_validate
Add a new API validate() to RRGraphBuilder
2 parents 61a4591 + d1c535d commit bbaefca

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

vpr/src/device/rr_graph_builder.h

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,15 @@ class RRGraphBuilder {
154154
return node_storage_.count_rr_switches(num_arch_switches, arch_switch_inf, arch_switch_fanins);
155155
}
156156

157+
/** brief Validate that edge data is partitioned correctly
158+
* @note This function is used to validate the correctness of the routing resource graph in terms
159+
* of graph attributes. Strongly recommend to call it when you finish the building a routing resource
160+
* graph. If you need more advance checks, which are related to architecture features, you should
161+
* consider to use the check_rr_graph() function or build your own check_rr_graph() function. */
162+
inline bool validate() const {
163+
return node_storage_.validate();
164+
}
165+
157166
/** @brief Init per node fan-in data. Should only be called after all edges have
158167
* been allocated.
159168
* @note
@@ -162,6 +171,7 @@ class RRGraphBuilder {
162171
inline void init_fan_in() {
163172
node_storage_.init_fan_in();
164173
}
174+
165175
/* -- Internal data storage -- */
166176
private:
167177
/* TODO: When the refactoring effort finishes,

0 commit comments

Comments
 (0)