Forum Discussion
Altera_Forum
Honored Contributor
21 years agocustom instructions
Is there an easy way to write custom instructions which read and write to SDRAM? In particular, we're trying to make an compare-and-swap instruction in order to do multi-threading. Als...
Altera_Forum
Honored Contributor
21 years agoBasically, in order to do multi-threading safely and efficiently, you need to have some instruction which can read from a location in memory, do something to it, and write the result back to the same location in memory. The functions can vary -- add, decrement, compare and swap; it's not so important as being able to have an atomic load-operate-store instruction.
Also, one needs this for simd instructions like vector or matrix multiplications.