User manual

RC200/203 Manual
www.celoxica.com Page 44
5.7 ZBT SRAM macros
If you want to read data from or write data to RAM you need to:
1. Call
RC200PL1RAM0Run() or RC200PL1RAM1Run(), depending on which RAM
bank you want to target. You need to call this in parallel with the rest of your
RAM code.
2. Set the address for the read or write using one of the
RC200PL1RAMXSetReadAddress or RC200PL1RAMXSetWriteAddress() macros.
3. Call one of the
RC200PL1RAM*Read() or RC200PL1RAM*Write() macros.
If you only want to write part of a word of data, you can mask the address using one of
the
RC200PL1RAM*SetWriteAddressMask() macros.
5.7.1 RAM management tasks
extern macro proc RC200PL1RAM0Run (ClockRate);
extern macro proc RC200PL1RAM1Run (ClockRate);
Parameters:
ClockRate: Clock rate of the clock domain of the call to this
macro, in Hz.
Timing: Does not terminate in normal use.
Description:
Runs the device management tasks for RAM. You must run
this macro in parallel with accesses to the RAM banks.
5.7.2 Setting the RAM address
extern macro proc RC200PL1RAM0SetReadAddress (Address);
extern macro proc RC200PL1RAM1SetReadAddress (Address);
extern macro proc RC200PL1RAM0SetWriteAddress (Address);
extern macro proc RC200PL1RAM1SetWriteAddress (Address);