Pipeline module generator parameterized by data type and latency.
This defines a module with one input, enq, and one output, deq. The input and output are Valid interfaces
that wrap some Chisel type, e.g., a UInt or a Bundle. This generator will then chain together a number of
pipeline stages that all advance when the input Validenq fires. The output deqValid will fire only
when valid data has made it all the way through the pipeline.
As an example, to construct a 4-stage pipe of 8-bit UInts and connect it to a producer and consumer, you can use
the following:
If you already have the Valid input or the components of a Valid interface, it may be simpler to use the
Pipe factory companion object. This, which Pipe internally utilizes, will automatically connect the
input for you.
Pipeline module generator parameterized by data type and latency.
This defines a module with one input,
enq
, and one output,deq
. The input and output are Valid interfaces that wrap some Chisel type, e.g., a UInt or a Bundle. This generator will then chain together a number of pipeline stages that all advance when the input Validenq
fires. The outputdeq
Valid will fire only when valid data has made it all the way through the pipeline.As an example, to construct a 4-stage pipe of 8-bit UInts and connect it to a producer and consumer, you can use the following:
If you already have the Valid input or the components of a Valid interface, it may be simpler to use the Pipe factory companion object. This, which Pipe internally utilizes, will automatically connect the input for you.
The ShiftRegister factory to generate a pipe without a Valid interface
Queue and the Queue factory for actual queues
Valid interface
Pipe factory for an alternative API