Pipeline constructor
Constructs a simple pipeline, separating arbitrary combinational logic by flop stages.
Each stage in the list stages
is a function whose sole parameter is a
PipelineStageInfo object and which returns a List of Conditional
objects. Each stage can be thought of as being the contents of a
Combinational block. Use the PipelineStageInfo object to grab
signals for a given pipe stage. Flops are positive edge triggered
based on clk
.
Signals to be pipelined can optionally be specified in the signals
list. Any signal referenced in a stage via the PipelineStageInfo
will automatically be included in the entire pipeline.
If a reset
signal is provided, then it will be consumed as an
active-high reset for every signal through the pipeline. The default
reset value is 0 for all signals, but that can be overridden by
setting resetValues
to the desired value. The values specified
in resetValues
should be a type acceptable to Logic's put
function.
Each stage can be stalled independently using stalls
, where every index
of stalls
corresponds to the index of the stage to be stalled. When
a stage's stall is asserted, the output of that stage will not change.
Implementation
Pipeline