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(() {
lm.openAck.put(0);
lm.askClose.put(0);
});
// wait for reset to complete before driving anything
await sys.resetN.nextPosedge;
while (!Simulator.simulationHasEnded) {
if (_openAck) {
lm.openAck.put(1);
} else {
lm.openAck.put(0);
}
if (_askClose) {
lm.askClose.put(1);
} else {
lm.askClose.put(0);
}
await sys.clk.nextPosedge;
}
}