Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
20 years ago

multiple Nios II communicate

I want to disign a network processor with multiple Nios II.But I can't find any data about the communicate between Nios IIs'.I want to ask these question:

how to change data among Nios IIs'?

how to design the Avalon bus among multi-processors?

1 Reply

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    SOPC builder already supports connecting multiple masters to the same slave, so it will work at the hardware level.

    If the communication is simple then you can use a RAM (onchip or off-chip) to pass messages between the processors. You need to be careful about races between software on different processors accessing the same data at the same time. One safe way to make this work is to set up a global variable so that one processor only writes to it, and the other only reads from it.

    If you want something more complex then there will be a mailbox component in 5.0 which you can use to communicate between processors.

    But until then, you can use a mutex component to protect your RAM if you need to perform more complex access patterns.