@@ -40,6 +40,26 @@ static bool try_size_device_grid(const t_arch& arch,
40
40
*/
41
41
static int count_models (const t_model* user_models);
42
42
43
+ static std::vector<AtomBlockId> find_noc_router_atoms () {
44
+ const auto & atom_ctx = g_vpr_ctx.atom ();
45
+
46
+ // NoC router atoms are expected to have a specific blif model
47
+ const std::string noc_router_blif_model_name = " noc_router_adapter_block" ;
48
+
49
+ // stores found NoC router atoms
50
+ std::vector<AtomBlockId> noc_router_atoms;
51
+
52
+ // iterate over all atoms and find those whose blif model matches
53
+ for (auto atom_id : atom_ctx.nlist .blocks ()) {
54
+ const t_model* model = atom_ctx.nlist .block_model (atom_id);
55
+ if (noc_router_blif_model_name == model->name ) {
56
+ noc_router_atoms.push_back (atom_id);
57
+ }
58
+ }
59
+
60
+ return noc_router_atoms;
61
+ }
62
+
43
63
bool try_pack (t_packer_opts* packer_opts,
44
64
const t_analysis_opts* analysis_opts,
45
65
const t_arch* arch,
@@ -131,6 +151,11 @@ bool try_pack(t_packer_opts* packer_opts,
131
151
int pack_iteration = 1 ;
132
152
bool floorplan_regions_overfull = false ;
133
153
154
+ auto noc_atoms = find_noc_router_atoms ();
155
+ for (auto noc_atom : noc_atoms) {
156
+ std::cout << " NoC Atom: " << atom_ctx.nlist .block_name (noc_atom) << std::endl;
157
+ }
158
+
134
159
while (true ) {
135
160
free_clustering_data (*packer_opts, clustering_data);
136
161
0 commit comments