4.4.5 Side effects
The side effects of reading and writing memory are as follows:
- Component creators should ensure that memory accesses are side-effect free,
although it might not always be possible. Side-effect free reads are a
prerequisite for non-intrusive debug, although they might not be possible due to
bugs in target instance implementations or bridges into environments that do not
support side-effect free reads.
- Writing memory should be as free of side effects as possible. In other words, it
should cause just enough side effects to keep the target and system state
consistent. For memory-mapped registers, the side effect should be the same as
resource_write() for a description of the side
- Reading from cached memory must not allocate into the cache or change the cache
tag in any way. It must follow the cache hierarchy until a hit is found and
return the hit data.
- Writing to cached memory must update all cache lines that hold the written memory location. It must write through to all cache levels including main memory, regardless of the allocation strategy of the cache. Write accesses must never allocate into the cache or change the cache tag in any way. Writes never set dirty bits of caches. Writes can never cause a cache inconsistency, but they can remove cache inconsistencies.