createModule method
override
Creates a Module instance as configured.
Implementation
@override
Module createModule() {
final checkpointCount = max(1, checkpointCountKnob.value);
final logicalCount = max(1, logicalCountKnob.value);
final mappingWidth = max(1, mappingWidthKnob.value);
final checkpointTagWidth = max(1, checkpointCount.log2Ceil);
return RenameCheckpointBank(
clk: Logic(name: 'clk'),
reset: Logic(name: 'reset'),
capture: ReadyAndValidInterface<Logic>(
Logic(name: 'capture_checkpoint', width: checkpointTagWidth)),
release: ReadyAndValidInterface<TagRelease>(
TagRelease(tagWidth: checkpointTagWidth)),
liveMappings: [
for (var index = 0; index < logicalCount; index++)
Logic(name: 'liveMapping$index', width: mappingWidth)
],
selectedCheckpoint:
Logic(name: 'selectedCheckpoint', width: checkpointTagWidth),
checkpointCount: checkpointCount,
);
}