We have already discussed Cache line and TAG memory and various control flags in previous sections. To implement an efficient control circuit in hardware requires following approach.
Implement a comparison circuit to match value in tag locations to the TAG field in address register. The control circuit needs to have an argument register to temporarily store TAG bits from address register.
In the above circuit the location X in tag memory corresponds to location within cache memory where the comparison is performed. In hardware we will need to implement P such blocks in parallel for each cache line. The output of the circuit is going to be ‘1’ only when all the bits in argument register matches to corresponding bit in tag memory location.