A method and apparatus for verification of coherence for shared cache components
in a system verification environment are provided. With the method and apparatus,
stores to the cache are applied to a cache functional simulator in the order that
they occur in the trace information from the canonical tracers. However, rather
than updating the cache simulator with the actual data stored, the performed time
of the store event is applied to the simulator as data. The cache simulator stores
the latest performed time for each byte of each cache line in the simulated cache,
in an associated data structure. For each load event that is encountered in the
trace information for a byte, a comparison is made between a global expected data
age of the data in the cache and the performed time associated with the byte. If
the data age in the simulated cache for the byte is less than the global expected
data age, i.e. a latest previously encountered data age, then a cache coherence
violation has occurred.