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) =>
startIndex == 0 && endIndex == width - 1
? this
: SlicePortReference(
module,
portName,
sliceLowerIndex: startIndex,
sliceUpperIndex: endIndex,
);