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));

  Simulator.injectAction(() {
    rIntf.arValid.put(0);
    rIntf.arId?.put(0);
    rIntf.arAddr.put(0);
    rIntf.arLen?.put(0);
    rIntf.arSize?.put(0);
    rIntf.arBurst?.put(0);
    rIntf.arLock?.put(0);
    rIntf.arCache?.put(0);
    rIntf.arProt.put(0);
    rIntf.arQos?.put(0);
    rIntf.arRegion?.put(0);
    rIntf.arUser?.put(0);
    rIntf.rReady.put(0);
  });

  // wait for reset to complete before driving anything
  await sIntf.resetN.nextPosedge;

  while (!Simulator.simulationHasEnded) {
    if (pendingSeqItems.isNotEmpty) {
      await _drivePacket(pendingSeqItems.removeFirst());
    } else {
      await sIntf.clk.nextPosedge;
    }
  }
}