Axi4SubordinateMemoryAgent constructor
- required Axi4SystemInterface sIntf,
- required List<
Axi4SubordinateClusterAgent> lanes, - required Component parent,
- MemoryStorage? storage,
- int readResponseDelay(
- Axi4RequestPacket request
- int writeResponseDelay(
- Axi4RequestPacket request
- bool respondWithError(
- Axi4RequestPacket request
- bool invalidReadDataOnError = true,
- bool dropWriteDataOnError = true,
- List<
AxiAddressRange> ranges = const [], - bool supportLocking = false,
- String name = 'axi4SubordinateMemoryAgent',
Creates a new model Axi4SubordinateMemoryAgent.
If no storage is provided, it will use a default SparseMemoryStorage.
Implementation
Axi4SubordinateMemoryAgent(
{required this.sIntf,
required this.lanes,
required Component parent,
MemoryStorage? storage,
this.readResponseDelay,
this.writeResponseDelay,
this.respondWithError,
this.invalidReadDataOnError = true,
this.dropWriteDataOnError = true,
this.ranges = const [],
this.supportLocking = false,
String name = 'axi4SubordinateMemoryAgent'})
: super(name, parent) {
var maxAddrWidth = 0;
var maxDataWidth = 0;
for (var i = 0; i < lanes.length; i++) {
maxAddrWidth = max(maxAddrWidth, lanes[i].arIntf.addrWidth);
maxDataWidth = max(maxDataWidth, lanes[i].rIntf.dataWidth);
}
this.storage = storage ??
SparseMemoryStorage(
addrWidth: maxAddrWidth,
dataWidth: maxDataWidth,
);
for (var i = 0; i < lanes.length; i++) {
// read side handling
_dataReadResponseMetadataQueue.add([]);
_dataReadResponseDataQueue.add([]);
// _dataReadResponseErrorQueue.add([]);
_dataReadResponseIndex.add(0);
_readAddrToChannel[i] = _dataReadResponseMetadataQueue.length - 1;
// write side handling
_writeMetadataQueue.add([]);
_writeDataQueue.add([]);
_writeReadyToOccur.add(false);
_writeAddrToChannel[i] = _writeMetadataQueue.length - 1;
}
}