Hitachi 217
When it is troublesome to purge the cache after every DMA transfer, it is recommended that you
set the OD bit of the CCR to 1 in advance. When the OD bit is 1, the cache operates as cache
memory only for instructions. However, when data is already fetched into cache memory, specific
lines of cache memory must be purged for DMA transfers.
8.5.3
Cache Data Coherency
The SH7095’s cache memory has a snoop function. This means that when data is shared with a
bus master other than the CPU, software must be used to ensure the coherency of data. To this
end, the cache-through are can be used, the break function of can be used in the external bus cycle,
or a cache purge can be performed with program logic.
If the cache-through area is to be used, that data shared by the multiple bus masters is placed in the
cache-through area. This makes it easy to maintain data coherency, since access of the cache-
through area does not fetch data into the cache. When the shared data is accessed repeatedly and
the frequency of data rewrites is low, lower access speed can negatively affect performance.
To use the break function of the external break cycle, employ the user break controller. Set the
user break controller to generate an interrupt when a write cycle is detected to any of the areas that
have shared data. The interrupt processing routine purges the cache. Since the cache is purged
whenever a rewrite is detected, data coherency can be maintained. When data that extends over
multiple words, such as a structure, is rewritten, however, interrupts are generated at the rewrites,
which can lower performance. This method is most appropriate for cases in which it is difficult to
predict and detect the timing of data updates and the update frequency is low.
To purge the cache using program logic, the data updates are detected by the program flow and the
cache is then purged. For example, if the program inputs data from a disk, whenever reading of a
unit (such as a sector) is completed, the buffer address used for reading or the entire cache is
purged, thereby maintaining coherency. When data is to be handled between two processors, only
flags to provide mutual notification of completion of data preparations or completion of fetch are
placed in the cache-through area. The data actually transferred is placed in the cache area and the
cache is purged before the first data reading to maintain the coherency of the data. When
semaphore is used as the means of communications, data coherency can be maintained even when
the cache is not purged by utilizing the TAS instruction. The TAS instruction is not read within
the cache; the external access is always direct. This means that data can be synchronized with
other masters when it is read.
When the unit of the update is small, specific addresses can be purged, so only the affected
addresses are purged. When the unit of the update is larger, it is faster to purge the entire cache
rather than purging all the addresses in order and then read in the data previously existing in the
cache again from external memory.
Summary of Contents for SH7095
Page 1: ...SH7095 Hardware User Manual ...
Page 23: ...12 Hitachi ...
Page 63: ...52 Hitachi ...
Page 77: ...66 Hitachi ...
Page 105: ...94 Hitachi Figure 5 14 Pipeline Operation when Interrupts are Enabled by Changing the SR ...
Page 127: ...116 Hitachi ...
Page 152: ...Hitachi 141 Figure 7 8 Example of 32 Bit Data Width SRAM Connection ...
Page 157: ...146 Hitachi Figure 7 13 Synchronous DRAM 32 bit Device Connection ...
Page 161: ...150 Hitachi Figure 7 15 Basic Burst Read Timing Auto Precharge ...
Page 167: ...156 Hitachi Figure 7 20 Burst Read Timing Bank Active Same Row Address ...
Page 168: ...Hitachi 157 Figure 7 21 Burst Read Timing Bank Active Different Row Addresses ...
Page 169: ...158 Hitachi Figure 7 22 Write Timing No Precharge ...
Page 170: ...Hitachi 159 Figure 7 23 Write Timing Bank Active Same Row Address ...
Page 180: ...Hitachi 169 Figure 7 29 Example of a DRAM Connection 32 Bit Data Width ...
Page 190: ...Hitachi 179 Figure 7 36 Example of Pseudo SRAM Connection 1 M pseudo SRAM ...
Page 191: ...180 Hitachi Figure 7 37 Example of Pseudo SRAM Connection 4 M pseudo SRAM ...
Page 209: ...198 Hitachi Figure 7 50 Master and Partial Share Master Connections ...
Page 231: ...220 Hitachi ...
Page 287: ...276 Hitachi ...
Page 307: ...296 Hitachi Note For a CPU writing H AA55 to FRC Figure 11 2 FRC Access Operation Write ...
Page 308: ...Hitachi 297 Note For an FRC reading from a CPU H AA55 Figure 11 3 FRC Access Operation Read ...
Page 333: ...322 Hitachi ...
Page 370: ...Hitachi 359 Figure 13 12 Sample Flowchart for Receiving Multiprocessor Serial Data ...
Page 371: ...360 Hitachi Figure 13 12 Sample Flowchart for Receiving Multiprocessor Serial Data cont ...
Page 395: ...384 Hitachi ...
Page 402: ...Hitachi 391 Figure 15 6 PLL Synchronization Settling Timing ...
Page 408: ...Hitachi 397 Figure 15 13 Bus Release Timing Slave Mode With PLL1 Off ...
Page 436: ...Hitachi 425 Figure 15 33 Synchronous DRAM Mode Register Write Cycle TRP 1 Cycle ...
Page 437: ...426 Hitachi Figure 15 34 Synchronous DRAM Mode Register Write Cycle TRP 2 Cycles ...
Page 449: ...438 Hitachi Figure 15 46 DRAM CAS Before RAS Refresh Cycle TRP 1 Cycle TRAS 2 Cycles PLL On ...
Page 454: ...Hitachi 443 Figure 15 51 DRAM CAS Before RAS Refresh Cycle TRP 1 Cycle TRAS 2 Cycles PLL Off ...
Page 461: ...450 Hitachi Figure 15 58 Pseudo SRAM Auto Refresh Cycle PLL On TRP 1 Cycle TRAS 2 Cycles ...
Page 462: ...Hitachi 451 Figure 15 59 Pseudo SRAM Self Refresh Cycle PLL On TRP 1 Cycle TRAS 2 Cycles ...
Page 467: ...456 Hitachi Figure 15 64 Pseudo SRAM Auto Refresh Cycle PLL Off TRP 1 Cycle TRAS 2 Cycles ...
Page 468: ...Hitachi 457 Figure 15 65 Pseudo SRAM Self Refresh Cycle PLL Off TRP 1 Cycle TRAS 2 Cycles ...
Page 471: ...460 Hitachi Figure 15 68 Interrupt Vector Fetch Cycle PLL On No Waits ...
Page 472: ...Hitachi 461 Figure 15 69 Interrupt Vector Fetch Cycle PLL Off No Waits ...
Page 473: ...462 Hitachi Figure 15 70 Interrupt Vector Fetch Cycle 1 External Wait Cycle ...
Page 474: ...Hitachi 463 Figure 15 71 Address Monitor Cycle ...
Page 490: ...Hitachi 479 B 2 Register Chart ...