Texas Instruments TMS320DM643 사용자 설명서

다운로드
페이지 56
www.ti.com
2.8.2
Command Starvation
2.8.3
Possible Race Condition
Peripheral Architecture
The reordering and scheduling rules listed above may lead to command starvation, which is the
prevention of certain commands from being processed by the DDR2 memory controller. Command
starvation results from the following conditions:
A continuous stream of high-priority read commands can block a low-priority write command
A continuous stream of DDR2 SDRAM commands to a row in an open bank can block commands to
the closed row in the same bank.
To avoid these conditions, the DDR2 memory controller can momentarily raise the priority of the oldest
command in the command FIFO after a set number of transfers have been made. The PR_OLD_COUNT
bit field in the peripheral bus burst priority register (PBBPR) sets the number of the transfers that must be
made before the DDR2 memory controller will raise the priority of the oldest command.
Note:
Leaving the PR_OLD_COUNT bits at their default value (FFh) disables this feature of the
EMIF. This means commands can stay in the command FIFO indefinitely. Therefore, these
bits should be set to FEh immediately following reset to enable this feature with the highest
level of allowable memory transfers. It is suggested that system level prioritization be set to
avoid placing high-bandwidth masters on the highest priority levels. These bits can be left as
FEh unless advanced bandwidth/prioritization control is required.
A race condition may exist when certain masters write data to the DDR2 memory controller. For example,
if master A passes a software message via a buffer in DDR2 memory and does not wait for indication that
the write completes, when master B attempts to read the software message it may read stale data and
therefore receive an incorrect message. In order to confirm that a write from master A has landed before a
read from master B is performed, master A must wait for the write completion status from the DDR2
memory controller before indicating to master B that the data is ready to be read. If master A does not
wait for indication that a write is complete, it must perform the following workaround:
1. Perform the required write.
2. Perform a dummy write to the DDR2 memory controller SDRAM Status register.
3. Perform a dummy read to the DDR2 memory controller SDRAM Status register.
4. Indicate to master B that the data is ready to be read after completion of the read in step 3. The
completion of the read in step 3 ensures that the previous write was done.
The EDMA and ATA peripherals do not need to implement the above workaround. If a peripheral is not
listed here, then the above workaround is required. Refer to the device-specific data manual for more
information.
DDR2 Memory Controller
28
SPRU986B – November 2007