You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The intra cluster placement code used by the ClusterLegalizer is a bit dis-organized and uses C-style semantics which make it hard to read, use more memory, and may even make it slower. The following are some tasks which will make this interface better.
The cluster_placement_stats is actually not named very precisely. It is very confusing since cluster_placement implies how the clusters will be placed in the FPGA grid, not how the primitives will be placed within a tile. This data structure should be renamed and the file name should follow-suite. It should be named to something that captures that this is intra-cluster placement of primitives into clusters (as opposed to inter-cluster placement of clusters into tiles).
* @brief Stats keeper for placement within the cluster during packing
*
* Contains data structure of placement locations based on status of primitive
*/
classt_cluster_placement_stats {
The cluster placement stats maintains queues of primitives which are in flight, tried, or used in a given cluster. This is currently implemented as unordered multimaps. Beyond just being confusing, this is not a very time nor space efficient way to implement queues. The way these queues are implemented can probably be made better.
std::unordered_multimap<int, t_cluster_placement_primitive*> in_flight; ///<ptrs to primitives currently being considered to pack into
std::unordered_multimap<int, t_cluster_placement_primitive*> tried; ///<ptrs to primitives that are already tried but current logic block unable to pack to
std::unordered_multimap<int, t_cluster_placement_primitive*> invalid; ///<ptrs to primitives that are invalid (already occupied by another primitive in this cluster)
The cluster placement stats needs to maintain a lookup between the pb_graph_node primitive (the location of the primitive in the pb_graph) and the information it maintains about that primitive (what atom is actually placed there). This can be done much much better if the primitives within the pb_graph of a cluster had unique IDs. This can make lookup into this container much faster and may be able to make other parts of the overall code better (since we would not need to use recursive functions every time we wanted to find a primitive in the pb_graph).
How the cluster placement stats are initialized can be cleaned up slightly (which can save some runtime). Due to legacy reasons, the object is allocated, re-constructed, loaded, reset, and the set. Since each of these represent a recursive call, this can get quite expensive. This can probably all be done at once. NOTE: If each primitive had a unique ID in the pb_graph, this code can probably be made MUCH more efficient!
Hi @AlexandreSinger , for the intra cluster renaming, I know we talked about keeping the name short but i believe intra_cluster_placement_stats is the best one to choose here.
The intra cluster placement code used by the ClusterLegalizer is a bit dis-organized and uses C-style semantics which make it hard to read, use more memory, and may even make it slower. The following are some tasks which will make this interface better.
cluster_placement_stats
is actually not named very precisely. It is very confusing sincecluster_placement
implies how the clusters will be placed in the FPGA grid, not how the primitives will be placed within a tile. This data structure should be renamed and the file name should follow-suite. It should be named to something that captures that this is intra-cluster placement of primitives into clusters (as opposed to inter-cluster placement of clusters into tiles).vtr-verilog-to-routing/vpr/src/pack/cluster_placement.h
Lines 14 to 19 in 859198c
vtr-verilog-to-routing/vpr/src/pack/cluster_placement.h
Lines 110 to 112 in 859198c
vtr-verilog-to-routing/vpr/src/pack/cluster_placement.h
Lines 114 to 118 in 859198c
vtr-verilog-to-routing/vpr/src/pack/cluster_placement.cpp
Lines 151 to 164 in 859198c
The text was updated successfully, but these errors were encountered: