-
Notifications
You must be signed in to change notification settings - Fork 415
Refactoring clustering/packing code and building re-cluster API #2034
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
7697369
a146475
7ff8eae
0fa1e8c
bdd93dc
92b5df5
4132d5c
179021c
b109a13
5904a33
172777e
a896f5a
87b562c
9fb56c5
eb71a9e
9b70cde
25607bc
0a81328
c3297d4
3baa1ee
e190a91
f7398a1
1ffe202
d240e96
452d519
9c4ad0f
f26a177
d668f58
dc63856
617d0ce
64e97cf
4e12452
7c0e8ad
a260be7
e5e2d18
1dbacdb
5a11d15
bf943cb
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -55,12 +55,18 @@ struct AtomContext : public Context { | |
/******************************************************************** | ||
* Atom Netlist | ||
********************************************************************/ | ||
|
||
AtomContext() | ||
: list_of_pack_molecules(nullptr, free_pack_molecules) {} | ||
///@brief Atom netlist | ||
AtomNetlist nlist; | ||
|
||
///@brief Mappings to/from the Atom Netlist to physically described .blif models | ||
AtomLookup lookup; | ||
|
||
///@brief The molecules associated with each atom block | ||
std::multimap<AtomBlockId, t_pack_molecule*> atom_molecules; | ||
|
||
std::unique_ptr<t_pack_molecule, decltype(&free_pack_molecules)> list_of_pack_molecules; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Add a comment -- what is this for? (head of a linked list of all the molecules -- used to free them). |
||
}; | ||
|
||
/** | ||
|
@@ -259,6 +265,26 @@ struct ClusteringContext : public Context { | |
*/ | ||
std::map<ClusterBlockId, std::map<int, ClusterNetId>> post_routing_clb_pin_nets; | ||
std::map<ClusterBlockId, std::map<int, int>> pre_routing_net_pin_mapping; | ||
|
||
std::map<t_logical_block_type_ptr, size_t> num_used_type_instances; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Comment this. What is it and what's it for? |
||
}; | ||
|
||
struct ClusteringHelperContext : public Context { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Comment this struct/context -- what is it for, what's it's lifetime? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Explain variables at least at high level (if you don't know them all then can say they're needed during the seed-based clusterer? Or needed for any clustering changes?) |
||
std::map<t_logical_block_type_ptr, size_t> num_used_type_instances; | ||
t_cluster_placement_stats* cluster_placement_stats; | ||
int num_models; | ||
int max_cluster_size; | ||
t_pb_graph_node** primitives_list; | ||
|
||
bool enable_pin_feasibility_filter; | ||
int feasible_block_array_size; | ||
|
||
int total_clb_num; | ||
std::vector<t_lb_type_rr_node>* lb_type_rr_graphs; | ||
|
||
~ClusteringHelperContext() { | ||
free(primitives_list); | ||
} | ||
}; | ||
|
||
/** | ||
|
@@ -446,6 +472,9 @@ class VprContext : public Context { | |
const ClusteringContext& clustering() const { return clustering_; } | ||
ClusteringContext& mutable_clustering() { return clustering_; } | ||
|
||
const ClusteringHelperContext& helper() const { return helper_; } | ||
ClusteringHelperContext& mutable_helper() { return helper_; } | ||
|
||
const PlacementContext& placement() const { return placement_; } | ||
PlacementContext& mutable_placement() { return placement_; } | ||
|
||
|
@@ -464,6 +493,8 @@ class VprContext : public Context { | |
PowerContext power_; | ||
|
||
ClusteringContext clustering_; | ||
ClusteringHelperContext helper_; | ||
|
||
PlacementContext placement_; | ||
RoutingContext routing_; | ||
FloorplanningContext constraints_; | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1654,4 +1654,9 @@ class RouteStatus { | |
|
||
typedef vtr::vector<ClusterBlockId, std::vector<std::vector<int>>> t_clb_opins_used; //[0..num_blocks-1][0..class-1][0..used_pins-1] | ||
|
||
typedef std::vector<std::map<int, int>> t_arch_switch_fanin; | ||
|
||
void free_pack_molecules(t_pack_molecule* list_of_pack_molecules); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Comment these if you can. |
||
void free_cluster_placement_stats(t_cluster_placement_stats* cluster_placement_stats); | ||
|
||
#endif |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Beef up this comment. How do you use this mapping? What is its lifetime (valid only after clustering)?