-
Notifications
You must be signed in to change notification settings - Fork 395
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
Improving Unrelated Clustering Feature in VPR #2237
base: master
Are you sure you want to change the base?
Changes from 3 commits
826cc37
6034bf6
919f1df
55c929b
a29adb2
e3893a5
91884fe
7500fcd
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 |
---|---|---|
|
@@ -133,10 +133,14 @@ enum class e_const_gen_inference { | |
COMB_SEQ ///<Both combinational and sequential constant generator inference | ||
}; | ||
|
||
enum class e_unrelated_clustering { | ||
enum class e_unrel_clust_stat { | ||
OFF, | ||
ON, | ||
AUTO | ||
ON | ||
}; | ||
|
||
enum class e_unrel_clust_mode { | ||
FIXED, ///<Unrelated clustering status is given by the user and cannot be updated | ||
AUTO ///<Unrelated clustering status can be updated by VPR throughout the packing flow | ||
}; | ||
|
||
enum class e_balance_block_type_util { | ||
|
@@ -208,6 +212,42 @@ class t_ext_pin_util_targets { | |
std::map<std::string, t_ext_pin_util> overrides_; | ||
}; | ||
|
||
class t_allow_unrelated_clustering { | ||
public: | ||
t_allow_unrelated_clustering() = default; | ||
t_allow_unrelated_clustering(enum e_unrel_clust_stat status, enum e_unrel_clust_mode mode); | ||
/** | ||
* @brief Returns the unrelated clustering status for the specified block type | ||
*/ | ||
enum e_unrel_clust_stat get_block_status(std::string block_type_name) const; | ||
/** | ||
* @brief Returns the unrelated clustering mode for the specified block type | ||
*/ | ||
enum e_unrel_clust_mode get_block_mode(std::string block_type_name) const; | ||
|
||
public: | ||
/** | ||
* @brief Sets the unrelated clustering status for the specified block type | ||
* | ||
* The unrelated clustering status is represented as a pair of booleans. | ||
* The first boolean incidcates whether unrelated clustering is turned on or off. | ||
* The second variable indicates whether the status of the variable is provided | ||
* by the user(bool = false) or user let it to be automatically determined by VPR(bool = ture). | ||
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. ture -> true 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. Using @param in this description and being more precise (not pair of booleans; instead it is a pair of status control variables) would be good here |
||
* If provided by the user, the status cannot be overriden later, otherwise | ||
* it can be adjusted by VPR throughout the flow as necessary. | ||
*/ | ||
void set_block_status(std::string block_type_name, std::pair<enum e_unrel_clust_stat, enum e_unrel_clust_mode> status); | ||
/** | ||
* @brief Sets the default value for unrelated clustering status | ||
* | ||
*/ | ||
void set_default_status(std::pair<enum e_unrel_clust_stat, enum e_unrel_clust_mode> status); | ||
|
||
private: | ||
std::pair<enum e_unrel_clust_stat, enum e_unrel_clust_mode> default_; | ||
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 what these are: default value for all block types, and overrides by block_type name for specific types. Each says whether unrelated cluster is on or off, and if it was set to that state by the user or automatic vpr behaviour. |
||
std::map<std::string, std::pair<enum e_unrel_clust_stat, enum e_unrel_clust_mode>> overrides_; | ||
}; | ||
|
||
class t_pack_high_fanout_thresholds { | ||
public: | ||
t_pack_high_fanout_thresholds() = default; | ||
|
@@ -840,7 +880,7 @@ struct t_packer_opts { | |
float inter_cluster_net_delay; | ||
float target_device_utilization; | ||
bool auto_compute_inter_cluster_net_delay; | ||
e_unrelated_clustering allow_unrelated_clustering; | ||
std::vector<std::string> allow_unrelated_clustering; | ||
bool connection_driven; | ||
int pack_verbosity; | ||
bool enable_pin_feasibility_filter; | ||
|
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.
comment usage / meaning