By default, g-cache will try to use the STCs to minimize the number of transactions that it has to handle while still providing correct statistics and behavior.
Note that when using the Data STC counters, g-cache can not determine to which memory space the accesses reported by the DSTC belong to, so you need to connect g-cache to all the memory spaces to which the processor is talking. In practice, the processor often talks to one main memory space and nothing special needs to be done. Sun's UltraSPARC machines, however, have separate physical memory and physical I/O spaces. The cache should then be connected to both of them. Another way of solving this problem is to connect a small module that will prevent accesses to other memory spaces from being cached in the Data STC.
You can always prevent g-cache from using the STCs if you encounter one of the limitations mentioned later in this chapter, by setting the config_block_STC attribute of the cache to 1.