@@ -1507,7 +1507,8 @@ void try_fill_cluster(const t_packer_opts& packer_opts,
1507
1507
t_molecule_link* unclustered_list_head,
1508
1508
const int & unclustered_list_head_size,
1509
1509
std::unordered_map<AtomNetId, int >& net_output_feeds_driving_block_input,
1510
- std::map<const t_model*, std::vector<t_logical_block_type_ptr>>& primitive_candidate_block_types) {
1510
+ std::map<const t_model*, std::vector<t_logical_block_type_ptr>>& primitive_candidate_block_types,
1511
+ bool noc_enabled) {
1511
1512
auto & atom_ctx = g_vpr_ctx.atom ();
1512
1513
auto & device_ctx = g_vpr_ctx.mutable_device ();
1513
1514
auto & cluster_ctx = g_vpr_ctx.mutable_clustering ();
@@ -1601,7 +1602,8 @@ void try_fill_cluster(const t_packer_opts& packer_opts,
1601
1602
high_fanout_threshold,
1602
1603
*timing_info,
1603
1604
attraction_groups,
1604
- net_output_feeds_driving_block_input);
1605
+ net_output_feeds_driving_block_input,
1606
+ noc_enabled);
1605
1607
cluster_stats.num_unrelated_clustering_attempts = 0 ;
1606
1608
1607
1609
if (packer_opts.timing_driven ) {
@@ -1763,7 +1765,8 @@ void mark_and_update_partial_gain(const AtomNetId net_id,
1763
1765
const SetupTimingInfo& timing_info,
1764
1766
const std::unordered_set<AtomNetId>& is_global,
1765
1767
const int high_fanout_net_threshold,
1766
- std::unordered_map<AtomNetId, int >& net_output_feeds_driving_block_input) {
1768
+ std::unordered_map<AtomNetId, int >& net_output_feeds_driving_block_input,
1769
+ bool noc_enabled) {
1767
1770
/* Updates the marked data structures, and if gain_flag is GAIN, *
1768
1771
* the gain when an atom block is added to a cluster. The *
1769
1772
* sharinggain is the number of inputs that a atom block shares with *
@@ -1783,7 +1786,7 @@ void mark_and_update_partial_gain(const AtomNetId net_id,
1783
1786
/* There are VCC and GND nets in the netlist. These nets have a high fanout,
1784
1787
* but their sinks do not necessarily have a logical relation with each other.
1785
1788
* Therefore, we exclude constant nets when evaluating high fanout connectivity. */
1786
- if (!is_global.count (net_id)) {
1789
+ if (!is_global.count (net_id) && (!noc_enabled || !atom_ctx. nlist . net_is_constant (net_id)) ) {
1787
1790
/* If no low/medium fanout nets, we may need to consider
1788
1791
* high fan-out nets for packing, so select one and store it */
1789
1792
AtomNetId stored_net = cur_pb->pb_stats ->tie_break_high_fanout_net ;
@@ -1919,7 +1922,8 @@ void update_cluster_stats(const t_pack_molecule* molecule,
1919
1922
const int high_fanout_net_threshold,
1920
1923
const SetupTimingInfo& timing_info,
1921
1924
AttractionInfo& attraction_groups,
1922
- std::unordered_map<AtomNetId, int >& net_output_feeds_driving_block_input) {
1925
+ std::unordered_map<AtomNetId, int >& net_output_feeds_driving_block_input,
1926
+ bool noc_enabled) {
1923
1927
/* Routine that is called each time a new molecule is added to the cluster.
1924
1928
* Makes calls to update cluster stats such as the gain map for atoms, used pins, and clock structures,
1925
1929
* in order to reflect the new content of the cluster.
@@ -1976,15 +1980,17 @@ void update_cluster_stats(const t_pack_molecule* molecule,
1976
1980
timing_info,
1977
1981
is_global,
1978
1982
high_fanout_net_threshold,
1979
- net_output_feeds_driving_block_input);
1983
+ net_output_feeds_driving_block_input,
1984
+ noc_enabled);
1980
1985
} else {
1981
1986
mark_and_update_partial_gain (net_id, NO_GAIN, blk_id,
1982
1987
timing_driven,
1983
1988
connection_driven, OUTPUT,
1984
1989
timing_info,
1985
1990
is_global,
1986
1991
high_fanout_net_threshold,
1987
- net_output_feeds_driving_block_input);
1992
+ net_output_feeds_driving_block_input,
1993
+ noc_enabled);
1988
1994
}
1989
1995
}
1990
1996
@@ -1997,7 +2003,8 @@ void update_cluster_stats(const t_pack_molecule* molecule,
1997
2003
timing_info,
1998
2004
is_global,
1999
2005
high_fanout_net_threshold,
2000
- net_output_feeds_driving_block_input);
2006
+ net_output_feeds_driving_block_input,
2007
+ noc_enabled);
2001
2008
}
2002
2009
2003
2010
/* Finally Clocks */
@@ -2009,14 +2016,16 @@ void update_cluster_stats(const t_pack_molecule* molecule,
2009
2016
timing_info,
2010
2017
is_global,
2011
2018
high_fanout_net_threshold,
2012
- net_output_feeds_driving_block_input);
2019
+ net_output_feeds_driving_block_input,
2020
+ noc_enabled);
2013
2021
} else {
2014
2022
mark_and_update_partial_gain (net_id, GAIN, blk_id,
2015
2023
timing_driven, connection_driven, INPUT,
2016
2024
timing_info,
2017
2025
is_global,
2018
2026
high_fanout_net_threshold,
2019
- net_output_feeds_driving_block_input);
2027
+ net_output_feeds_driving_block_input,
2028
+ noc_enabled);
2020
2029
}
2021
2030
}
2022
2031
0 commit comments