Reality Signal Processor/Interface: Difference between revisions

Jump to navigation Jump to search
Content added Content deleted
Line 268:
| 0 | SEMAPHORE | Semaphore bit to implement a hardware-assisted mutex with atomic access. The bit behaves normally on reads and writes, with the only difference that after each read, the bit is always automatically set to 1 by the hardware (though the previous value is returned). }}
: '''SEMAPHORE'''
:: The goal of this bit is to help implementing a mutex between VR4300 and RSP. The mutex can be used to guard access to any shared hardware resource, a typical example being the DMA engine. To acquire the mutex, the CPU (either VR4300 or RSP) should spin reading the <code>SEMAPHORE</code> bit until it reads 0. At that point, the bit is automatically flipped to 1 by the hardware, so reading 0 means "the semaphore was free, and you have just acquired it". After the CPU is done using the shared resource, it can simply write 0 to <code>SEMAPHORE</code> to release it.
 
== RSP PC register ==