SharedStorageChannelTracking constructor
Creates a tracker for a single channel in a large shared queue.
The popReplacementIndex is the new head of the queue for this channel
from storage.
Implementation
SharedStorageChannelTracking(
this.channelId, {
required this.indexWidth,
required Logic clk,
required Logic reset,
required Logic push,
required Logic pushIndex,
required Logic pop,
required Logic popReplacementIndex,
SharedStorageOccupancyObserver? occupancyObserver,
}) : super(name: 'ch${channelId}_tracking') {
this.clk = addInput('clk', clk);
this.reset = addInput('reset', reset);
this.push = addInput('push', push);
this.pushIndex = addInput('pushIndex', pushIndex, width: pushIndex.width);
this.pop = addInput('pop', pop);
this.popReplacementIndex = addInput(
'popReplacementIndex',
popReplacementIndex,
width: popReplacementIndex.width,
);
addOutput('firstIndex', width: indexWidth);
addOutput('lastIndex', width: indexWidth);
addOutput('empty');
addOutput('nextFirstIndex', width: indexWidth);
addOutput('nextFirstIndexValid');
_buildLogic(occupancyObserver);
}