EMIF
The mapping based on priority can be done by setting the appropriate values in the Priority to Class of
Service Mapping register (PRI_COS_MAP).
The mapping based on connection ID can be done by setting the appropriate values of connection ID and
the masks in the Connection ID to Class of Service Mapping registers(CONNID_COS_1_MAP and
CONNID_COS_2_MAP).
There are 3 connection ID and mask values that can be set for each class of service. In conjunction with
the masks, each class of service can have a maximum of 144 connection IDs mapped to it. For example,
a connection ID value of 0xFF along with a mask value of 0x3 will map all connection IDs from 0xF8 to
0xFF to that particular class of service.
Each class of service has an associated latency counter (REG_COS_COUNT). The value of this counter
can be set in the Interface Configuration Register. When the latency counter for a command expires, i.e.,
reaches the value programmed for the class of service that the command belongs to, that command will
be the one that is executed next. If there are more than one commands that have expired latency
counters, the command with the highest priority will be executed first. One exception to this rule is, if the
oldest command in the queue has an expired reg_pr_old_count, that command will be executed first
irrespective of priority or class of service. This is done to prevent a continuous block effect.
The connection ID mapping allows the same connection ID to be put in both class of service 1 and 2.
Also, a transaction might belong to one class of service if viewed by connection ID and might belong to
another class of service if viewed by priority. In these cases, the command will belong to both class of
service. The DDR2/3/mDDR memory controller will try executing the command as soon as possible, when
the smaller of the two counters ( REG_COS_COUNT_1 OR REG_COS_COUNT_2) expire.
7.3.3.5.5 Refresh Scheduling
The DDR2/3/mDDR memory controller issues autorefresh (REFR) commands to DDR2/3/mDDR SDRAM
devices at a rate defined in the refresh rate (REFRESH_RATE) bit field in the SDRAM refresh control
register (SDRFC). A refresh interval counter is loaded with the value of the REFRESH_RATE bit field and
decrements by 1 each cycle until it reaches zero. Once the interval counter reaches zero, it reloads with
the value of the REFRESH_RATE bit. Each time the interval counter expires, a refresh backlog counter
increments by 1. Conversely, each time the DDR2/3/mDDR memory controller performs a REFR
command, the backlog counter decrements by 1. This means the refresh backlog counter records the
number of REFR commands the DDR2/3/mDDR memory controller currently has outstanding.
The DDR2/3/mDDR memory controller issues REFR commands based on the level of urgency. The level
of urgency is defined below. Whenever the refresh level of urgency is reached, the DDR2/3/mDDR
memory controller issues a REFR command before servicing any new memory access requests.
Following a REFR command, the DDR2/3/mDDR memory controller waits T_RFC cycles, defined in the
SDRAM timing 1 register (SDRTIM1), before rechecking the refresh urgency level.
The refresh counters do not operate when the SDRAM memory is in self-refresh mode.
Table 7-108. Refresh Modes
Urgency Level
Description
Backlog count is greater than 0. Indicates there is a backlog of REFR commands, when the DDR2/3/mDDR
Refresh May
memory controller is not busy it will issue the REFR command.
Backlog count is greater than 4. Indicates that the refresh backlog of REFR commands is getting high and
Refresh Release
when DDR2/3/mDDR memory controller is not busy it should issue the REFR command.
Backlog count is greater than 7. Indicates that the refresh backlog of REFR commands is getting excessive
Refresh Must
and DDR2/3/mDDR memory controller should perform an auto refresh cycle before servicing any new
memory access requests.
416
Memory Subsystem
SPRUH73H – October 2011 – Revised April 2013
Copyright © 2011–2013, Texas Instruments Incorporated