Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
195 commits
Select commit Hold shift + click to select a range
76d8496
[cli] add crr cli parameters
amin1377 Oct 14, 2025
a1b7cc9
[setup_vpr] add structs for crrOpts
amin1377 Oct 14, 2025
8f30644
[utils] pass CRROpts to alloc_routing_structs
amin1377 Oct 14, 2025
f18cc17
[place] padd crropts to relevant funcitons in placement
amin1377 Oct 14, 2025
81b4cc1
[vpr][types] add t_crr_opts
amin1377 Oct 14, 2025
1500928
[vpr][base] pass CRROpts to relevant base functions
amin1377 Oct 14, 2025
4bb1fbd
[vpr][route] pass crr_opts to relevant routing functions
amin1377 Oct 14, 2025
3b8da60
[vpr][route] pass crr_opts to build_tileable_unidir_rr_graph
amin1377 Oct 14, 2025
5bdab0a
[libs][external] add openXLSX
amin1377 Oct 14, 2025
b9f40e6
[cli] fix default values for crr params
amin1377 Oct 14, 2025
664ca84
[vpr][route][tileable] call crr generator if sb_maps is not empty
amin1377 Oct 14, 2025
3f1518b
[libs][external] add OpenXLSX to external libs cmake
amin1377 Oct 14, 2025
c8c964e
[vpr][route][rr_graph] include crr_graph_edge_builder in tileable rr …
amin1377 Oct 14, 2025
b196045
[vpr][route][crr] add df processor
amin1377 Oct 15, 2025
9a57b25
[vpr][route][crr] add init impl for crr_graph_edge_builder
amin1377 Oct 15, 2025
7fa8969
[vpr][cmake] add openXLSX
amin1377 Oct 15, 2025
e7bd77e
[vpr][route][rr_graph] fix warnings
amin1377 Oct 15, 2025
1d16bf3
[libs][external] add yaml-cpp
amin1377 Oct 15, 2025
afe9b9c
[cmake] add yaml-cpp to cmake files
amin1377 Oct 15, 2025
2f361fd
[crr][switch_block_manager] add header file
amin1377 Oct 20, 2025
7ea7740
[vpr][route][crr] add pattern matcher
amin1377 Oct 20, 2025
d2b81e6
[vpr][route][crr][switch_block_manager] add missing libs
amin1377 Oct 20, 2025
6a05626
[vpr][route][crr] rename pattern_match to crr_pattern_matcher
amin1377 Oct 20, 2025
7343fce
[vpr][route][crr] add switch block mng impl
amin1377 Oct 20, 2025
7c03721
[vpr][route][crr] add crr.h/cpp
amin1377 Oct 20, 2025
835f5e2
[vpr][route][crr] add crr_common.h
amin1377 Oct 20, 2025
d2619f8
[vpr][route][crr] add xml_handler.h/cpp
amin1377 Oct 20, 2025
7f32380
[vpr][route][crr] fix compile problems with xml_handler
amin1377 Oct 20, 2025
d38f924
[vpr][route][crr] add node_lookup_mng
amin1377 Oct 20, 2025
9164048
[vpr][route][crr] add crr thread pool
amin1377 Oct 20, 2025
2af1e09
[vpr][route][crr] add crr_generator
amin1377 Oct 20, 2025
01eca68
[vpr][route][crr] add crr_conneciton_builder
amin1377 Oct 20, 2025
d942d0e
[vpr][route][crr] remove switch manager
amin1377 Oct 20, 2025
14aa81b
[vpr][route][crr] remove const vars from df processor
amin1377 Oct 20, 2025
6375030
[vpr][route][crr] fix compile failures
amin1377 Oct 20, 2025
08510ff
[vpr][route][crr] fix vtr_log_error
amin1377 Oct 20, 2025
343a345
[vpr][route][crr] fix log messages
amin1377 Oct 20, 2025
1bdb9b2
[vpr][route][crr] replate throw with vtr_log_error
amin1377 Oct 20, 2025
4986263
[vpr][route][crr] fix file name display
amin1377 Oct 21, 2025
549c5b4
temp: add code to just build crr and step out
amin1377 Oct 21, 2025
1fe6d46
[vpr][route][rr_graph_gen] fix log msg ending
amin1377 Oct 21, 2025
ea02eed
[libs][external] remove openxlsx
amin1377 Oct 23, 2025
8908e31
[Cmake] replace openxlsx with xlnt
amin1377 Oct 23, 2025
341ffed
[vpr][route][crr] remove update vpr xml function
amin1377 Oct 23, 2025
bc4bc0b
[vpr][route][crr] use xlnt instead of openxlsx in data frame processor
amin1377 Oct 23, 2025
bedddcd
[vpr][route][crr] deduct 2 from grid width and height
amin1377 Oct 23, 2025
099b81d
[vpr][route][crr] fix format_float_value in xml_handler
amin1377 Oct 23, 2025
78c2581
[vpr][route][crr] print newly added switches
amin1377 Oct 23, 2025
852890a
[vpr][route][crr] add custom_rr_graph_builder file
amin1377 Oct 23, 2025
d93536c
[CLI][CRR] remove preserve_opin/ipin and replace it with preserve pin…
amin1377 Oct 23, 2025
fc38a9f
[vpr][route][crr] remove custom_rr_graph_builder
amin1377 Oct 23, 2025
84cc0b4
[vpr][route][rr_graph] remove temp code
amin1377 Oct 23, 2025
8215eee
[vpr][route][crr] remove if condition for crr
amin1377 Oct 23, 2025
008a4e2
[vpr][route][crr] pass crr_opts to build_rr_graph_regular_edges
amin1377 Oct 23, 2025
8975125
[vpr][route][crr] add get_connection_builder to crrgenerator
amin1377 Oct 24, 2025
3aaee29
make format
amin1377 Oct 24, 2025
327513e
[vpr][route][crr] fix const function issue in crr_connection_builder
amin1377 Oct 24, 2025
ae4ceef
[vpr][route][crr] fix a typo
amin1377 Oct 24, 2025
76789e7
[vpr][route][crr] use rrnodeid in crr connection builder
amin1377 Oct 24, 2025
91d1fc9
[vpr][route][crr] set NodeId to size_T
amin1377 Oct 25, 2025
c67bae0
[vpr][route][crr] fix node_lookup param to contain RRNoneId instead o…
amin1377 Oct 25, 2025
c895c31
[vpr][route][crr] use RRNodeId for node_lookup_manager
amin1377 Oct 25, 2025
9c9edfb
[vpr][route][crr] change nodeid to rrnodeid for connections class
amin1377 Oct 27, 2025
097ebdc
[vpr][route][crr] use rrnodeid in connection builder
amin1377 Oct 27, 2025
bdba300
[vpr][route][crr] pass RRSwitchId to graph builder
amin1377 Oct 27, 2025
d59ae52
[lib][rr_graph] remove node_tilable_track_nums_ from rr graph view
amin1377 Oct 27, 2025
67783be
[lib][rr_graph][builder] remove direct access to node_tilable_track_n…
amin1377 Oct 27, 2025
7bbec6c
[lib][rr_graph][storage] add node_tilable_track_nums_ API calls to gr…
amin1377 Oct 27, 2025
5c4aeca
[lib][rr_graph][io] remove redundant API call
amin1377 Oct 27, 2025
0803118
[rr_graph][view] update instances with new constructor call
amin1377 Oct 27, 2025
8278af7
[vpr][route][crr] update lookup maanger functions to use rr graph view
amin1377 Oct 27, 2025
60cc0e0
[lib][rr_graph][storage] pass node_offset to add_node_tilable_track_n…
amin1377 Oct 27, 2025
2dc929e
[libs][librrgraph][builder] calculate node offset before calling add_…
amin1377 Oct 27, 2025
6086a64
[vpr][route][crr] change function name to build_crr_gsb_track_to_trac…
amin1377 Oct 28, 2025
88afdce
[vpr][route][crr] change node type to e_rr_type in crr ds and remove …
amin1377 Oct 28, 2025
21998d9
[vpr][route][crr] use rr_graph to access loc in index_node
amin1377 Oct 28, 2025
44990a9
[vpr][route][crr] fix typing issues in crr_common
amin1377 Oct 28, 2025
fc88092
[vpr][route][crr] comment parts releated to switch in connection builder
amin1377 Oct 28, 2025
a393fbe
[vpr][route][crr] comment out parts not used in crr generator
amin1377 Oct 28, 2025
38ee748
[vpr][route][crr] use e_rr_type for node type in custom_rr_graph
amin1377 Oct 28, 2025
dae8bc6
[vpr][route][crr] update xml handler with e_rr_type
amin1377 Oct 28, 2025
3c2350a
[vpr][route][crr] add crr builder to tileable_rr_graph_edge_builder
amin1377 Oct 28, 2025
e3b345f
[vpr][route][crr] use size_t instead of coordinate in node_lookup_man…
amin1377 Oct 28, 2025
9f723a5
[lib][rr_graph][storage] check if node_tilable_track_nums_ is empty b…
amin1377 Oct 28, 2025
d064a15
[vpr][route][crr] add noexcept to some of the class construtors to fi…
amin1377 Oct 28, 2025
f9c1c66
[vpr][route][crr] change coordinate to size_t for for connection builder
amin1377 Oct 28, 2025
6883c93
[vpr][route][crr] cast coordinates returned by rr_graph to size_t
amin1377 Oct 28, 2025
6b4a95b
[lib][rr_graph][base] resize node_tilable_track_nums_ in relevant fun…
amin1377 Oct 28, 2025
10b0888
[lib][rr_graph][io] set tileable to true before loading graph
amin1377 Oct 28, 2025
7139c9e
[vpr][route][crr] init crr data strutures only if crr is created
amin1377 Oct 28, 2025
7ef33f1
make format
amin1377 Oct 28, 2025
fdeb013
Merge branch 'master' of https://github.com/verilog-to-routing/vtr-ve…
amin1377 Oct 28, 2025
6ab4258
[submodule] clone submodules recursively
amin1377 Oct 29, 2025
f14e6e0
[github] add fetch-depth to submodule
amin1377 Oct 29, 2025
2ba93e5
[submodule] remove xlnt
amin1377 Oct 29, 2025
1933857
[subtree] add xlnt to subtree config file
amin1377 Oct 29, 2025
ef41a0b
Squashed 'libs/EXTERNAL/xlnt/' content from commit 297b331435
amin1377 Oct 29, 2025
7e2c039
add xlnt as subtree
amin1377 Oct 29, 2025
d087834
[libs][external] add libstudxml
amin1377 Oct 29, 2025
d5a80f0
[github] don't clone submodules recursively
amin1377 Oct 29, 2025
b62eed4
[libs] remove libstudxml
amin1377 Oct 29, 2025
2d677ca
[lib][external][studxml] add libstudxml
amin1377 Oct 29, 2025
5d5133c
Merge branch 'master' of https://github.com/verilog-to-routing/vtr-ve…
amin1377 Oct 29, 2025
585ecaa
[libs][xlnt] add cstdint
amin1377 Oct 29, 2025
e3f0f28
[libs][xlnt] add cstdint
amin1377 Oct 29, 2025
61c3a21
[libs][xlnt] add cstdint
amin1377 Oct 29, 2025
ca34e03
[libs][xlnt] add cstdint
amin1377 Oct 29, 2025
c408a87
[vpr][route][crr] instantiate CRR vars before if block
amin1377 Oct 30, 2025
86698eb
[vpr][route][crr] fix life time of crr vars
amin1377 Oct 31, 2025
5b17dd1
Merge branch 'master' of https://github.com/verilog-to-routing/vtr-ve…
amin1377 Nov 3, 2025
fe8225c
[vpr][route][rr_graph] make rr_node_driver_switches const in build_rr…
amin1377 Nov 3, 2025
3952894
[vpr][route][crr] change connection's switch_id to delay_ps
amin1377 Nov 3, 2025
16e8ffe
[vpr][route][crr] set connections delay instead of switch id
amin1377 Nov 3, 2025
f85d1c6
[vpr][route][crr] add find_crr_switch_id to get switch id from delay
amin1377 Nov 3, 2025
4b438b9
[vpr][route][crr] move build_edges_for_one_tileable_rr_gsb to outside…
amin1377 Nov 3, 2025
e6fc757
[vpr][route][tileable] check whether track2track_map is empty
amin1377 Nov 3, 2025
e07bbd1
[vpr][route][crr] don't add crr connections for switch blocks on the …
amin1377 Nov 3, 2025
12e17a7
[vpr][route][crr] iterate over ipin/opin ds only if their size is big…
amin1377 Nov 3, 2025
1ce35ad
[vpr][route][crr] remove get_preserved_edge
amin1377 Nov 3, 2025
11d32fa
[vpr][base] adding back preserve ipin/opin
amin1377 Nov 3, 2025
88caeb5
[vpr][route][crr] use default ipin/opin connections based on parameters
amin1377 Nov 3, 2025
949e9a4
[vpr][route][crr] fix condition to build ipin/opin connections
amin1377 Nov 5, 2025
e2d0014
Merge branch 'master' of https://github.com/verilog-to-routing/vtr-ve…
amin1377 Nov 5, 2025
a6934c2
[vpr][route][crr] remove unused functions in crr_gen
amin1377 Nov 5, 2025
ca6fe30
[vpr][route][crr] remove thread pool
amin1377 Nov 6, 2025
219ab6e
Merge branch 'master' of https://github.com/verilog-to-routing/vtr-ve…
amin1377 Nov 6, 2025
3373b7d
Merge branch 'master' of https://github.com/verilog-to-routing/vtr-ve…
amin1377 Nov 12, 2025
dca5881
[vpr][route][crr] remove xml_handler
amin1377 Nov 12, 2025
6324b79
[vpr][route][crr] remove custom_rr_graph file since we no longer buil…
amin1377 Nov 12, 2025
e9d7a10
[vpr][route][crr] remove instances of removed parts
amin1377 Nov 12, 2025
7aff688
[vpr][route][crr] fix compile issues
amin1377 Nov 12, 2025
fca44b1
[vpr][route][crr] remove xlnt usage and replace it with csv
amin1377 Nov 12, 2025
b4d0a59
[subtree] remove xlnt
amin1377 Nov 12, 2025
83a3aef
[cmake] remove xlnt
amin1377 Nov 12, 2025
23f0dc8
[vpr][route][crr] remove double from acceptable values for cell
amin1377 Nov 13, 2025
c72e3c6
[lib][rr_graph] fix formatting
amin1377 Nov 14, 2025
998ba66
Add interposer crossing wire cutting
AmirhosseinPoolad Nov 6, 2025
2546789
Fix edge cutting
AmirhosseinPoolad Nov 10, 2025
21d5080
Fix integration with scatter-gather patterns
AmirhosseinPoolad Nov 11, 2025
72e8933
Add doxygen to interposer cut functions
AmirhosseinPoolad Nov 12, 2025
bc9a40a
Fix some code duplication issues
AmirhosseinPoolad Nov 12, 2025
b6f592a
Remove experimental interposer status from documentation
AmirhosseinPoolad Nov 12, 2025
349d672
Fix issue with interposers and 3D connection blocks
AmirhosseinPoolad Nov 12, 2025
e659e23
Address PR comments
AmirhosseinPoolad Nov 13, 2025
e9876b3
Change RR Graph warning enum to be clearer
AmirhosseinPoolad Nov 13, 2025
64ac05a
[vpr][route][rr_graph] fix formatting
amin1377 Nov 17, 2025
57837db
[libs][rr_graph] set T_linear for IPIN based on the most frequent swi…
amin1377 Nov 17, 2025
129fd88
[libs][rr_graph] print a warning if IPIN switch block doesn't match t…
amin1377 Nov 17, 2025
4dd6a63
[lib][rr_graph] add const identifier for const params passed to calcu…
amin1377 Nov 17, 2025
56796ca
Merge branch 'master' of https://github.com/verilog-to-routing/vtr-ve…
amin1377 Nov 17, 2025
f924fe4
Merge branch 'ipin_base_cost' of https://github.com/verilog-to-routin…
amin1377 Nov 17, 2025
ad08271
[cli] add remove dangling node to crr options
amin1377 Nov 17, 2025
7f0b02e
[lib][rr_graph] remove a redundant function
amin1377 Nov 17, 2025
2d6de4f
Address PR comments on RR Graph changes
AmirhosseinPoolad Nov 17, 2025
16f26ce
Add doxygen to interposer_cut.h
AmirhosseinPoolad Nov 17, 2025
ea396cd
Fix formatting
AmirhosseinPoolad Nov 17, 2025
4d95419
Add .clangd to gitignore
AmirhosseinPoolad Nov 17, 2025
615bd5a
[lib][rr_graph] initial impl for remove node
amin1377 Nov 17, 2025
511f89d
[libs][rr_graph] uniquify remove edges
amin1377 Nov 17, 2025
112a6c0
Merge branch 'rr_graph_interposer_cut' of https://github.com/verilog-…
amin1377 Nov 17, 2025
5bbf3d7
[lib][rr_graph] add comments + shrink rr graph node data structures
amin1377 Nov 17, 2025
dfc2a33
fix a typo
amin1377 Nov 17, 2025
ec0a8e5
[lib][rr_graph] remove node_tilable_track_nums_ from rr graph builder
amin1377 Nov 17, 2025
7817922
[lib][rr_graph] add node_tilable_track_nums_ to rr graph storage
amin1377 Nov 17, 2025
54ff743
[lib][rr_grpah] remove node_tileable_track_nums_ from rr_graph_view
amin1377 Nov 17, 2025
3da38b0
[lib][librrgraph] set tileable to true when reading rr graph from a f…
amin1377 Nov 17, 2025
dda1dd5
[libs][rrgraph] remove redundant function call
amin1377 Nov 17, 2025
de52b91
[vpr] fix instances of rr graph view
amin1377 Nov 17, 2025
e2cee0c
Make remove_edges use ranges
AmirhosseinPoolad Nov 17, 2025
4573aa9
Pass RRNodeIds by value
AmirhosseinPoolad Nov 17, 2025
6b39edc
Add newline to 2D scatter-gather comment
AmirhosseinPoolad Nov 17, 2025
0fc6d07
Rename interposer_cut to rr_graph_interposer
AmirhosseinPoolad Nov 17, 2025
dda2e43
Add static function declarations to rr_graph_interposer.cpp
AmirhosseinPoolad Nov 17, 2025
61ebf99
Add std::pair include
AmirhosseinPoolad Nov 17, 2025
561b5fb
Fix formatting issues
AmirhosseinPoolad Nov 17, 2025
b57b08f
Fix bug with checking if device has interposer cuts
AmirhosseinPoolad Nov 17, 2025
4830963
[lib][rr_graph] add remove_node header
amin1377 Nov 17, 2025
3b9f552
[lib][rr_graph] erase node_tilable_track_nums_ when removing a node
amin1377 Nov 17, 2025
29bfe3c
Merge branch 'remove_node' of https://github.com/verilog-to-routing/v…
amin1377 Nov 18, 2025
0c0f149
Unset partitioned_ flag in RR Graph remove edges
AmirhosseinPoolad Nov 18, 2025
a1859aa
[lib][rr_graph] fix merge conflict
amin1377 Nov 18, 2025
ef319d7
Improve RR Graph Interposer comments
AmirhosseinPoolad Nov 18, 2025
7d1e758
[vpr][route][crr] fix parse_csv_cell
amin1377 Nov 18, 2025
a94742a
[lib][rr_graph][rr_indexed] use avg ipin for t_linear when building R…
amin1377 Nov 19, 2025
a0e4de9
fix a typo
amin1377 Nov 19, 2025
006f22b
Merge branch 'ipin_base_cost' of https://github.com/verilog-to-routin…
amin1377 Nov 19, 2025
848820d
Merge branch 'rr_graph_interposer_cut' of https://github.com/verilog-…
amin1377 Nov 19, 2025
e264986
[vpr][route][rr_graph] remove redundant includes
amin1377 Nov 19, 2025
2aa56e2
[lib][rr_graph] remove data structures related to partioning edges fr…
amin1377 Nov 19, 2025
53490a8
[vpr][route][crr] add remove_dangling_chan_nodes
amin1377 Nov 19, 2025
91c8da5
[lib][rr_graph] remove unlock_storage from rr_graph_builder
amin1377 Nov 20, 2025
e888c7d
[lib][rr_graph][storage] return from remove_edges if parameter is empty
amin1377 Nov 20, 2025
3e839fb
[lib][rr_graph][storage] don't set edges_read_ in init_fan_in
amin1377 Nov 20, 2025
cd4ee33
[lib][rr_graph][storage] fix the bug in remove_nodes
amin1377 Nov 20, 2025
2701610
[vpr][route][crr] rebuild rr graph spatial lookup in remove_dangling_…
amin1377 Nov 20, 2025
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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -160,3 +160,4 @@ cmake-build-release
# Clangd
#
compile_commands.json
.clangd
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,6 @@
[submodule "libs/EXTERNAL/yosys-slang"]
path = libs/EXTERNAL/yosys-slang
url = https://github.com/povik/yosys-slang.git
[submodule "libs/EXTERNAL/yaml-cpp"]
path = libs/EXTERNAL/yaml-cpp
url = https://github.com/jbeder/yaml-cpp.git
3 changes: 1 addition & 2 deletions doc/src/arch/reference.rst
Original file line number Diff line number Diff line change
Expand Up @@ -589,7 +589,6 @@ Grid Layout Example

