DRAM

DRAMs are pointers to locations in the accelerator’s main memory comprising dense multi-dimensional arrays. They are the primary form of communication of data between the host and the accelerator. Data may be loaded to and from the accelerator in contiguous chunks (Tiles), or by bulk scatter and gather operations (SparseTiles).

Up to to 5-dimensional DRAMs are currently supported. Dimensionality of a DRAM instance is encoded by the subclass of DRAM. DRAM1, for instance represents a 1-dimensional DRAM.

A dense DRAMDenseTile can be created from a DRAM either using address range selection or by implicit conversion. When a Tile is created implicitly, it has the same address space as the entire original DRAM.

In Spatial, DRAMs are specified outside the Accel scope in the host code.


Static Methods

object DRAM
def apply[T:Type:Bits](length: Index): DRAM1[T]
Creates a reference to a 1-dimensional array in main memory with the given length.
Dimensions of a DRAM should be statically calculable functions of constants, parameters, and ArgIns.
def apply[T:Type:Bits](d1: Index, d2: Index): DRAM2[T]
Creates a reference to a 2-dimensional array in main memory with given rows and cols.
Dimensions of a DRAM should be statically calculable functions of constants, parameters, and ArgIns.
def apply[T:Type:Bits](d1: Index, d2: Index, d3: Index): DRAM3[T]
Creates a reference to a 3-dimensional array in main memory with given dimensions.

Dimensions of a DRAM should be statically calculable functions of constants, parameters, and ArgIns.
def apply[T:Type:Bits](d1: Index, d2: Index, d3: Index, d4: Index): DRAM4[T]
Creates a reference to a 4-dimensional array in main memory with given dimensions.
Dimensions of a DRAM should be statically calculable functions of constants, parameters, and ArgIns.
def apply[T:Type:Bits](d1: Index, d2: Index, d3: Index, d4: Index, d5: Index): DRAM5[T]
Creates a reference to a 5-dimensional array in main memory with given dimensions.
Dimensions of a DRAM should be statically calculable functions of constants, parameters, and ArgIns.

Infix methods

