File tree Expand file tree Collapse file tree 1 file changed +7
-7
lines changed
Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -331,13 +331,15 @@ void TimingGraph::force_levelize() {
331331 // placed in a previous level (indicating that the node goes in the current level)
332332 //
333333 // Also initialize the first level (nodes with no fanin)
334+ //
335+ // Note: We consider *all* edges, even those marked as disabled by timing constraints.
336+ // This produces a valid levelization which is independent of the timing constraints,
337+ // and which avoids some potential issues. For instance, treating an internal node with
338+ // all disabled input edges from being treated as a primary input.
334339 std::vector<int > node_fanin_remaining (nodes ().size ());
335340 for (NodeId node_id : nodes ()) {
336- size_t node_fanin = 0 ;
337- for (EdgeId edge : node_in_edges (node_id)) {
338- if (edge_disabled (edge)) continue ;
339- ++node_fanin;
340- }
341+ size_t node_fanin = node_in_edges (node_id).size ();
342+
341343 node_fanin_remaining[size_t (node_id)] = node_fanin;
342344
343345 // Initialize the first level
@@ -369,8 +371,6 @@ void TimingGraph::force_levelize() {
369371 for (const NodeId node_id : level_nodes_[LevelId (level_idx)]) {
370372 // Inspect the fanout
371373 for (EdgeId edge_id : node_out_edges (node_id)) {
372- if (edge_disabled (edge_id)) continue ;
373-
374374 NodeId sink_node = edge_sink_node (edge_id);
375375
376376 // Decrement the fanin count
You can’t perform that action at this time.
0 commit comments