createModule method
override
Creates a Module instance as configured.
Implementation
@override
Module createModule() {
final capacity = max(1, capacityKnob.value);
final maximumMerges = max(1, maximumMergesKnob.value);
final lineAddressWidth = max(1, lineAddressWidthKnob.value);
final transactionTagWidth = max(1, transactionTagWidthKnob.value);
final metadataWidth = max(1, metadataWidthKnob.value);
final indexWidth = max(1, capacity.log2Ceil);
final mergeCountWidth = max(1, (maximumMerges + 1).log2Ceil);
final entry = MissStatusEntry(
Logic(name: 'acquire_metadata', width: metadataWidth),
lineAddressWidth: lineAddressWidth,
transactionTagWidth: transactionTagWidth,
mergeCountWidth: mergeCountWidth,
);
return MissStatusTable<Logic>(
clk: Logic(name: 'clk'),
reset: Logic(name: 'reset'),
acquire: ReadyAndValidInterface<MissStatusEntry<Logic>>(entry),
release:
ReadyAndValidInterface<TagRelease>(TagRelease(tagWidth: indexWidth)),
issue:
ReadyAndValidInterface<TagRelease>(TagRelease(tagWidth: indexWidth)),
complete:
ReadyAndValidInterface<TagRelease>(TagRelease(tagWidth: indexWidth)),
lookupEnable: Logic(name: 'lookupEnable'),
lookupLineAddress:
Logic(name: 'lookupLineAddress', width: lineAddressWidth),
capacity: capacity,
maximumMerges: maximumMerges,
readLatency: max(1, readLatencyKnob.value),
);
}