createModule method

  1. @override
Module createModule()
override

Creates a Module instance as configured.

Implementation

@override
Module createModule() {
  final entryCount = max(1, entryCountKnob.value);
  final indexWidth = max(1, entryCount.log2Ceil);
  final responseLengthWidth = max(1, responseLengthWidthKnob.value);
  return HeadMetadataCache(
    clk: Logic(name: 'clk'),
    reset: Logic(name: 'reset'),
    lookupIndex: Logic(name: 'lookupIndex', width: indexWidth),
    writeEnable: Logic(name: 'writeEnable'),
    writeIndex: Logic(name: 'writeIndex', width: indexWidth),
    writeEntry: HeadMetadataEntry(
        indexWidth: indexWidth, responseLengthWidth: responseLengthWidth),
    entryCount: entryCount,
  );
}