[uClinux-dev] Build SMP uClinux on NIOS II processors

Hao Shen william.shen at gmail.com
Fri Feb 13 10:26:16 EST 2009

On Fri, Feb 13, 2009 at 4:15 PM, Jamie Lokier <jamie at shareable.org> wrote:
> Michael Schnell wrote:
>> >I would like to have an SMP uClinux running on the multilple NIOS II
>> >processors architecture (with or without cache coherence).
>> You might want to discuss this on the NIOS2 uCLinux mailing list:
>> nios2-dev at sopc.et.ntust.edu.tw .
>> Did you already solve the appropriate hardware issues ?
>> I suppose you _can_ add multiples NIOS processors to the Avalon bus
>> using the SOPC-Builder.
>> But for SMP they would need to access a common memory and here you need
>> to take care of cache consistence. AFAIK, this is not supported at all
>> with the current NIOS Altera ip Core. So you would need to switch off
>> the data cache completely, resulting in a very slow system. Maybe on top
>> of this, you can do a cache design of your own in HDLC: either a common
>> stack for both processors (quite slow due to the need for scheduling the
>> requests) or a stack for either of them with additional hardware to
>> invalidate the cache lines that are written by the other processor and
>> to force writing of the cache lines read by the other processing <or
>> similar>.
> You can tell Linux to explicitly flush cache lines, so that you don't
> need consistency in hardware.  You only need cache line flushing
> instructions, which is simpler hardware.
> You need those instructions anyway if you have peripherals doing DMA
> to main memory, so you might not need any changes to the hardware cache.
> -- Jamie
> _______________________________________________
> uClinux-dev mailing list
> uClinux-dev at uclinux.org
> http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
> This message was resent by uclinux-dev at uclinux.org
> To unsubscribe see:
> http://mailman.uclinux.org/mailman/options/uclinux-dev

Yes, the NIOS II processor provides the data cache flush instructions.
But I think that we still need a hardware block to detect whether we
need flush or not to improve the overall system performance. This
block is proposed in the paper (Symmetric Multiprocessing on
Programmable Chips Made Easy). Anyway, I can first live with the no
data-cache version to validate the SMP uClinux.

Hao Shen

More information about the uClinux-dev mailing list