-
Notifications
You must be signed in to change notification settings - Fork 424
RR graph generation directory #3050
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
+801
−772
Merged
Changes from all commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
302efd4
add rr_graph_genearion directory
soheilshahrouz de24708
Merge branch 'temp_fix_rr_node_lookup_xy' into temp_rr_graph_gen_dir
soheilshahrouz 0cb4c48
add rr_node_indices.cpp/.h
soheilshahrouz 7b9c226
add doxygen comment for load_chan_rr_indices()
soheilshahrouz c630899
Merge remote-tracking branch 'origin/master' into temp_rr_graph_gen_dir
soheilshahrouz 10722fb
Merge branch 'master' into temp_rr_graph_gen_dir
soheilshahrouz c12350d
make is_io_type() a member function of t_physical_tile_type
soheilshahrouz 490740e
replace calls to is_io_type() with t_physical_tile_type::is_io()
soheilshahrouz 2365150
make format
soheilshahrouz ee82313
inline t_physical_tile_type::is_io()
soheilshahrouz d83b07c
add doxygen comments for alloc_and_load_tile_rr_node_indices()
soheilshahrouz 2c47c52
document alloc_and_load_rr_node_indices() arguments
soheilshahrouz 1681fa1
made a few function operating on t_pb_type its member functions
soheilshahrouz File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
598 changes: 2 additions & 596 deletions
598
vpr/src/route/rr_graph2.cpp → ...c/route/rr_graph_generation/rr_graph2.cpp
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,88 @@ | ||
#pragma once | ||
|
||
#include "rr_graph_builder.h" | ||
#include "rr_graph_view.h" | ||
#include "device_grid.h" | ||
#include "rr_types.h" | ||
#include "rr_graph_type.h" | ||
#include "rr_graph_utils.h" | ||
#include "clustered_netlist_fwd.h" | ||
|
||
/** | ||
* @brief Allocates and populates data structures for efficient rr_node index lookups. | ||
* | ||
* This function sets up the `rr_node_indices` structure, which maps a physical location | ||
* and type to the index of the first corresponding rr_node. | ||
soheilshahrouz marked this conversation as resolved.
Show resolved
Hide resolved
|
||
* | ||
* @param rr_graph_builder Reference to the RRGraphBuilder used to construct and populate RR node spatial lookups. | ||
* @param nodes_per_chan Specifies the maximum number of routing tracks per channel in the x and y directions. | ||
* @param grid The device grid representing the physical layout of tiles in the FPGA fabric. | ||
* @param index Pointer to the global RR node index counter; incremented as new RR nodes are assigned. | ||
* @param chan_details_x Channel details describing segment and track properties for CHANX (horizontal) routing tracks. | ||
* @param chan_details_y Channel details describing segment and track properties for CHANY (vertical) routing tracks. | ||
*/ | ||
void alloc_and_load_rr_node_indices(RRGraphBuilder& rr_graph_builder, | ||
const t_chan_width& nodes_per_chan, | ||
const DeviceGrid& grid, | ||
int* index, | ||
const t_chan_details& chan_details_x, | ||
const t_chan_details& chan_details_y); | ||
|
||
/** | ||
* @brief Allocates extra nodes within the RR graph to support 3D custom switch blocks for multi-die FPGAs | ||
* | ||
* @param rr_graph_builder RRGraphBuilder data structure which allows data modification on a routing resource graph | ||
* @param nodes_per_chan number of tracks per channel (x, y) | ||
* @param grid The device grid representing the physical layout of tiles in the FPGA fabric. | ||
* @param extra_nodes_per_switchblock keeps how many extra length-0 CHANX node is required for each unique (x,y) location within the grid. | ||
* Number of these extra nodes are exactly the same for all layers. Hence, we only keep it for one layer. ([0..grid.width-1][0..grid.height-1) | ||
* @param index Pointer to the global RR node index counter; incremented as new RR nodes are assigned. | ||
*/ | ||
void alloc_and_load_inter_die_rr_node_indices(RRGraphBuilder& rr_graph_builder, | ||
const t_chan_width& nodes_per_chan, | ||
const DeviceGrid& grid, | ||
const vtr::NdMatrix<int, 2>& extra_nodes_per_switchblock, | ||
int* index); | ||
|
||
/** | ||
* @brief Allocates and loads RR node indices for a specific tile. | ||
* | ||
* This function assigns RR node IDs to all classes (SOURCE/SINK) and pins (IPIN/OPIN) | ||
* associated with a given physical tile at a specific grid location and layer. | ||
* It is primarily used in scenarios where a standalone tile's routing resources | ||
* need to be initialized independently. | ||
* | ||
* @param rr_graph_builder Reference to the RR graph builder with spatial lookup. | ||
* @param physical_tile Pointer to the physical tile type being processed. | ||
* @param layer Layer index of the tile in the device grid. | ||
* @param x X-coordinate of the tile's root position in the grid. | ||
* @param y Y-coordinate of the tile's root position in the grid. | ||
* @param num_rr_nodes Pointer to the global RR node index counter (will be incremented). | ||
*/ | ||
void alloc_and_load_tile_rr_node_indices(RRGraphBuilder& rr_graph_builder, | ||
soheilshahrouz marked this conversation as resolved.
Show resolved
Hide resolved
|
||
t_physical_tile_type_ptr physical_tile, | ||
int layer, | ||
int x, | ||
int y, | ||
int* num_rr_nodes); | ||
|
||
void alloc_and_load_intra_cluster_rr_node_indices(RRGraphBuilder& rr_graph_builder, | ||
const DeviceGrid& grid, | ||
const vtr::vector<ClusterBlockId, t_cluster_pin_chain>& pin_chains, | ||
const vtr::vector<ClusterBlockId, std::unordered_set<int>>& pin_chains_num, | ||
int* index); | ||
|
||
/** | ||
* Validate the node look-up matches all the node-level information | ||
* in the storage of a routing resource graph | ||
* This function will check the following aspects: | ||
* - The type of each node matches its type that is indexed in the node look-up | ||
* - For bounding box (xlow, ylow, xhigh, yhigh) of each node is indexable in the node look-up | ||
* - The number of unique indexable nodes in the node look up matches the number of nodes in the storage | ||
* This ensures that every node in the storage is indexable and there are no hidden nodes in the look-up | ||
*/ | ||
bool verify_rr_node_indices(const DeviceGrid& grid, | ||
const RRGraphView& rr_graph, | ||
const vtr::vector<RRIndexedDataId, t_rr_indexed_data>& rr_indexed_data, | ||
const t_rr_graph_storage& rr_nodes, | ||
bool is_flat); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.