resolve method

dynamic resolve(
  1. String runtimeInputName
)

Resolves to a static value or a named runtime StaticOrRuntimeControl.

Implementation

dynamic resolve(String runtimeInputName) {
  if (!isRuntime) {
    return staticValueKnob.value;
  }
  if (runtimeWidthKnob.value <= 0) {
    throw RohdHclException(
        'Runtime input "$runtimeInputName" must have a positive width.');
  }
  return StaticOrRuntimeControl<int>(
    name: runtimeInputName,
    staticConfig: staticValueKnob.value ?? 0,
    runtimeConfig: Logic(
      name: runtimeInputName,
      width: runtimeWidthKnob.value,
    ),
  );
}