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(() {
intf.csb.put(1);
intf.mosi.put(0);
});
while (!Simulator.simulationHasEnded) {
if (pendingSeqItems.isNotEmpty) {
await _drivePacket(pendingSeqItems.removeFirst());
} else {
await clk.nextNegedge;
Simulator.injectAction(() {
intf.csb.put(1);
_clkenable.inject(0);
intf.mosi.put(0);
});
}
}
}