@@ -366,12 +366,12 @@ mixin Cosim on ExternalSystemVerilogModule {
366366
367367 _receivedStream
368368 .where ((event) => event.cosimMessageType == _CosimMessageType .end)
369- .listen ((event) {
369+ .listen ((event) async {
370370 logger? .info ('Received an indication that the simulator has finished.' );
371371 if (onEnd != null ) {
372372 onEnd ();
373373 }
374- Simulator .endSimulation ();
374+ unawaited ( Simulator .endSimulation () );
375375 });
376376
377377 // set up initial values
@@ -392,7 +392,7 @@ mixin Cosim on ExternalSystemVerilogModule {
392392 continue ;
393393 }
394394
395- modInput.glitch.listen ((event) {
395+ modInput.glitch.listen ((event) async {
396396 // TODO(mkorbel1): test for clock divider bug, https://github.com/intel/rohd-cosim/issues/6
397397
398398 if (Simulator .phase != SimulatorPhase .clkStable) {
@@ -404,7 +404,7 @@ mixin Cosim on ExternalSystemVerilogModule {
404404 // driving it, so hold onto it for later
405405 registree._inputsPendingPostUpdate.add (modInput);
406406 if (! registree._pendingPostUpdate) {
407- Simulator .postTick.first.then ((value) {
407+ unawaited ( Simulator .postTick.first.then ((value) {
408408 // once the tick has completed, we can update the override maps
409409 for (final driverInput in registree._inputsPendingPostUpdate) {
410410 registree._inputToPreTickInputValuesMap[driverInput] =
@@ -419,7 +419,7 @@ mixin Cosim on ExternalSystemVerilogModule {
419419 await _sendPendingUpdates (
420420 throwOnUnexpectedEnd: throwOnUnexpectedEnd);
421421 });
422- });
422+ })) ;
423423 }
424424 registree._pendingPostUpdate = true ;
425425 }
0 commit comments