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);
MissStatusEntry<Logic> entry(String entryName) =>
MissStatusEntry(Logic(name: entryName, width: metadataWidth),
lineAddressWidth: lineAddressWidth,
transactionTagWidth: transactionTagWidth,
mergeCountWidth: mergeCountWidth);
return CombinationalMissStatusTable<Logic>(
clk: Logic(name: 'clk'),
reset: Logic(name: 'reset'),
acquire: ReadyAndValidInterface<MissStatusEntry<Logic>>(
entry('acquire_metadata')),
release:
ReadyAndValidInterface<TagRelease>(TagRelease(tagWidth: indexWidth)),
issue:
ReadyAndValidInterface<TagRelease>(TagRelease(tagWidth: indexWidth)),
complete:
ReadyAndValidInterface<TagRelease>(TagRelease(tagWidth: indexWidth)),
lookupLineAddress:
Logic(name: 'lookupLineAddress', width: lineAddressWidth),
capacity: capacity,
maximumMerges: maximumMerges,
);
}