run method

  1. @override
Future<void> run(
  1. 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 isAce = rIntf is Ace4RequestChannel;
      add(
        Axi4RequestPacket(
          addr: rIntf.addr.previousValue!,
          prot: rIntf.prot.previousValue!,
          id: rIntf.id?.previousValue,
          len: rIntf.len?.previousValue,
          size: rIntf.size?.previousValue,
          burst: rIntf.burst?.previousValue,
          lock: rIntf.lock?.previousValue,
          cache: rIntf.cache?.previousValue,
          qos: rIntf.qos?.previousValue,
          region: rIntf.region?.previousValue,
          user: rIntf.user?.previousValue,
          domain: (isAce
              ? (rIntf as Ace4RequestChannel).domain?.previousValue
              : null),
          bar: (isAce
              ? (rIntf as Ace4RequestChannel).bar?.previousValue
              : null),
        ),
      );
    }
  });
}