instantiate method

void instantiate({
  1. required Logic clk,
  2. required Logic reset,
  3. required Logic flush,
  4. required ReadyValidInterface<LogicType> upstream,
  5. required ReadyValidInterface<LogicType> downstream,
  6. required String name,
})

Instantiates this binding on compatible ready/valid interfaces.

Implementation

void instantiate(
    {required Logic clk,
    required Logic reset,
    required Logic flush,
    required ReadyValidInterface<LogicType> upstream,
    required ReadyValidInterface<LogicType> downstream,
    required String name}) {
  if (upstream.data.width != request.dataWidth ||
      downstream.data.width != request.dataWidth) {
    throw ArgumentError('Bound queue interfaces do not match the resolved '
        'storage request.');
  }
  if (!rohdPayloadsCompatible([upstream.data, downstream.data],
      ignoreConstantNames: true)) {
    throw ArgumentError('Bound queue payload schemas must be compatible.');
  }
  final build =
      implementation._build as ReadyValidStorageQueueBuilder<LogicType>;
  build(
      clk: clk,
      reset: reset,
      flush: flush,
      upstream: upstream,
      downstream: downstream,
      depth: request.depth,
      requestedOutputLatency: request.requestedOutputLatency,
      name: name);
}