.. note:: Exactly one of the ``x`` or ``y`` attributes must be specified.

.. note:: Interposers are experimental and are currently not supported by VPR and using the related tags will not actually result in any changes to the flow.
Defines an interposer cut for modelling 2.5D interposer-based architectures. An interposer cut will cut all connections at location 'loc' along the axis 'dim' Leaving the two sides completely unconnected.
To reconnect the two sides, this tag can have multiple <interdie_wire> tags as children to specify the connection between the two sides.

Expand Down Expand Up @@ -2751,7 +2750,7 @@ The number of any additional wires or muxes created by scatter-gather specificat
Overview of how scatter-gather patterns work. First, connections from a switchblock location are selected according to the specification.
These selected connection are then muxed and passed through the scatter-gather node, which is typically a wire segment. The scatter-gather node then fans out or scatters in another switchblock location.

.. note:: Scatter-Gather patterns are only supported for 3D architectures where the scatter-gather links are unidirectional. They are not currently supported in 2D architectures or with bidirectional sg_links.
.. note:: Scatter-Gather patterns are only supported for uni-directional 3D and uni-directional 2D architectures. Bidirectional sg_links are not currently supported.

When instantiated, a scatter-gather pattern gathers connections from a switchblock and passes the connection through a multiplexer and the scatter-gather node which is typically a wire segment, then scatters or fans out somewhere else in the device. These patterns can be used to define 3D switchblocks. An example is shown below:

