Copyright | (c) Matthew Naylor 2019 (c) Alexandre Joannou 2019-2021 |
---|---|
License | MIT |
Maintainer | mattfn@gmail.com |
Stability | experimental |
Safe Haskell | Safe-Inferred |
Synopsis
- data Queue a = Queue {}
- makeQueue :: Bits a => Module (Queue a)
- makeSizedQueue :: Bits a => Int -> Module (Queue a)
- data SizedQueueConfig a = SizedQueueConfig {
- sizedQueueLogSize :: Int
- sizedQueueBuffer :: Module (Queue a)
- makeSizedQueueConfig :: Bits a => SizedQueueConfig a -> Module (Queue a)
- makeSizedQueueCore :: Bits a => Int -> Module (Queue a)
- data ShiftQueueMode
- makeShiftQueue :: Bits a => Int -> Module (Queue a)
- makePipelineQueue :: Bits a => Int -> Module (Queue a)
- makeShiftQueueCore :: Bits a => ShiftQueueMode -> Int -> Module (Queue a, [Option a])
- makeBypassQueue :: Bits a => Module (Queue a)
- makeSinkBuffer :: Bits a => Module (Queue a) -> Sink a -> Module (Sink a)
Documentation
Queue interface
Instances
Generic (Queue a) # | |
(Interface a, Bits a) => Interface (Queue a) # | |
ToSink (Queue t) t # | ToSink instance for Queue |
ToSource (Queue t) t # | ToSource instance for Queue |
ToSP (Queue a) a a # | ToSP instance for Queue |
type Rep (Queue a) # | |
Defined in Blarney.Queue type Rep (Queue a) = D1 ('MetaData "Queue" "Blarney.Queue" "main" 'False) (C1 ('MetaCons "Queue" 'PrefixI 'True) ((S1 ('MetaSel ('Just "notEmpty") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Bit 1)) :*: (S1 ('MetaSel ('Just "notFull") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Bit 1)) :*: S1 ('MetaSel ('Just "enq") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (a -> Action ())))) :*: ((S1 ('MetaSel ('Just "deq") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Action ())) :*: S1 ('MetaSel ('Just "canDeq") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Bit 1))) :*: (S1 ('MetaSel ('Just "first") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a) :*: S1 ('MetaSel ('Just "clear") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Action ())))))) |
makeQueue :: Bits a => Module (Queue a) Source #
A full-throughput 2-element queue implemented using 2 registers:
- No combinatorial paths between sides.
- There's a mux on the enqueue path.
data SizedQueueConfig a Source #
Config options for a sized queue
SizedQueueConfig | |
|
makeSizedQueueConfig :: Bits a => SizedQueueConfig a -> Module (Queue a) Source #
Sized queue with config options
makeSizedQueueCore :: Bits a => Int -> Module (Queue a) Source #
This one has no output buffer (low latency, but not great for Fmax)
data ShiftQueueMode Source #
There are modes of operation for the shift queue (below):
- Optimise throughput: full throughput, but there's a combinatorial path between notFull and deq
- Optimise Fmax: no combinatorial paths between sides, but max throughput = N/(N+1), where N is the queue capacity
Instances
Eq ShiftQueueMode # | |
Defined in Blarney.Queue (==) :: ShiftQueueMode -> ShiftQueueMode -> Bool # (/=) :: ShiftQueueMode -> ShiftQueueMode -> Bool # |
makeShiftQueue :: Bits a => Int -> Module (Queue a) Source #
An N-element queue implemented using a shift register:
- No muxes: input element goes straight to a register and output element comes straight from a register.
- N-cycle latency between enqueuing an element and being able to dequeue it, where N is the queue capacity.
This version optimised for Fmax.
makePipelineQueue :: Bits a => Int -> Module (Queue a) Source #
This version is optimised for throughput