
TC1796
System Units (Vol. 1 of 2)
CPU Subsystem
User’s Manual
2-32
V2.0, 2007-07
CPU, V2.0
2.6.2
Dual-Ported Memory Operation
The dual-ported memory (DPRAM) allows the CPU and Remote Peripheral Bus (RPB)
masters to access the same memory locations simultaneously, reading or writing invalid
data without conflict. In the case of simultaneous accesses to the same address, the
CPU has a higher priority than the RPB master.
defines DPRAM operations.
2.6.2.1
CPU Buffer Write Operation
Write accesses from the CPU to DMI memories using ST (store) or LDMST (load-modify-
store) instructions first store the write data in a buffer. The content of this buffer is written
to the memory when the CPU interface and DLMB (Data Local Memory Bus) are idle, or
when another CPU write operation to DMI memory follows. A read operation to the same
address (LD instruction) immediately following the write operation will read the data out
of the buffer and not from the DPRAM location. The same is true if a continuous
sequence of read operations to other DPRAM locations keep the CPU interface busy in
the meantime.
For DPRAM operations, such as semaphore handling, it is necessary to ensure that at
least two non-DMI-memory related instructions or another ST instruction are executed
between the ST/LDMST instruction and the following LD instruction to the semaphore
location.
If the data written to a DPRAM location has to be available immediately on the RPB bus
side of the DPRAM, two non-DMI-memory related instructions or another ST instruction
to the DMI memory must follow the critical store instruction.
The smallest memory unit that can be read from or written to the dual-ported memory is
a byte. The largest unit is a double-word. On the remote peripheral bus double-word
accesses are performed as two 32-bit RPB transfers. The conflict handling also operates
properly when CPU access width and RPB access width are different.
Table 2-8
DPRAM Access Conflict Handling
Actions
CPU Access
Read
Write
RPB
Master
Access
Read
A simultaneous read access of
CPU and RPB master occurs.
Both read the same memory
content.
The CPU write operation is
executed first and the RPB
master read access is delayed.
The data read is the value that
has been written by the CPU.
Write
Bus data is transferred to CPU
and memory in parallel
The CPU write operation is
executed. The RPB master write
data is not written.