| |||
| Home > Timing Considerations for Dormant and Shutdown Modes > Example Cycle Counts | |||
The ARM example code referenced in Section 4.2 was used to produce examples of the number of cycles required to enter and exit Dormant and Shutdown Modes with various memory system configurations. Example cycle times are given in Table 4 through Table 7 for both the ARM1136 and ARM1176 processors, both of which had the following hardware configuration:
16KB instruction and data caches
16KB instruction and data TCMs (in ARM1176 these were arranged as two 8KB instruction TCMs and two 8KB data TCMs)
ARM internal DMA engine
VFP coprocessor
Two additional coprocessors with 16 registers each, saved and restored using LDC and STC instructions
One memory-mapped peripheral with 3 registers.
Static and dynamic branch prediction were enabled. All TCMs were enabled (as local RAM on ARM1136, not as SmartCache). The memory system configurations used were:
Instruction and data caches disabled, MMU disabled
Instruction cache enabled, data cache disabled, MMU disabled
Instruction and data caches enabled, MMU enabled, state saved to write-through memory region
Instruction and data caches enabled, MMU enabled, state saved to write-back memory region
Instruction cache enabled, data cache disabled, MMU disabled, state saved to data TCM (Dormant Mode only).
The example code referenced in Dormant and Shutdown Mode Example Code was used without modification to produce example cycle counts. Entry to Dormant or Shutdown Mode was requested by a regularly recurring IRQ interrupt, with a delay of 0x8000 clock cycles between exiting Dormant or Shutdown Mode and the following entry request. The IRQs interrupted the validation test T2-32 from the armv4 suite, which tests shift operations of data processing instructions.
Example cycle counts were produced for both Dormant and Shutdown Mode in all of these memory system configurations, except for saving state to the data TCM, as this is only useful for Dormant Mode. To illustrate the effects of the caches as data and instructions are cached and so the cache hit rate improves, Dormant Mode cycle times are given for both the first time Dormant Mode is entered and exited, with no cache hits, and for the third time Dormant Mode is entered and exited, with most memory accesses hitting in the caches. This effect is not seen in Shutdown Mode as the contents of the caches are lost when the RAMs are powered down. Shutdown Mode cycle times are given both for when the TCMs are assumed to be in use, so their contents are written to main memory and restored using ARM’s internal DMA engine, and for when the TCMs are assumed not to be in use so their contents are not preserved.
For these cycle counts, the ARM1136 TCMs were enabled as local RAM, not as SmartCache, so the SmartCache master valid registers are not saved and restored for Dormant Mode. The main TLB was assumed to be kept powered up in Dormant Mode, so the main TLB master valid registers are saved and restored for Dormant Mode.
A total of 206 words of state information were saved and restored for Dormant Mode, and 198 words for Shutdown Mode.
The example number of cycles taken to enter and exit Dormant and Shutdown Modes with an ARM1136 processor are shown in Table 4 and Table 5 respectively.
Table 4. ARM1136 processor Dormant Mode example cycle counts
| Instruction cache | Data cache | State save memory region | 1st entry (cycles) | 1st exit (cycles) | 3rd entry (cycles) | 3rd exit (cycles) |
|---|---|---|---|---|---|---|
| Off | Off | Main memory (MMU off) | 3757 | 3605 | 3757 | 3605 |
| On | Off | Main memory (MMU off) | 3721 | 3617 | 3376 | 3252 |
| On | On | Data cache (write-through) | 2537 | 2927 | 2289 | 2149 |
| On | On | Data cache (write-back) | 2555 | 2909 | 1960 | 2122 |
| On | Off | Data TCM (MMU off) | 1832 | 1877 | 1710 | 1786 |
Table 5. ARM1136 Shutdown Mode example cycle counts
| Instruction cache | Data cache | State save memory region | TCMs saved via DMA | TCMs not saved | ||
|---|---|---|---|---|---|---|
| Entry (cycles) | Exit (cycles) | Entry (cycles) | Exit (cycles) | |||
| Off | Off | Main memory (MMU off) | 88215 | 110636 | 3556 | 3282 |
| On | Off | Main memory (MMU off) | 39187 | 35024 | 3533 | 3269 |
| On | On | Data cache (write-through) | 39034 | 35151 | 2289 | 2618 |
| On | On | Data cache (write-back) | 40107 | 35138 | 3362 | 2595 |
ARM1176 has TrustZone, which increases the number of registers that must be saved and restored. It also has an additional memory-mapped peripheral to control the level 2 memory security setup. This peripheral has 8 registers that are saved and restored.
A total of 250 words of state information were saved and restored for Dormant Mode, and 243 words for Shutdown Mode.
The example number of cycles taken to enter and exit Dormant Mode with an ARM1176 processor are shown in Table 6.
Table 6. ARM1176 Dormant Mode example cycle counts
| Instruction cache | Data cache | State save memory region | 1st entry (cycles) | 1st exit (cycles) | 3rd entry (cycles) |
|---|---|---|---|---|---|
| Off | Off | Main memory (MMU off) | 4323 | 3830 | 4323 |
| On | Off | Main memory (MMU off) | 4161 | 3758 | 3893 |
| On | On | Data cache (write-through) | 2888 | 3015 | 2568 |
| On | On | Data cache (write-back) | 2888 | 2993 | 2345 |
| On | Off | Data TCM (MMU off) | 2422 | 2248 | 2311 |
The example number of cycles taken to enter and exit Shutdown Mode with an ARM1176 processor are shown in Table 7.
Table 7. ARM1176 Shutdown Mode example cycle counts
| Instruction cache | Data cache | State save memory region | TCMs saved via DMA | TCMs not saved | ||
|---|---|---|---|---|---|---|
| Entry (cycles) | Exit (cycles) | Entry (cycles) | Exit (cycles) | |||
| Off | Off | Main memory (MMU off) | 174351 | 143977 | 4269 | 3975 |
| On | Off | Main memory (MMU off) | 43617 | 43503 | 4028 | 3757 |
| On | On | Data cache (write-through) | 39291 | 32042 | 2721 | 3068 |
| On | On | Data cache (write-back) | 40336 | 32042 | 3766 | 3068 |