run method
- Phase phase
override
Executes this Component's activities related to running the test.
Overrides of run must call super.run
in an unawaited
fashion.
For example:
@override
Future<void> run(Phase phase) async {
unawaited(super.run(phase));
// New code goes here!
}
Implementation
@override
Future<void> run(Phase phase) async {
unawaited(super.run(phase));
Simulator.injectAction(() {
wIntf.awValid.put(0);
wIntf.awId?.put(0);
wIntf.awAddr.put(0);
wIntf.awLen?.put(0);
wIntf.awSize?.put(0);
wIntf.awBurst?.put(0);
wIntf.awLock?.put(0);
wIntf.awCache?.put(0);
wIntf.awProt.put(0);
wIntf.awQos?.put(0);
wIntf.awRegion?.put(0);
wIntf.awUser?.put(0);
wIntf.wValid.put(0);
wIntf.wData.put(0);
wIntf.wStrb.put(0);
wIntf.wLast.put(0);
wIntf.bReady.put(0);
});
// wait for reset to complete before driving anything
await sIntf.resetN.nextPosedge;
while (!Simulator.simulationHasEnded) {
if (pendingSeqItems.isNotEmpty) {
await _drivePacket(pendingSeqItems.removeFirst());
} else {
await sIntf.clk.nextPosedge;
}
}
}