portableExecutionImage method

String portableExecutionImage()

Captures the component's execution state at a settled tick boundary.

Future events and external inputs are not included. The clock must be known and unchanged across the boundary.

Implementation

String portableExecutionImage() {
  if (Simulator.phase != SimulatorPhase.outOfTick) {
    throw StateError('Associative execution images require a tick boundary.');
  }
  if (!clk.value.isValid || _resetSeen == null) {
    throw StateError(
        'Execution image requires a known clock and reset history.');
  }
  return '${description.portableExecutionIdentity} '
      '${MemoryValueCodec.binary(clk.value)} ${_resetSeen! ? '1' : '0'}\n'
      '${_model.snapshot().toPortableString()}';
}