AllocatedLane<LogicType extends Logic> constructor

AllocatedLane<LogicType extends Logic>(
  1. LogicType data, {
  2. required int tagWidth,
  3. String? name,
})

Creates an optionally allocated lane payload.

Implementation

AllocatedLane(LogicType data, {required this.tagWidth, String? name})
    : super([
        data,
        Logic(name: 'tag', width: tagWidth),
        Logic(name: 'allocated')
      ], name: name ?? '${data.name}_allocated_lane') {
  if (tagWidth < 1) {
    throw ArgumentError.value(tagWidth, 'tagWidth', 'Must be positive.');
  }
}