Fix missing update session in block/spares.

* Bug: In cumulus/plugins/alpha/block/clocktree.ClockTree.splitClock(),
    forgot to wrap inside an UpdateSession.
* Bug: In cumulus/plugins/alpha/block/clocktree.spares.raddTransNet(),
    forgot to set the masterNet for recursive call when the plug already
    exists.
This commit is contained in:
Jean-Paul Chaput 2020-08-12 22:55:29 +02:00
parent 51e3639687
commit 1c6a9b64b0
2 changed files with 7 additions and 4 deletions

View File

@ -176,6 +176,7 @@ class ClockTree ( object ):
quadTree = self.spares.quadTree quadTree = self.spares.quadTree
quadTree.bufferTag = self.clockNet.getName() quadTree.bufferTag = self.clockNet.getName()
with UpdateSession():
hyperClock = HyperNet.create( Occurrence(self.clockNet) ) hyperClock = HyperNet.create( Occurrence(self.clockNet) )
for plugOccurrence in hyperClock.getTerminalNetlistPlugOccurrences(): for plugOccurrence in hyperClock.getTerminalNetlistPlugOccurrences():
quadTree.attachToLeaf( plugOccurrence ) quadTree.attachToLeaf( plugOccurrence )

View File

@ -569,6 +569,8 @@ class Spares ( object ):
% (topNet.getName(),headInstance.getName(),masterCell.getName()) ) % (topNet.getName(),headInstance.getName(),masterCell.getName()) )
headPlug.setNet( topNet ) headPlug.setNet( topNet )
self.addClonedCell( masterCell ) self.addClonedCell( masterCell )
else:
masterNet = headPlug.getMasterNet()
if tailPath.isEmpty(): return headPlug if tailPath.isEmpty(): return headPlug
return self.raddTransNet( masterNet, tailPath ) return self.raddTransNet( masterNet, tailPath )