DataPortInterface<LogicType extends Logic>.typed constructor
- LogicType data,
- int addrWidth
Constructs a memory port with a type-preserving clone of data.
data is a schema, not a driver. Drive the returned interface's data
for writes, or consume it for reads.
Implementation
DataPortInterface.typed(LogicType data, this.addrWidth)
: dataWidth = data.width {
setPorts([Logic.port('en'), Logic.port('addr', addrWidth)],
[DataPortGroup.control]);
setPorts([cloneTypedPayload(data, name: 'data')], [DataPortGroup.data]);
}