Skip to content

MemoryDevice example

Benjamin Reese edited this page Oct 11, 2018 · 1 revision

MemoryDevice

A MemoryDevice allows for efficient loading of large data blocks into FPGA registers/BRAM. Instantiation works like any other pyrogue.Device. A MemoryDevice has no Variables, and can only be loaded via a YAML config file.

Instantiation Example

pyrogue.MemoryDevice(
    name = 'Waveform',
    description = '',
    offset = 0, # Address offset relative to parent
    size = 4096, # Size of memory block in bytes
    base = pyrogue.UInt, # Data type at each location
    wordBitSize = 32, # Size of each word in bits
    stride = 4, # Address stride between each word
    verify = True, #Verify the contents after loading
)

YAML Example

Path:
  To:
    Waveform:
      0: 0x12345678, 0xAAAA5555 # Load these words into the Waveform RAM starting at word offset 0
      2: 0x00000000, 0x00000000 # Load these words starting at word offset 2
      4: 0, 1, 2, 3, 4, 5, 6, 7, 8 # Can put as many values as you want at each offset

Installation

Examples

Clone this wiki locally