This directory is used for storing / folding routing resource graphs using different folding methods.
flat_graphs/
is the directory where the folding scripts will look for the flat rr_graph.xml files- to save flat rr_graphs to this directory, run vpr with the argument
--write_rr_graph /path/to/flat_graphs/your_graph.xml
- for convenience, the rr_graph for architecture EArch.xml and circuit tseng.blif is already included in
flat_graphs/
folded_graphs/
is the directory where the folding scripts will save the folded rr_graph.xml files- to generate folded rr_graphs, follow the instructions below
fold_rr_graph.py
is the script that takes care of folding and saving rr_graphs from flat to folded
- To generate a folded rr_graph, run
fold_rr_graph.py
with the following command
python fold_rr_graph.py <folding_method> <flat_graph_name>
- the
<folding_method>
argument refers to the folding method script in thefolding_methods/
directory to be used for folding - the
<flat_graph_name>
refers to the name of the flat graph in theflat_graphs
directory that you wish to fold - If you want to fold all the graphs in the
flat_graphs
directory, simply omit the<flat_graph_name>
argument, and every flat graph will be folded. fold_rr_graph.py
will execute in the following order- Read flat rr_graph into memory from
flat_graphs/<flat_graph_name>.xml
- Fold the flat rr_graph using the desired
<folding_method>
- Save the folded rr_graph as
<folding_method>_<flat_graph_name>.xml
in thefolded_graphs
directory - Print out folding metrics to the console including data such as nodes and edges % of original size.
- Read flat rr_graph into memory from
- Currently the only working method to use a folded rr_graph in VTR requires that the folded graph is read from a file.
- This means that a custom rr_graph reader must be implemented for each folding method.
- Instructions on how to implement changes to the rr_graph reader can be found at
$VTR_ROOT/vpr/src/route/SCHEMA_GENERATOR.md
- Branches for each folding method follow the naming convention that the git branch name is the same as the folding method name.
- A working example of the
nodes_all_attr
folding method can be found on the nodes_all_attr branch - To run this example, simply checkout the branch, build VTR and then run the following command
$VTR_ROOT/vtr_flow/arch/timing/EArch.xml \
$VTR_ROOT/vtr_flow/benchmarks/blif/tseng.blif \
--route_chan_width 100 --read_rr_graph path/to/folded_graphs/nodes_all_attr_EArch_tseng.xml
- To compare with the flat graph, checkout this branch, build VTR and then run the following command
$VTR_ROOT/vtr_flow/arch/timing/EArch.xml \
$VTR_ROOT/vtr_flow/benchmarks/blif/tseng.blif \
--route_chan_width 100 --read_rr_graph path/to/flat_graphs/EArch_tseng.xml