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 sys.resetN.nextPosedge;

  // TODO(kimmeljo): anything to do with crediting here??

  sys.clk.posedge.listen((event) {
    if (lc.valid.previousValue!.isValid && lc.valid.previousValue!.toBool()) {
      add(LtiLcChannelPacket(
        user: lc.userMixInEnable
            ? Axi5UserSignalsStruct(user: lc.user?.previousValue!.toInt())
            : null,
        tag: lc.ctag.previousValue!.toInt(),
      ));
    }
  });
}