Forum Discussion
Altera_Forum
Honored Contributor
12 years agoI have two nios cpu that can access the same M9K memory.
One cpu accesses it as 'tightly coupled data memory', the other as an avalon slave (the original plan was to tightly couple it to both cpu, but being able to directly read it over the PCIe is very useful for debug and post mortums). Most of the locations are only written by one of the cpus - but often read by the other. I use a modification of Dekker's algorithm when two values have to be modified together (modified because one of the cpu can only do a try_lock() action). But I know I have a lurking bug because there is one location which can potentially be written by both cpu - but neither does it very often at all. Fixing is difficult because I can't spin due to real-time constraints.