slice method
override
Creates a slice of this port from endIndex
down to startIndex
.
Both indices are inclusive. For example, slice(7, 0)
would create a
reference to bits 7 through 0 of the port.
Implementation
@override
PortReference slice(int endIndex, int startIndex) {
final (newLowerIndex, newUpperIndex) =
getUpdatedSliceIndices(endIndex, startIndex);
return SlicePortReference(
module,
portName,
dimensionAccess: dimensionAccess,
sliceLowerIndex: newLowerIndex,
sliceUpperIndex: newUpperIndex,
);
}