Skip to content

Latest commit

 

History

History
82 lines (66 loc) · 8.17 KB

linebuffer.rst

File metadata and controls

82 lines (66 loc) · 8.17 KB

LineBuffer

LineBuffers are two dimensional, on-chip scratchpads with a fixed size. LineBuffers act as a FIFO on input, supporting only queued writes, but support addressed reading like SRAMs. For writes, the current row buffer and column is maintained using an internal counter. This counter resets every time the controller containing the enqueue completes execution.

The contents of LineBuffers are persistent across loop iterations, even when they are declared in an inner scope. Up to 5-dimensional LineBuffers are currently supported.


Static methods

object LineBuffer
Allocates a LineBuffer with given rows and cols.
The contents of this LineBuffer are initially undefined.
rows and cols must be statically determinable integers.
Allocates a LineBuffer with given number of rows and cols, and with given stride.
The contents of this LineBuffer are initially undefined.
rows, cols, and stride must be statically determinable integers.

Infix methods

class LineBuffer[T]
Creates a load port to this LineBuffer at the given row and col.
Creates a vectorized load port to this LineBuffer at the given row and cols.
Creates a vectorized load port to this LineBuffer at the given rows and col.
Creates an enqueue (write) port of data to this LineBuffer.
Creates an enqueue (write) port of data to this LineBuffer, enabled by en.
Creates a dense transfer from the given region of DRAM to this on-chip memory.