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 sIntf.resetN.nextPosedge;
sIntf.clk.posedge.listen((event) {
if (rIntf.valid.previousValue!.isValid &&
rIntf.ready.previousValue!.isValid &&
rIntf.valid.previousValue!.toBool() &&
rIntf.ready.previousValue!.toBool()) {
final lastCheck = rIntf.last.previousValue!.isValid &&
rIntf.last.previousValue!.toBool();
final curr = rIntf.data.value;
final currS = rIntf.strb.value;
final currK = rIntf.keep.value;
_dataBuf.add(curr);
_strbBuf.add(currS);
_keepBuf.add(currK);
if (lastCheck) {
add(
Axi4StreamPacket(
data: _dataBuf.rswizzle(),
strb: _strbBuf.rswizzle(),
keep: _keepBuf.rswizzle(),
id: rIntf.id?.previousValue,
user: rIntf.user?.previousValue,
dest: rIntf.dest?.previousValue),
);
_dataBuf.clear();
_strbBuf.clear();
_keepBuf.clear();
}
}
});
}