A semaphore mechanism in a multiport cache memory system allows concurrent accesses
to the cache memory. When there is no contention for the same cache line, multiple
requesters may access the cache memory concurrently. A status bit in each cache
line indicates whether that particular cache line is in use, and is used to arbitrate
among various requesters for the same cache line. When at least two requests for
the same cache line is received, a cache arbiter examines the status bit to determine
if the requested cache line is in use. If the cache line is not already in use,
the cache arbiter selects, and sends a signal granting the request to, the requesters
one at a time to allow access to the contested cache line, while allowing concurrent
access to the cache memory to other requesters requesting different cache lines.
The semaphore mechanism allows exchanges of signals between the cache arbiter and
the requesters to provide an orderly arbitration of multiple requests for the same
cache line.