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));
await reset.nextNegedge;
clk.posedge.listen((event) {
if (!ready.previousValue!.isValid || !valid.previousValue!.isValid) {
logger.severe('Both ready and valid must be valid for protocol,'
' but found ready=${ready.value} and valid=${valid.value}');
} else if (ready.previousValue!.toBool() &&
valid.previousValue!.toBool()) {
add(ReadyValidPacket(data.previousValue!));
}
});
}