Forum Discussion

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

Multiprocessor booting from flash

Hi,

I have sucessfully completed the Altera multiprocessor Tutorial on the Altera NiosII Cyclone Development board, and under the Nios IDE everything works as expected, however I now want to boot this design from flash, but it does not work.

I have simplified the tutorial slightly by only having software running in 2 cpu's ( although the SOPC builder project still has the 3.

CPU 1 simply counts on the LED's of the board, and CPU 2 counts in HEX on the seven segment display.

It seem very consistent, that after flashing the board effectively with the SOF, and the elf from CPU 1 and 2, that virtually every time only CPU 2 ever starts correctly.

However what is really strange is that if I re-flash (using command line ) the elf for CPU2, and press the CPU reset button, then BOTH cpu's work... but wait for it, I press the reset button again, and then only CPU 2 starts working.

This is a standard installation of Q6.0 sp1, and Nios 6, with no custom modifications to any of the files.

Has anyone got any idea's..... ???

I have sent this to my FAE who cant see anything obvious and has forwarded this to Altera, but I just thought you guys may have some suggestions.

Many thanks in advance.

Chris

2 Replies

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

    There may be different issues in booting a multicore Nios II devices...

    the first things I have in mind are related to:

    - the CPUID values, which in sopcbuilder (no idea for 6.0 sp1, but previous versions were like that) are assigned not in order

    - the flashing of the images, which has to be done following the boundaries of the flash (we put some info in the Multicore tutorial on the ERIKA Enterprise literature web page)

    - no idea abou the fact that at the second reset only one cpu does not work... are you using mutexes or mailboxes with a default initialization value?

    bye

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

    If either of your software projects include the Flash CFI driver, your CPUs will interfere with each other during the boot process. The reason for this is that Flash CFI driver will do a CFI query on initialization. This query will corrupt normal reads that are occurring from the other processor (e.g., instruction fetches).