Queue

chisel3.util.Queue
See theQueue companion class
object Queue

Factory for a generic hardware queue.

Attributes

Companion
class
Source
Queue.scala
Graph
Supertypes
class Object
trait Matchable
class Any
Self type
Queue.type

Members list

Type members

Classlikes

A factory for creating shadow queues. This is created using the withShadow method.

A factory for creating shadow queues. This is created using the withShadow method.

Attributes

Source
Queue.scala
Supertypes
class Object
trait Matchable
class Any

Value members

Concrete methods

def apply[T <: Data](enq: ReadyValidIO[T], entries: Int = ..., pipe: Boolean = ..., flow: Boolean = ..., useSyncReadMem: Boolean = ..., flush: Option[Bool] = ...): DecoupledIO[T]

Create a Queue and supply a DecoupledIO containing the product.

Create a Queue and supply a DecoupledIO containing the product.

Value parameters

enq

input (enqueue) interface to the queue, also determines type of queue elements.

entries

depth (number of elements) of the queue

flow

True if the inputs can be consumed on the same cycle (the inputs "flow" through the queue immediately). The valid signals are coupled.

flush

Optional Bool signal, if defined, the Queue.hasFlush will be true, and connect correspond signal to Queue instance.

pipe

True if a single entry queue can run at full throughput (like a pipeline). The ready signals are combinationally coupled.

useSyncReadMem

True uses SyncReadMem instead of Mem as an internal memory element.

Attributes

Returns

output (dequeue) interface from the queue.

Example
 consumer.io.in <> Queue(producer.io.out, 16)
Source
Queue.scala
def irrevocable[T <: Data](enq: ReadyValidIO[T], entries: Int = ..., pipe: Boolean = ..., flow: Boolean = ..., useSyncReadMem: Boolean = ..., flush: Option[Bool] = ...): IrrevocableIO[T]

Create a queue and supply a IrrevocableIO containing the product. Casting from DecoupledIO is safe here because we know the Queue has Irrevocable semantics. we didn't want to change the return type of apply() for backwards compatibility reasons.

Create a queue and supply a IrrevocableIO containing the product. Casting from DecoupledIO is safe here because we know the Queue has Irrevocable semantics. we didn't want to change the return type of apply() for backwards compatibility reasons.

Value parameters

enq

DecoupledIO signal to enqueue.

entries

The max number of entries in the queue

flow

True if the inputs can be consumed on the same cycle (the inputs "flow" through the queue immediately). The ''valid'' signals are coupled.

flush

Optional Bool signal, if defined, the Queue.hasFlush will be true, and connect correspond signal to Queue instance.

pipe

True if a single entry queue can run at full throughput (like a pipeline). The ''ready'' signals are combinationally coupled.

useSyncReadMem

True uses SyncReadMem instead of Mem as an internal memory element.

Attributes

Returns

a DecoupledIO signal which should connect to the dequeue signal.

Example
 consumer.io.in <> Queue(producer.io.out, 16)
Source
Queue.scala
def withShadow[T <: Data](enq: ReadyValidIO[T], entries: Int = ..., pipe: Boolean = ..., flow: Boolean = ..., useSyncReadMem: Boolean = ..., flush: Option[Bool] = ...): (DecoupledIO[T], ShadowFactory)

Create a Queue and supply a DecoupledIO containing the product. This additionally returns a ShadowFactory which can be used to build shadow datapaths that work in lockstep with this Queue.

Create a Queue and supply a DecoupledIO containing the product. This additionally returns a ShadowFactory which can be used to build shadow datapaths that work in lockstep with this Queue.

Value parameters

enq

input (enqueue) interface to the queue, also determines type of queue elements.

entries

depth (number of elements) of the queue

flow

True if the inputs can be consumed on the same cycle (the inputs "flow" through the queue immediately). The valid signals are coupled.

flush

Optional Bool signal, if defined, the Queue.hasFlush will be true, and connect correspond signal to Queue instance.

pipe

True if a single entry queue can run at full throughput (like a pipeline). The ready signals are combinationally coupled.

useSyncReadMem

True uses SyncReadMem instead of Mem as an internal memory element.

Attributes

Returns

output (dequeue) interface from the queue and a ShadowFactory for creating shadow Queues

Source
Queue.scala