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 sys.resetN.nextPosedge;
sys.clk.posedge.listen((event) {
if (strm.valid.previousValue!.isValid &&
strm.ready!.previousValue!.isValid &&
strm.valid.previousValue!.toBool() &&
strm.ready!.previousValue!.toBool()) {
add(
Axi5StreamPacket(
data: strm.data?.previousValue!.toBigInt() ?? BigInt.from(0),
strb: strm.strb?.previousValue!.toInt(),
keep: strm.keep?.previousValue!.toInt(),
id: strm.id?.previousValue!.toInt(),
user: strm.user?.previousValue!.toInt(),
dest: strm.dest?.previousValue!.toInt(),
last: strm.last?.previousValue!.toBool(),
wakeup: strm.wakeup?.previousValue!.toBool()),
);
}
});
}