Skip to content

Add a new API validate() to RRGraphBuilder #1899

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Nov 1, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions vpr/src/device/rr_graph_builder.h
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,15 @@ class RRGraphBuilder {
return node_storage_.count_rr_switches(num_arch_switches, arch_switch_inf, arch_switch_fanins);
}

/** brief Validate that edge data is partitioned correctly
* @note This function is used to validate the correctness of the routing resource graph in terms
* of graph attributes. Strongly recommend to call it when you finish the building a routing resource
* graph. If you need more advance checks, which are related to architecture features, you should
* consider to use the check_rr_graph() function or build your own check_rr_graph() function. */
inline bool validate() const {
return node_storage_.validate();
}

/** @brief Init per node fan-in data. Should only be called after all edges have
* been allocated.
* @note
Expand All @@ -144,6 +153,7 @@ class RRGraphBuilder {
inline void init_fan_in() {
node_storage_.init_fan_in();
}

/* -- Internal data storage -- */
private:
/* TODO: When the refactoring effort finishes,
Expand Down