Expand Down
1 change: 1 addition & 0 deletions libs/EXTERNAL/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ add_subdirectory(libsdcparse)
add_subdirectory(libblifparse)
add_subdirectory(libtatum)
add_subdirectory(libcatch2)
add_subdirectory(yaml-cpp)
#add_subdirectory(parmys)

#Proc numbers
Expand Down
1 change: 1 addition & 0 deletions libs/EXTERNAL/yaml-cpp
Submodule yaml-cpp added at a83cd3
16 changes: 16 additions & 0 deletions libs/libarchfpga/src/device_grid.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -89,3 +89,19 @@ void DeviceGrid::count_instances() {
}
}
}

bool DeviceGrid::has_interposer_cuts() const {
for (const std::vector<int>& layer_h_cuts : horizontal_interposer_cuts_) {
if (!layer_h_cuts.empty()) {
return true;
}
}

for (const std::vector<int>& layer_v_cuts : vertical_interposer_cuts_) {
if (!layer_v_cuts.empty()) {
return true;
}
}

return false;
}
5 changes: 5 additions & 0 deletions libs/libarchfpga/src/device_grid.h
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,11 @@ class DeviceGrid {
return vertical_interposer_cuts_;
}

/// Returns if the grid has any interposer cuts. You should use this function instead of
/// checking if get_horizontal/vertical_interposer_cuts is empty, since the return value
/// of those functions might look something like this: {{}} which is technically not empty.
bool has_interposer_cuts() const;