abstract class DRAM[T]
def address: Int64
Returns the 64-bit physical address in main memory of the start of this DRAM
def dims: List[Index]
Returns a Scala List of the dimensions of this DRAM
class DRAM1[T] extends DRAM[T]
def size: Index
Returns the total number of elements in this DRAM1.
def length: Index
Returns the total number of elements in this DRAM1.
def apply(range: Range): DRAMDenseTile1[T]
Creates a reference to a dense region of this DRAM1 for creating burst loads and stores.
def apply(addrs: SRAM1[Index]): DRAMSparseTile[T]
Creates a reference to a sparse region of this DRAM1 for use in scatter and gather transfers
using all addresses in addrs.
def apply(addrs: SRAM1[Index], size: Index): DRAMSparseTile[T]
Creates a reference to a sparse region of this DRAM1 for use in scatter and gather transfers
using the first size addresses in addrs.
def apply(addrs: FIFO[Index]): DRAMSparseTile[T]
Creates a reference to a sparse region of this DRAM1 for use in scatter and gather transfers
using all addresses in addrs.
def apply(addrs: FIFO[Index], size: Index): DRAMSparseTile[T]
Creates a reference to a sparse region of this DRAM1 for use in scatter and gather transfers
using the first size addresses in addrs.
def apply(addrs: FILO[Index]): DRAMSparseTile[T]
Creates a reference to a sparse region of this DRAM1 for use in scatter and gather transfers
using all addresses in addrs.
def apply(addrs: FILO[Index], size: Index): DRAMSparseTile[T]
Creates a reference to a sparse region of this DRAM1 for use in scatter and gather transfers
using the first size addresses in addrs.
def store(data: SRAM1[T]): Unit
Creates a dense, burst transfer from the given on-chip data to this DRAM’s region of main memory.
def store(data: FIFO[T]): Unit
Creates a dense, burst transfer from the given on-chip data to this DRAM’s region of main memory.
def store(data: FILO[T]): Unit
Creates a dense, burst transfer from the given on-chip data to this DRAM’s region of main memory.
def store(data: RegFile1[T]): Unit
Creates a dense, burst transfer from the given on-chip data to this DRAM’s region of main memory.
class DRAM2[T] extends DRAM[T]
def rows: Index
Returns the number of rows in this DRAM2
def cols: Index
Returns the number of columns in this DRAM2
def size: Index
Returns the total number of elements in this DRAM2
def apply(row: Index, cols: Range)
Creates a reference to a dense slice of a row of this DRAM2 for creating burst loads and stores.
def apply(rows: Range, col: Index)
Creates a reference to a dense slice of a column of this DRAM2 for creating burst loads and stores.
def apply(rows: Range, cols: Range)
Creates a reference to a 2-dimensional, dense region of this DRAM2 for creating burst loads and stores.
def store(sram: SRAM2[T]): Unit
Creates a dense, burst transfer from the given on-chip data to this DRAM’s region of main memory.
def store(regs: RegFile2[T]): Unit
Creates a dense, burst transfer from the given on-chip data to this DRAM’s region of main memory.
class DRAM3[T] extends DRAM[T]
def dim0: Index
Returns the first dimension for this DRAM3.
def dim1: Index
Returns the second dimension for this DRAM3.
def dim2: Index
Returns the third dimension for this DRAM3.
def size: Index
Returns the total number of elements in this DRAM3.
def apply(p: Index, r: Index, c: Range)
Creates a reference to a 1-dimensional, dense region of this DRAM3 for creating burst loads and stores.
def apply(p: Index, r: Range, c: Index)
Creates a reference to a 1-dimensional, dense region of this DRAM3 for creating burst loads and stores.
def apply(p: Range, r: Index, c: Index)
Creates a reference to a 1-dimensional, dense region of this DRAM3 for creating burst loads and stores.
def apply(p: Index, r: Range, c: Range)
Creates a reference to a 2-dimensional, dense region of this DRAM3 for creating burst loads and stores.
def apply(p: Range, r: Index, c: Range)
Creates a reference to a 2-dimensional, dense region of this DRAM3 for creating burst loads and stores.
def apply(p: Range, r: Range, c: Index)
Creates a reference to a 2-dimensional, dense region of this DRAM3 for creating burst loads and stores.
def apply(p: Range, r: Range, c: Range)
Creates a reference to a 3-dimensional, dense region of this DRAM3 for creating burst loads and stores.
def store(sram: SRAM3[T]): Unit
Creates a dense, burst transfer from the given on-chip data to this DRAM’s region of main memory.
class DRAM4[T] extends DRAM[T]
def dim0: Index
Returns the first dimension of this DRAM4.
def dim1: Index
Returns the second dimension of this DRAM4.
def dim2: Index
Returns the third dimension of this DRAM4.
def dim3: Index
Returns the fourth dimension of this DRAM4.
def size: Index
Returns the total number of elements in this DRAM4.
def apply(q: Index, p: Index, r: Index, c: Range)
Creates a reference to a 1-dimensional, dense region of this DRAM4 for creating burst loads and stores.
def apply(q: Index, p: Index, r: Range, c: Index)
Creates a reference to a 1-dimensional, dense region of this DRAM4 for creating burst loads and stores.
def apply(q: Index, p: Range, r: Index, c: Index)
Creates a reference to a 1-dimensional, dense region of this DRAM4 for creating burst loads and stores.
def apply(q: Range, p: Index, r: Index, c: Index)
Creates a reference to a 1-dimensional, dense region of this DRAM4 for creating burst loads and stores.
def apply(q: Index, p: Index, r: Range, c: Range)
Creates a reference to a 2-dimensional, dense region of this DRAM4 for creating burst loads and stores.
def apply(q: Range, p: Index, r: Index, c: Range)
Creates a reference to a 2-dimensional, dense region of this DRAM4 for creating burst loads and stores.
def apply(q: Range, p: Range, r: Index, c: Index)
Creates a reference to a 2-dimensional, dense region of this DRAM4 for creating burst loads and stores.
def apply(q: Index, p: Range, r: Index, c: Range)
Creates a reference to a 2-dimensional, dense region of this DRAM4 for creating burst loads and stores.
def apply(q: Range, p: Index, r: Range, c: Index)
Creates a reference to a 2-dimensional, dense region of this DRAM4 for creating burst loads and stores.
def apply(q: Index, p: Range, r: Range, c: Index)
Creates a reference to a 2-dimensional, dense region of this DRAM4 for creating burst loads and stores.
def apply(q: Index, p: Range, r: Range, c: Range)
Creates a reference to a 3-dimensional, dense region of this DRAM4 for creating burst loads and stores.
def apply(q: Range, p: Index, r: Range, c: Range)
Creates a reference to a 3-dimensional, dense region of this DRAM4 for creating burst loads and stores.
def apply(q: Range, p: Range, r: Index, c: Range)
Creates a reference to a 3-dimensional, dense region of this DRAM4 for creating burst loads and stores.
def apply(q: Range, p: Range, r: Range, c: Index)
Creates a reference to a 3-dimensional, dense region of this DRAM4 for creating burst loads and stores.
def apply(q: Range, p: Range, r: Range, c: Range)
Creates a reference to a 4-dimensional, dense region of this DRAM4 for creating burst loads and stores.
def store(data: SRAM4[T]): Unit
Creates a dense, burst transfer from the given on-chip data to this DRAM’s region of main memory.
class DRAM5[T] extends DRAM[T]
def dim0: Index
Returns the first dimension of this DRAM5.
def dim1: Index
Returns the second dimension of this DRAM5.
def dim2: Index
Returns the third dimension of this DRAM5.
def dim3: Index
Returns the fourth dimension of this DRAM5.
def dim4: Index
Returns the fifth dimension of this DRAM5.
def size: Index
Returns the total number of elements in this DRAM5.
def apply(x: Index, q: Index, p: Index, r: Index, c: Range): DRAMDenseTile1[T]
Creates a reference to a 1-dimensional, dense region of this DRAM5 for creating burst loads and stores.
def apply(x: Index, q: Index, p: Index, r: Range, c: Index): DRAMDenseTile1[T]
Creates a reference to a 1-dimensional, dense region of this DRAM5 for creating burst loads and stores.
def apply(x: Index, q: Index, p: Range, r: Index, c: Index): DRAMDenseTile1[T]
Creates a reference to a 1-dimensional, dense region of this DRAM5 for creating burst loads and stores.
def apply(x: Index, q: Range, p: Index, r: Index, c: Index): DRAMDenseTile1[T]
Creates a reference to a 1-dimensional, dense region of this DRAM5 for creating burst loads and stores.
def apply(x: Range, q: Index, p: Index, r: Index, c: Index): DRAMDenseTile1[T]
Creates a reference to a 1-dimensional, dense region of this DRAM5 for creating burst loads and stores.
def apply(x: Index, q: Index, p: Index, r: Range, c: Range): DRAMDenseTile2[T]
Creates a reference to a 2-dimensional, dense region of this DRAM5 for creating burst loads and stores.
def apply(x: Index, q: Index, p: Range, r: Index, c: Range): DRAMDenseTile2[T]
Creates a reference to a 2-dimensional, dense region of this DRAM5 for creating burst loads and stores.
def apply(x: Index, q: Index, p: Range, r: Range, c: Index): DRAMDenseTile2[T]
Creates a reference to a 2-dimensional, dense region of this DRAM5 for creating burst loads and stores.
def apply(x: Index, q: Range, p: Index, r: Index, c: Range): DRAMDenseTile2[T]
Creates a reference to a 2-dimensional, dense region of this DRAM5 for creating burst loads and stores.
def apply(x: Index, q: Range, p: Index, r: Range, c: Index): DRAMDenseTile2[T]
Creates a reference to a 2-dimensional, dense region of this DRAM5 for creating burst loads and stores.
def apply(x: Index, q: Range, p: Range, r: Index, c: Index): DRAMDenseTile2[T]
Creates a reference to a 2-dimensional, dense region of this DRAM5 for creating burst loads and stores.
def apply(x: Range, q: Index, p: Index, r: Index, c: Range): DRAMDenseTile2[T]
Creates a reference to a 2-dimensional, dense region of this DRAM5 for creating burst loads and stores.
def apply(x: Range, q: Index, p: Index, r: Range, c: Index): DRAMDenseTile2[T]
Creates a reference to a 2-dimensional, dense region of this DRAM5 for creating burst loads and stores.
def apply(x: Range, q: Index, p: Range, r: Index, c: Index): DRAMDenseTile2[T]
Creates a reference to a 2-dimensional, dense region of this DRAM5 for creating burst loads and stores.
def apply(x: Range, q: Range, p: Index, r: Index, c: Index): DRAMDenseTile2[T]
Creates a reference to a 2-dimensional, dense region of this DRAM5 for creating burst loads and stores.
def apply(x: Index, q: Index, p: Range, r: Range, c: Range): DRAMDenseTile3[T]
Creates a reference to a 3-dimensional, dense region of this DRAM5 for creating burst loads and stores.
def apply(x: Index, q: Range, p: Index, r: Range, c: Range): DRAMDenseTile3[T]
Creates a reference to a 3-dimensional, dense region of this DRAM5 for creating burst loads and stores.
def apply(x: Index, q: Range, p: Range, r: Index, c: Range): DRAMDenseTile3[T]
Creates a reference to a 3-dimensional, dense region of this DRAM5 for creating burst loads and stores.
def apply(x: Index, q: Range, p: Range, r: Range, c: Index): DRAMDenseTile3[T]
Creates a reference to a 3-dimensional, dense region of this DRAM5 for creating burst loads and stores.
def apply(x: Range, q: Index, p: Index, r: Range, c: Range): DRAMDenseTile3[T]
Creates a reference to a 3-dimensional, dense region of this DRAM5 for creating burst loads and stores.
def apply(x: Range, q: Index, p: Range, r: Index, c: Range): DRAMDenseTile3[T]
Creates a reference to a 3-dimensional, dense region of this DRAM5 for creating burst loads and stores.
def apply(x: Range, q: Index, p: Range, r: Range, c: Index): DRAMDenseTile3[T]
Creates a reference to a 3-dimensional, dense region of this DRAM5 for creating burst loads and stores.
def apply(x: Range, q: Range, p: Index, r: Index, c: Range): DRAMDenseTile3[T]
Creates a reference to a 3-dimensional, dense region of this DRAM5 for creating burst loads and stores.
def apply(x: Range, q: Range, p: Index, r: Range, c: Index): DRAMDenseTile3[T]
Creates a reference to a 3-dimensional, dense region of this DRAM5 for creating burst loads and stores.
def apply(x: Range, q: Range, p: Range, r: Index, c: Index): DRAMDenseTile3[T]
Creates a reference to a 3-dimensional, dense region of this DRAM5 for creating burst loads and stores.
def apply(x: Index, q: Range, p: Range, r: Range, c: Range): DRAMDenseTile4[T]
Creates a reference to a 4-dimensional, dense region of this DRAM5 for creating burst loads and stores.
def apply(x: Range, q: Index, p: Range, r: Range, c: Range): DRAMDenseTile4[T]
Creates a reference to a 4-dimensional, dense region of this DRAM5 for creating burst loads and stores.
def apply(x: Range, q: Range, p: Index, r: Range, c: Range): DRAMDenseTile4[T]
Creates a reference to a 4-dimensional, dense region of this DRAM5 for creating burst loads and stores.
def apply(x: Range, q: Range, p: Range, r: Index, c: Range): DRAMDenseTile4[T]
Creates a reference to a 4-dimensional, dense region of this DRAM5 for creating burst loads and stores.
def apply(x: Range, q: Range, p: Range, r: Range, c: Index): DRAMDenseTile4[T]
Creates a reference to a 4-dimensional, dense region of this DRAM5 for creating burst loads and stores.
def apply(x: Range, q: Range, p: Range, r: Range, c: Range): DRAMDenseTile5[T]
Creates a reference to a 5-dimensional, dense region of this DRAM5 for creating burst loads and stores.
def store(data: SRAM5[T]): Unit
Creates a dense, burst transfer from the given on-chip data to this DRAM’s region of main memory.

Implicit methods

def createTile1[T](dram: DRAM1[T]): DRAMDenseTile1[T]
Implicitly converts a DRAM1 to a DRAMDenseTile1 with the same address space.
def createTile2[T](dram: DRAM2[T]): DRAMDenseTile2[T]
Implicitly converts a DRAM2 to a DRAMDenseTile2 with the same address space.
def createTile3[T](dram: DRAM3[T]): DRAMDenseTile3[T]
Implicitly converts a DRAM3 to a DRAMDenseTile3 with the same address space.
def createTile4[T](dram: DRAM4[T]): DRAMDenseTile4[T]
Implicitly converts a DRAM4 to a DRAMDenseTile4 with the same address space.
def createTile2[T](dram: DRAM5[T]): DRAMDenseTile5[T]
Implicitly converts a DRAM5 to a DRAMDenseTile5 with the same address space.