selectRegisterFileFunctor method

RegisterFileFunctor selectRegisterFileFunctor()

Selects a combinational-read register-file implementation.

A synchronous SRAM binding cannot satisfy this interface without changing the component's read timing. Use a compatible register-file functor directly when an external asynchronous-read implementation is needed.

Implementation

RegisterFileFunctor selectRegisterFileFunctor() => switch (backing) {
      MemoryBacking.automatic when sramFunctor == null =>
        flopRegisterFileFunctor,
      MemoryBacking.flop => flopRegisterFileFunctor,
      MemoryBacking.model => registerFileModelFunctor,
      MemoryBacking.automatic || MemoryBacking.sram => throw UnsupportedError(
          'A synchronous SRAM binding cannot provide combinational '
          'register-file reads.'),
    };