Owning Palette: Memory & FIFO Functions
Installed With: FPGA Module
Writes to memory available on the FPGA target. Use the Memory Write function in conjunction with the Memory Read function.

![]() |
Address specifies the location of the data in memory on the FPGA target. The valid address range depends on the Depth you specify in the Memory Properties dialog box. For example, if you specify a Depth of 1000, the valid address range is 0–999. If Address exceeds the address range, the Memory Write function returns an error and does not write the data. Add error terminals so LabVIEW can notify you if Address exceeds the address range. |
![]() |
Data is the data to be written to the memory on the FPGA target. You can directly write to Data only from the FPGA VI. You cannot directly write to the data in the memory of the FPGA target from the host VI. You must use controls, indicators, or DMA FIFOs to access data from the host VI. If you do not initialize the memory item, the data is undefined. |
To read from or write to the FPGA memory using the Memory Read and Memory Write functions, you must create memory items. You can create a memory item in the Project Explorer window or using a VI-Scoped Memory Configuration node. You then can right-click the Memory Read or Memory Write function and select the memory item from the Select Memory shortcut menu.
![]() | Tip You can click a memory item in the Project Explorer window and drag it onto the block diagram to place a Memory Read function on the block diagram. You also can right-click the Memory Write function and select Find Item in Project from the shortcut menu to highlight the memory item in the Project Explorer window. |
Right-click the Memory Write function and select Add New Memory from the shortcut menu to create a new target-scoped memory item.
Right-click the Memory Write function and select Select Method»Read from the shortcut menu to change to a Memory Read function. You also can click the function and select Read from the shortcut menu to change to a Memory Read function.
If you reset the FPGA VI, the memory remains unchanged. You must download the FPGA VI again to reinitialize the memory.
If you use this function in a single-cycle Timed Loop, you must set the Write option in the Advanced Code Generation Memory Properties page to Arbitrate if Multiple Requestors Only or Never Arbitrate for the memory item, and you cannot use this function with the same memory item anywhere else in the FPGA VI.
The Memory Write function takes an entire clock cycle to execute. You cannot use memory to transfer data among multiple clock domains.
Add error terminals to monitor if the operation you performed completed correctly. Right-click the Memory Write function and select Show Error Terminals from the shortcut menu to add standard LabVIEW error in and error out parameters to the function.
![]() | Note Adding error in and error out parameters increases the amount of space the function uses on the FPGA target. The error in and error out parameters also can cause slower execution on the FPGA target. |