Skip to content

Commit a3d000a

Browse files
[APPack] Updated Documentation and Comments
1 parent 1aa0b1f commit a3d000a

File tree

5 files changed

+19
-11
lines changed

5 files changed

+19
-11
lines changed

doc/src/vpr/command_line_usage.rst

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1384,14 +1384,17 @@ Analytical Placement is generally split into three stages:
13841384

13851385
**Default:** ``auto``
13861386

1387-
.. option:: --appack_max_dist_th { auto | <regex>:<float>,<float> }
1387+
.. option:: --appack_unrelated_clustering_args { auto | <regex>:<float>,<float> }
13881388

1389-
Sets parameters used for unrelated clustering for the logical block types
1390-
used by APPack. APPack uses the primitive-level placement produced by the
1389+
Sets parameters used for unrelated clustering (the max search distance and max attempts)
1390+
used by APPack.
1391+
APPack uses the primitive-level placement produced by the
13911392
global placer to cluster primitives together. APPack uses this information
13921393
to help increase the density of clusters (if needed) by searching for
13931394
unrelated molecules to pack together. It does this by searching out from
13941395
the centroid of the cluster being created until it finds a valid molecule.
1396+
If a valid molecule is found, but it fails, the packer may do another attempt
1397+
(up to a maximum number of attempts).
13951398
This argument allows the user to select the maximum distance the code will
13961399
search and how many attempts it will try to search for each cluster.
13971400

libs/libarchfpga/src/arch_util.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1030,7 +1030,7 @@ bool pb_type_contains_blif_model(const t_pb_type* pb_type, const std::string& bl
10301030
}
10311031

10321032
bool pb_type_contains_memory_pbs(const t_pb_type* pb_type) {
1033-
// TODO: This should eb a graph traversal instead of a recursive function.
1033+
// TODO: This should be a graph traversal instead of a recursive function.
10341034

10351035
if (pb_type == nullptr)
10361036
return false;

vpr/src/base/read_options.cpp

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2012,12 +2012,15 @@ argparse::ArgumentParser create_arg_parser(const std::string& prog_name, t_optio
20122012

20132013
ap_grp.add_argument(args.appack_unrelated_clustering_args, "--appack_unrelated_clustering_args")
20142014
.help(
2015-
"Sets parameters used for unrelated clustering for the logical block types "
2016-
"used by APPack. APPack uses the primitive-level placement produced by the "
2015+
"Sets parameters used for unrelated clustering (the max search distance and max attempts) "
2016+
"used by APPack. "
2017+
"APPack uses the primitive-level placement produced by the "
20172018
"global placer to cluster primitives together. APPack uses this information "
20182019
"to help increase the density of clusters (if needed) by searching for "
20192020
"unrelated molecules to pack together. It does this by searching out from "
20202021
"the centroid of the cluster being created until it finds a valid molecule. "
2022+
"If a valid molecule is found, but it fails, the packer may do another attempt "
2023+
"(up to a maximum number of attempts). "
20212024
"This argument allows the user to select the maximum distance the code will "
20222025
"search and how many attempts it will try to search for each cluster."
20232026
"\n"

vpr/src/pack/appack_unrelated_clustering_manager.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,14 @@ void APPackUnrelatedClusteringManager::init(
2525
max_unrelated_clustering_attempts_.resize(logical_block_types.size(),
2626
default_max_unrelated_clustering_attempts_);
2727

28-
// For memories, we do not perform unrelated clustering.
28+
// For memories (such as BRAMs and MLABs), we do not perform unrelated clustering.
2929
for (const t_logical_block_type& lb_ty : logical_block_types) {
3030
// Skip the empty logical block type. This should not have any blocks.
3131
if (lb_ty.is_empty())
3232
continue;
3333

34+
// If the logical block type contains a pb_type which is a memory class,
35+
// it is assumed to be a BRAM or an MLAB.
3436
bool has_memory = pb_type_contains_memory_pbs(lb_ty.pb_type);
3537
if (!has_memory)
3638
continue;

vpr/src/pack/appack_unrelated_clustering_manager.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@
1616
* @brief Manager class for unrelated clustering in APPack.
1717
*
1818
* After searching for candidates by connectivity and timing, the user may
19-
* turn on unrelated clustering, which will allow molecules which are
20-
* unrelated to the cluster being created to be attempted to be packed in.
21-
* APPack uses flat placement information to decide which unrelated
22-
* molecules to try.
19+
* turn on unrelated clustering, which attempt to pack into the cluster molecules
20+
* which are not attracted to the molecules within the current cluster (according
21+
* to the standard packing heuristics). APPack uses flat placement information
22+
* to decide which unrelated molecules to try.
2323
*
2424
* APPack will search for unrelated molecules in the tile which contains
2525
* the flat location of the cluster. It will then look farther out, tile

0 commit comments

Comments
 (0)