|
10 | 10 | #include "vtr_ndmatrix.h"
|
11 | 11 | #include "vtr_optional.h"
|
12 | 12 | #include "vtr_vector.h"
|
| 13 | +#include "vtr_vector_map.h" |
13 | 14 | #include "atom_netlist.h"
|
14 | 15 | #include "clustered_netlist.h"
|
15 | 16 | #include "rr_graph_view.h"
|
@@ -78,12 +79,6 @@ struct AtomContext : public Context {
|
78 | 79 |
|
79 | 80 | /// @brief Mappings to/from the Atom Netlist to physically described .blif models
|
80 | 81 | AtomLookup lookup;
|
81 |
| - |
82 |
| - /// @brief Prepacker object which performs prepacking and stores the pack |
83 |
| - /// molecules. Has a method to get the pack molecule of an AtomBlock. |
84 |
| - /// TODO: This is mainly only used in the clusterer. It can probably be |
85 |
| - /// removed from the AtomContext entirely. |
86 |
| - Prepacker prepacker; |
87 | 82 | };
|
88 | 83 |
|
89 | 84 | /**
|
@@ -286,69 +281,23 @@ struct ClusteringContext : public Context {
|
286 | 281 | * CLB Netlist
|
287 | 282 | ********************************************************************/
|
288 | 283 |
|
289 |
| - ///@brief New netlist class derived from Netlist |
| 284 | + /// @brief New netlist class derived from Netlist |
290 | 285 | ClusteredNetlist clb_nlist;
|
291 | 286 |
|
292 |
| - /* Database for nets of each clb block pin after routing stage |
293 |
| - * - post_routing_clb_pin_nets: |
294 |
| - * mapping of pb_type pins to clustered net ids |
295 |
| - * - pre_routing_net_pin_mapping: |
296 |
| - * a copy of mapping for current pb_route index to previous pb_route index |
297 |
| - * Record the previous pin mapping for finding the correct pin index during timing analysis |
298 |
| - */ |
| 287 | + /// @brief Database for nets of each clb block pin after routing stage. |
| 288 | + /// - post_routing_clb_pin_nets: |
| 289 | + /// mapping of pb_type pins to clustered net ids. |
| 290 | + /// - pre_routing_net_pin_mapping: |
| 291 | + /// a copy of mapping for current pb_route index to previous pb_route index |
| 292 | + /// Record the previous pin mapping for finding the correct pin index during |
| 293 | + /// timing analysis. |
299 | 294 | std::map<ClusterBlockId, std::map<int, ClusterNetId>> post_routing_clb_pin_nets;
|
300 | 295 | std::map<ClusterBlockId, std::map<int, int>> pre_routing_net_pin_mapping;
|
301 |
| -}; |
302 |
| - |
303 |
| -/** |
304 |
| - * @brief State relating to helper data structure using in the clustering stage |
305 |
| - * |
306 |
| - * This should contain helper data structures that are useful in the clustering/packing stage. |
307 |
| - * They are encapsulated here as they are useful in clustering and reclustering algorithms that may be used |
308 |
| - * in packing or placement stages. |
309 |
| - */ |
310 |
| -struct ClusteringHelperContext : public Context { |
311 |
| - // A map used to save the number of used instances from each logical block type. |
312 |
| - std::map<t_logical_block_type_ptr, size_t> num_used_type_instances; |
313 |
| - |
314 |
| - // Stats keeper for placement information during packing/clustering |
315 |
| - t_cluster_placement_stats* cluster_placement_stats; |
316 |
| - |
317 |
| - // total number of models in the architecture |
318 |
| - int num_models; |
319 |
| - |
320 |
| - int max_cluster_size; |
321 |
| - t_pb_graph_node** primitives_list; |
322 | 296 |
|
323 |
| - bool enable_pin_feasibility_filter; |
324 |
| - int feasible_block_array_size; |
325 |
| - |
326 |
| - // total number of CLBs |
327 |
| - int total_clb_num; |
328 |
| - |
329 |
| - // A vector of routing resource nodes within each of logic cluster_ctx.blocks types [0 .. num_logical_block_type-1] |
330 |
| - std::vector<t_lb_type_rr_node>* lb_type_rr_graphs; |
331 |
| - |
332 |
| - // the utilization of external input/output pins during packing (between 0 and 1) |
333 |
| - t_ext_pin_util_targets target_external_pin_util; |
334 |
| - |
335 |
| - // During clustering, a block is related to un-clustered primitives with nets. |
336 |
| - // This relation has three types: low fanout, high fanout, and transitive |
337 |
| - // high_fanout_thresholds stores the threshold for nets to a block type to be considered high fanout |
338 |
| - t_pack_high_fanout_thresholds high_fanout_thresholds; |
339 |
| - |
340 |
| - // A vector of unordered_sets of AtomBlockIds that are inside each clustered block [0 .. num_clustered_blocks-1] |
341 |
| - // unordered_set for faster insertion/deletion during the iterative improvement process of packing |
| 297 | + /// @brief A vector of unordered_sets of AtomBlockIds that are inside each |
| 298 | + /// clustered block [0 .. num_clustered_blocks-1] |
| 299 | + /// This is populated when the packing is loaded. |
342 | 300 | vtr::vector<ClusterBlockId, std::unordered_set<AtomBlockId>> atoms_lookup;
|
343 |
| - |
344 |
| - /** Stores the NoC group ID of each atom block. Atom blocks that belong |
345 |
| - * to different NoC groups can't be clustered with each other into the |
346 |
| - * same clustered block.*/ |
347 |
| - vtr::vector<AtomBlockId, NocGroupId> atom_noc_grp_id; |
348 |
| - |
349 |
| - ~ClusteringHelperContext() { |
350 |
| - delete[] primitives_list; |
351 |
| - } |
352 | 301 | };
|
353 | 302 |
|
354 | 303 | /**
|
@@ -728,9 +677,6 @@ class VprContext : public Context {
|
728 | 677 | const ClusteringContext& clustering() const { return clustering_; }
|
729 | 678 | ClusteringContext& mutable_clustering() { return clustering_; }
|
730 | 679 |
|
731 |
| - const ClusteringHelperContext& cl_helper() const { return helper_; } |
732 |
| - ClusteringHelperContext& mutable_cl_helper() { return helper_; } |
733 |
| - |
734 | 680 | const PlacementContext& placement() const { return placement_; }
|
735 | 681 | PlacementContext& mutable_placement() { return placement_; }
|
736 | 682 |
|
@@ -760,8 +706,6 @@ class VprContext : public Context {
|
760 | 706 | PowerContext power_;
|
761 | 707 |
|
762 | 708 | ClusteringContext clustering_;
|
763 |
| - ClusteringHelperContext helper_; |
764 |
| - |
765 | 709 | PlacementContext placement_;
|
766 | 710 | RoutingContext routing_;
|
767 | 711 | FloorplanningContext constraints_;
|
|
0 commit comments