private:
/// @brief Counts the number of each tile type on each layer and store it in instance_counts_.
/// It is called in the constructor.
Expand Down
59 changes: 8 additions & 51 deletions libs/librrgraph/src/base/rr_graph_builder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,6 @@ vtr::vector<RRNodeId, std::vector<RREdgeId>>& RRGraphBuilder::node_in_edge_stora
return node_in_edges_;
}

vtr::vector<RRNodeId, std::vector<short>>& RRGraphBuilder::node_ptc_storage() {
return node_tilable_track_nums_;
}

void RRGraphBuilder::add_node_to_all_locs(RRNodeId node) {
e_rr_type node_type = node_storage_.node_type(node);
short node_ptc_num = node_storage_.node_ptc_num(node);
Expand Down Expand Up @@ -76,7 +72,6 @@ RRNodeId RRGraphBuilder::create_node(int layer, int x, int y, e_rr_type type, in
node_side = side;
}
node_storage_.emplace_back();
node_tilable_track_nums_.emplace_back();
RRNodeId new_node = RRNodeId(node_storage_.size() - 1);
node_storage_.set_node_layer(new_node, layer, layer);
node_storage_.set_node_type(new_node, type);
Expand All @@ -102,7 +97,6 @@ void RRGraphBuilder::clear() {
node_lookup_.clear();
node_storage_.clear();
node_in_edges_.clear();
node_tilable_track_nums_.clear();
rr_node_metadata_.clear();
rr_edge_metadata_.clear();
rr_segments_.clear();
Expand Down Expand Up @@ -232,58 +226,20 @@ std::vector<RREdgeId> RRGraphBuilder::node_in_edges(RRNodeId node) const {
}

void RRGraphBuilder::set_node_ptc_nums(RRNodeId node, const std::string& ptc_str) {
VTR_ASSERT(size_t(node) < node_storage_.size());
std::vector<std::string> ptc_tokens = vtr::StringToken(ptc_str).split(",");
VTR_ASSERT(ptc_tokens.size() >= 1);
set_node_ptc_num(node, std::stoi(ptc_tokens[0]));
if (ptc_tokens.size() > 1) {
VTR_ASSERT(size_t(node) < node_tilable_track_nums_.size());
node_tilable_track_nums_[node].resize(ptc_tokens.size());
for (size_t iptc = 0; iptc < ptc_tokens.size(); iptc++) {
node_tilable_track_nums_[node][iptc] = std::stoi(ptc_tokens[iptc]);
}
}
node_storage_.set_node_ptc_nums(node, ptc_str);
}

std::string RRGraphBuilder::node_ptc_nums_to_string(RRNodeId node) const {
if (node_tilable_track_nums_.empty()) {
return std::to_string(size_t(node_storage_.node_ptc_num(node)));
}
VTR_ASSERT(size_t(node) < node_tilable_track_nums_.size());
if (node_tilable_track_nums_[node].empty()) {
return std::to_string(size_t(node_storage_.node_ptc_num(node)));
}
std::string ret;
for (size_t iptc = 0; iptc < node_tilable_track_nums_[node].size(); iptc++) {
ret += std::to_string(size_t(node_tilable_track_nums_[node][iptc])) + ",";
}
// Remove the last comma
ret.pop_back();
return ret;
return node_storage_.node_ptc_nums_to_string(node);
}

bool RRGraphBuilder::node_contain_multiple_ptc(RRNodeId node) const {
if (node_tilable_track_nums_.empty()) {
return false;
}
return node_tilable_track_nums_[node].size() > 1;
return node_storage_.node_contain_multiple_ptc(node);
}

void RRGraphBuilder::add_node_track_num(RRNodeId node, vtr::Point<size_t> node_offset, short track_id) {
VTR_ASSERT(size_t(node) < node_storage_.size());
VTR_ASSERT(size_t(node) < node_tilable_track_nums_.size());
VTR_ASSERT_MSG(node_storage_.node_type(node) == e_rr_type::CHANX || node_storage_.node_type(node) == e_rr_type::CHANY, "Track number valid only for CHANX/CHANY RR nodes");

size_t node_length = std::abs(node_storage_.node_xhigh(node) - node_storage_.node_xlow(node))
+ std::abs(node_storage_.node_yhigh(node) - node_storage_.node_ylow(node));
if (node_length + 1 != node_tilable_track_nums_[node].size()) {
node_tilable_track_nums_[node].resize(node_length + 1);
}

size_t offset = node_offset.x() - node_storage_.node_xlow(node) + node_offset.y() - node_storage_.node_ylow(node);
VTR_ASSERT(offset < node_tilable_track_nums_[node].size());

node_tilable_track_nums_[node][offset] = track_id;
size_t node_offset_value = node_offset.x() - node_storage_.node_xlow(node) + node_offset.y() - node_storage_.node_ylow(node);
node_storage_.add_node_tilable_track_num(node, node_offset_value, track_id);
}

void RRGraphBuilder::add_track_node_to_lookup(RRNodeId node) {
Expand All @@ -309,8 +265,9 @@ void RRGraphBuilder::add_track_node_to_lookup(RRNodeId node) {
// Routing channel nodes may have different ptc num
// Find the track ids using the x/y offset
if (e_rr_type::CHANX == node_type || e_rr_type::CHANY == node_type) {
ptc = (node_type == e_rr_type::CHANX) ? node_tilable_track_nums_[node][x - node_storage_.node_xlow(node)] :
node_tilable_track_nums_[node][y - node_storage_.node_ylow(node)];
const std::vector<short>& track_nums = node_storage_.node_tilable_track_nums(node);
ptc = (node_type == e_rr_type::CHANX) ? track_nums[x - node_storage_.node_xlow(node)] :
track_nums[y - node_storage_.node_ylow(node)];
node_lookup_.add_node(node, node_storage_.node_layer_low(node), x, y, node_type, ptc);
}
}
Expand Down
50 changes: 12 additions & 38 deletions libs/librrgraph/src/base/rr_graph_builder.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,6 @@ class RRGraphBuilder {

/** @brief Return a writable object fo the incoming edge storage */
vtr::vector<RRNodeId, std::vector<RREdgeId>>& node_in_edge_storage();

/** @brief Return a writable object of the node ptc storage (for tileable routing resource graph) */
vtr::vector<RRNodeId, std::vector<short>>& node_ptc_storage();

/** @brief Return the size for rr_node_metadata */
inline size_t rr_node_metadata_size() const {
Expand Down Expand Up @@ -351,6 +348,18 @@ class RRGraphBuilder {
inline void alloc_and_load_edges(const t_rr_edge_info_set* rr_edges_to_create) {
node_storage_.alloc_and_load_edges(rr_edges_to_create);
}

/** @brief Removes a given list of RREdgeIds from the RR Graph.
* This method does not preserve the order of edges. If you're
* calling it after partition_edges has been called, you will
* need to call partition_edges again.
* This operation is O(#RR Graph edges) and should not be called frequently.
*
* @param rr_edges_to_remove list of RREdgeIds to be removed
*/
inline void remove_edges(std::vector<RREdgeId>& rr_edges_to_remove) {
node_storage_.remove_edges(rr_edges_to_remove);
}

/** @brief Overrides the associated switch for a given edge by
* updating the edge to use the passed in switch. */
Expand Down Expand Up @@ -395,13 +404,6 @@ class RRGraphBuilder {
return node_storage_.count_rr_switches(arch_switch_inf, arch_switch_fanins);
}

/** @brief Unlock storage; required to modify an routing resource graph after edge is read */
inline void unlock_storage() {
node_storage_.edges_read_ = false;
node_storage_.partitioned_ = false;
node_storage_.clear_node_first_edge();
}

/** @brief Reserve the lists of nodes, edges, switches etc. to be memory efficient.
* This function is mainly used to reserve memory space inside RRGraph,
* when adding a large number of nodes/edge/switches/segments,
Expand All @@ -420,11 +422,6 @@ class RRGraphBuilder {
inline void resize_nodes(size_t size) {
node_storage_.resize(size);
}
/** @brief This function resize node ptc nums. Only used by RR graph I/O reader and writers. */
inline void resize_node_ptc_nums(size_t size) {
node_tilable_track_nums_.resize(size);
}


/** @brief This function resize rr_switch to accomidate size RR Switch. */
inline void resize_switches(size_t size) {
Expand Down Expand Up @@ -527,29 +524,6 @@ class RRGraphBuilder {
*/
vtr::vector<RRNodeId, std::vector<RREdgeId>> node_in_edges_;

/**
* @brief Extra ptc number for each routing resource node.
* @note This is required by tileable routing resource graphs. The first index is the node id, and
* the second index is is the relative distance from the starting point of the node.
* @details
* In a tileable routing architecture, routing tracks, e.g., CHANX and CHANY, follow a staggered organization.
* Hence, a routing track may appear in different routing channels, representing different ptc/track id.
* Here is an illustrative example of a X-direction routing track (CHANX) in INC direction, which is organized in staggered way.
*
* Coord(x,y) (1,0) (2,0) (3,0) (4,0) Another track (node)
* ptc=0 ------> ------>
* \ /
* ptc=1 ------> /
* \ /
* ptc=2 ------> /
* \ /
* ptc=3 ------->
* ^ ^
* | |
* starting point ending point
*/
vtr::vector<RRNodeId, std::vector<short>> node_tilable_track_nums_;

/** @warning The Metadata should stay as an independent data structure from the rest of the internal data,
* e.g., node_lookup! */
/* Metadata is an extra data on rr-nodes and edges, respectively, that is not used by vpr
Expand Down
Loading
Loading