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(() {
b.valid.put(0);
b.id?.put(0);
b.idUnq?.put(0);
b.tag?.put(0);
b.tagUpdate?.put(0);
b.tagMatch?.put(0);
b.comp?.put(0);
b.persist?.put(0);
b.trace?.put(0);
b.loop?.put(0);
b.resp?.put(0);
b.busy?.put(0);
b.user?.put(0);
});
// wait for reset to complete before driving anything
await sys.resetN.nextPosedge;
while (!Simulator.simulationHasEnded) {
if (pendingSeqItems.isNotEmpty) {
await _drivePacket(pendingSeqItems.removeFirst());
} else {
await sys.clk.nextPosedge;
}
}
}