Altera_Forum
Honored Contributor
21 years agoNios Semaphore?
I need a good semaphore to make a fifo IRQ safe. On the PC it's easy with the assembly instruction BTS which Bit Tests and Sets. So you can try to set a bit and know if you did it in a single clock cycle.
That means its a perfect semaphore. I don't see anything like that in the Nios reference. Anyone have any ideas? Or a custom instruction that performs the same task? Thanks, Ken