AssociativeMemoryRequest constructor
- required int keyWidth,
- required int indexWidth,
- required int entryCount,
- required int updatePortCount,
- required int lookupPortCount,
- required int lookupLatency,
- required AssociativeDuplicateKeyPolicy duplicateKeyPolicy,
- required AssociativeMatchSelection matchSelection,
- required AssociativeResultShape resultShape,
- required AssociativeLookupUpdatePolicy lookupUpdatePolicy,
- required AssociativeUpdateCollisionPolicy updateCollisionPolicy,
- AssociativeMatchMode matchMode = AssociativeMatchMode.exact,
- int updateLatency = 0,
- AssociativeMemoryResetBehavior requiredResetBehavior = AssociativeMemoryResetBehavior.none,
- AssociativeMemoryResetTiming requiredResetTiming = AssociativeMemoryResetTiming.synchronous,
- bool requiresIndexedSideRead = false,
- int? indexedSideReadCount,
- bool requiresValidityMask = false,
Creates an associative-memory request.
Implementation
AssociativeMemoryRequest({
required this.keyWidth,
required this.indexWidth,
required this.entryCount,
required this.updatePortCount,
required this.lookupPortCount,
required this.lookupLatency,
required this.duplicateKeyPolicy,
required this.matchSelection,
required this.resultShape,
required this.lookupUpdatePolicy,
required this.updateCollisionPolicy,
this.matchMode = AssociativeMatchMode.exact,
this.updateLatency = 0,
this.requiredResetBehavior = AssociativeMemoryResetBehavior.none,
this.requiredResetTiming = AssociativeMemoryResetTiming.synchronous,
bool requiresIndexedSideRead = false,
int? indexedSideReadCount,
this.requiresValidityMask = false,
}) : indexedSideReadCount =
indexedSideReadCount ?? (requiresIndexedSideRead ? 1 : 0),
_legacySideReadRequirement =
requiresIndexedSideRead && indexedSideReadCount == null,
requiresIndexedSideRead =
requiresIndexedSideRead || (indexedSideReadCount ?? 0) > 0 {
if (requiresIndexedSideRead && this.indexedSideReadCount == 0) {
throw ArgumentError('An indexed side-read request must have a port.');
}
validate();
}