addInputArray method
- String name,
- Logic source, {
- List<
int> dimensions = const [1], - int elementWidth = 1,
- int numUnpackedDimensions = 0,
inherited
Registers and returns an input LogicArray port to this Module with
the specified dimensions, elementWidth, and numUnpackedDimensions
named name.
This is very similar to addInput, except for LogicArrays.
Performs validation on overall width matching for source, but not on
dimensions, elementWidth, or numUnpackedDimensions.
Implementation
LogicArray addInputArray(
String name,
Logic source, {
List<int> dimensions = const [1],
int elementWidth = 1,
int numUnpackedDimensions = 0,
}) {
_checkForSafePortName(name);
final inArr = LogicArray(
name: name,
dimensions,
elementWidth,
numUnpackedDimensions: numUnpackedDimensions,
naming: Naming.reserved,
)
..gets(source)
..setAllParentModule(this);
_inputs[name] = inArr;
_inputSources[name] = source;
return inArr;
}