CacheLookupPort<T extends Logic> constructor

CacheLookupPort<T extends Logic>({
  1. required T dataSchema,
  2. int? addrWidth,
  3. @Deprecated('Use addrWidth instead.') int? addressWidth,
})

Creates a lookup port with a typed data schema.

addressWidth is the deprecated former name of addrWidth.

Implementation

CacheLookupPort({
  required T dataSchema,
  int? addrWidth,
  @Deprecated('Use addrWidth instead.') int? addressWidth,
}) : super(
        portsFromProvider: [
          Logic.port('valid'),
          Logic.port('address', resolveAddrWidth(addrWidth, addressWidth)),
        ],
        portsFromConsumer: [
          Logic.port('ready'),
          Logic.port('hit'),
          cloneTypedPayload(dataSchema, name: 'data'),
        ],
      );