Services - tools - models - for embedded software development
Embecosm divider strip
Prev  Next

5.2.  Caching SPR and Memory Access

When stalled, SPR and memory values cannot change. It therefore makes sense to cache these values to eliminate JTAG activity on duplicate accesses when stalled. The classes to provide this functionality (SprCache and MemCache) were described in Section 4.3.

Caching can be disabled when building the model by defining NOCACHE on the command line or in DebugUnit.h.

[Caution]Caution

The Next Program Counter NPC is always cached for the reasons described above in Section 4.6.1.

The effect of caching on server performance and client load times can be seen in Table 5.2. This compares the performance of an unoptimized server with and without caches.

Run Description

Cycles

Time

Perf

Load Rate

No optimization, no cache

12,593,861

374.02 s

34 kHz

161 bytes/s

No optimization, with cache

8,097,241

257.34 s

31 kHz

164 bytes/s

Table 5.2.  Effect of SPR and memory caches on GDB server and client performance.


The extra cycles due to the debugging load have been reduced by 4.5 million, just over 40%. The time taken to load a program is unchanged. The memory cache cannot help, since this is an initial load.

Embecosm divider strip