sramScanAssociativeMemoryContract function

ScheduledAssociativeMemoryContract sramScanAssociativeMemoryContract({
  1. required int keyWidth,
  2. required int entryCount,
  3. required int readLatency,
  4. required SynchronousMemoryFunctor memoryFunctor,
  5. AssociativeMatchMode matchMode = AssociativeMatchMode.exact,
  6. AssociativeMatchSelection matchSelection = AssociativeMatchSelection.lowestIndex,
  7. AssociativeResultShape resultShape = AssociativeResultShape.matchVectorAndSelectedIndex,
  8. AssociativeMemoryResetTiming resetTiming = AssociativeMemoryResetTiming.synchronous,
})

The contract of an SRAM scan over entryCount keys of keyWidth bits.

Implementation

ScheduledAssociativeMemoryContract sramScanAssociativeMemoryContract({
  required int keyWidth,
  required int entryCount,
  required int readLatency,
  required SynchronousMemoryFunctor memoryFunctor,
  AssociativeMatchMode matchMode = AssociativeMatchMode.exact,
  AssociativeMatchSelection matchSelection =
      AssociativeMatchSelection.lowestIndex,
  AssociativeResultShape resultShape =
      AssociativeResultShape.matchVectorAndSelectedIndex,
  AssociativeMemoryResetTiming resetTiming =
      AssociativeMemoryResetTiming.synchronous,
}) =>
    ScheduledAssociativeMemoryContract(
      keyWidth: keyWidth,
      indexWidth: scheduledAssociativeIndexWidth(entryCount),
      entryCount: entryCount,
      duplicateKeyPolicy: AssociativeDuplicateKeyPolicy.allow,
      matchSelection: matchSelection,
      resultShape: resultShape,
      matchMode: matchMode,
      updateAdmission:
          ScheduledAssociativeUpdateAdmission.whenIdleUpdatePriority,
      maximumOutstandingLookups: 1,
      responsesInOrder: true,
      minimumResponseLatency: entryCount * (readLatency + 1),
      maximumResponseLatency: entryCount * (readLatency + 1),
      minimumInitiationInterval: entryCount * (readLatency + 1) + 1,
      resetBehavior: AssociativeMemoryResetBehavior.clearValidity,
      resetTiming: resetTiming,
      implementationKind: AssociativeMemoryImplementationKind.synthesizable,
      backingIdentity: memoryFunctor.identity,
      backingResetBehavior: memoryFunctor.capabilities.resetBehavior,
      backingImplementationKind: memoryFunctor.capabilities.implementationKind,
    );