BFS Atomic Counter Task#342
Conversation
Signed-off-by: Ethan Mahintorabi <ethanmoon@google.com>
|
|
|
Some initial feedback (more to come):
|
|
The most critical issue here is in-degree count/decrement mismatch (topological ordering violation) computeInDegrees() deduplicates per unique successor vertex: But enqueueAdjacentVertices() decrements per edge (deduped via processed_edges_): When multiple edges connect the same two vertices (e.g., different timing arc sets with different when conditions), the in-degree is incremented once but decremented multiple times. Concrete example:
This violates topological ordering. C's delay calculation uses stale/uninitialized data from B's contribution. Fix: either remove the counted_successors dedup in computeInDegrees (count per edge), or dedup per target vertex in enqueueAdjacentVertices. --One possible fix would be---- |
|
One comment regarding the change- this change bypasses the incremental delay tolerance. Old behavior New behavior Two calls to enqueueAdjacentVertices(to_vertex) happen:
If slews didn't change, call 1 is skipped. But call 2 runs anyway, decrements all successors' in-degrees, and dispatches any that become ready. The processed_edges_ set is empty for those edges (since call 1 was skipped), so they all get processed. This cascades - every successor is visited, and every successor unconditionally propagates to its successors, and so on through the entire downstream cone. But with new in-degree increment change, you probably need this. If a vertex C has 2 edges from A and B, and say A's slews changed but B's didn't:
So the unconditional propagation is necessary to make the in-degree mechanism work. But it means every vertex in the downstream cone is visited during incremental updates, even when slew changes die out early. For a small ECO on a large design, the old code might recompute tens If the parallel speedup outweighs the incremental efficiency loss, it's a valid tradeoff. Do you see this making a dent in runtime? |
Also note that the unconditional call was necessary because the in-degree mechanism requires every vertex to decrement its successors (otherwise successors are stuck). But it means the incremental optimization (stop propagating when slews don't change) is defeated. Now, processed_edges_ was added to prevent the two calls from double-decrementing the same edge. |
* fix power_json.tcl * get rid of the if/else statements throughout
Signed-off-by: James Cherry <cherry@parallaxsw.com>
No description provided.