Nios® V/II Embedded Design Suite (EDS)
Support for Embedded Development Tools, Processors (SoCs and Nios® V/II processor), Embedded Development Suites (EDSs), Boot and Configuration, Operating Systems, C and C++
12620 Discussions

How to build a two processor system?

Altera_Forum
Honored Contributor II
1,250 Views

Recently, I am building a two processor system. I have met several problems,hoping someone would help me. 

 

SopcBuilder: 

How many Jtag-Uarts are needed, if I use two cpus? 

( I have used two jtags, each of them connected to one cpu, cpu0 runs uclinux system, cpu1 runs helloworld example without a system, uclinux could be booted, but paused at the information of jtag-uart) 

 

The purpose of my multiprocessor project is to do paralell working.A uclinux system with several piece of working programs. 

One storage space can only be accessed by one periphery at a time.How could make the parelell (several programs) work together? 

 

Looking forward to your reply, thank you very much!!
0 Kudos
5 Replies
Altera_Forum
Honored Contributor II
276 Views

<div class='quotetop'>QUOTE (babysnow @ Jul 28 2009, 03:59 AM) <{post_snapback}> (index.php?act=findpost&pid=23293)</div> 

--- Quote Start ---  

How many Jtag-Uarts are needed, if I use two cpus?[/b] 

--- Quote End ---  

 

None. You don&#39;t need a JTAG uart to get uClinux running on a CPU. I suppose you also can use one or two. The "NIOS2 -terminal" program supports an "instance" paramter that I think is used to distinguish between several JTAG UARTS on the same JTAG interface. 

 

<div class='quotetop'>QUOTE (babysnow @ Jul 28 2009, 03:59 AM) <{post_snapback}> (index.php?act=findpost&pid=23293)</div> 

--- Quote Start ---  

The purpose of my multiprocessor project is to do paralell working.A uclinux system with several piece of working programs. 

One storage space can only be accessed by one periphery at a time.How could make the parelell (several programs) work together?[/b] 

--- Quote End ---  

 

I don&#39;t suppose it makes much sense to have two CPUs run two separate Linux OSes on the same Avalon bus, as the bus arbitration and queuing memory accesses will slow down both a lot. A more sophisticated design with one Linux system and a simple system as coprocessor usually is much more viable. 

 

-Michael
0 Kudos
Altera_Forum
Honored Contributor II
276 Views

<div class='quotetop'>QUOTE </div> 

--- Quote Start ---  

None. You don&#39;t need a JTAG uart to get uClinux running on a CPU. I suppose you also can use one or two. The "NIOS2 -terminal" program supports an "instance" paramter that I think is used to distinguish between several JTAG UARTS on the same JTAG interface.[/b] 

--- Quote End ---  

 

But, in the SOPCBuilder, if a JTAG-UART module is added, then it can only be connected to ONE cpu. 

And I have made a test that if use only one jtag module in the SOPCBuilder, then the cpu without connection with jtag cannot worked. 

 

<div class='quotetop'>QUOTE </div> 

--- Quote Start ---  

I don&#39;t suppose it makes much sense to have two CPUs run two separate Linux OSes on the same Avalon bus, as the bus arbitration and queuing memory accesses will slow down both a lot. A more sophisticated design with one Linux system and a simple system as coprocessor usually is much more viable.[/b] 

--- Quote End ---  

 

I mean several programs without system, and a uclinux system. Is there any method to make the programs running paralelly? 

0 Kudos
Altera_Forum
Honored Contributor II
276 Views

<div class='quotetop'>QUOTE (babysnow @ Jul 28 2009, 01:56 PM) <{post_snapback}> (index.php?act=findpost&pid=23300)</div> 

--- Quote Start ---  

in the SOPCBuilder, if a JTAG-UART module is added, then it can only be connected to ONE cpu.[/b] 

--- Quote End ---  

I&#39;m not an expert with Quartus, Maybe somebody else can help. 

<div class='quotetop'>QUOTE (babysnow @ Jul 28 2009, 01:56 PM) <{post_snapback}> (index.php?act=findpost&pid=23300)</div> 

--- Quote Start ---  

And I have made a test that if use only one jtag module in the SOPCBuilder, then the cpu without connection with jtag cannot worked.[/b] 

--- Quote End ---  

 

You can configure a Fifoed UART module (free IP core) and connect RxD and TxD to some pins. Now (if using Linux on that CPU) you can configure the serial UART in the uClinux configuration (see the Wiki how to do that) and connect those pins to some kind of Terminal (PC). 

<div class='quotetop'>QUOTE (babysnow @ Jul 28 2009, 01:56 PM) <{post_snapback}> (index.php?act=findpost&pid=23300)</div> 

--- Quote Start ---  

I mean several programs without system, and a uclinux system. Is there any method to make the programs running paralelly?[/b] 

--- Quote End ---  

 

If you have enough resources in the FPGA you can do multiple CPUs. I don&#39;t see what should prevent them from running in parallel. 

 

-Michael
0 Kudos
Altera_Forum
Honored Contributor II
276 Views

<div class='quotetop'>QUOTE </div> 

--- Quote Start ---  

If you have enough resources in the FPGA you can do multiple CPUs. I don&#39;t see what should prevent them from running in parallel.[/b] 

--- Quote End ---  

 

If I put the program all in sdram storage space , sdram can be accessed only by one peripherial at a time.
0 Kudos
Altera_Forum
Honored Contributor II
276 Views

<div class='quotetop'>QUOTE (babysnow @ Jul 28 2009, 03:54 PM) <{post_snapback}> (index.php?act=findpost&pid=23305)</div> 

--- Quote Start ---  

If I put the program all in sdram storage space , sdram can be accessed only by one peripherial at a time.[/b] 

--- Quote End ---  

 

That is a bad idea, as - you said it - the RAM accesses need to be queued and thus the CPUs are slowed down.  

 

You should use tightly couples memory for all your coprocessor CPUs as well for program as for data.  

 

-Michael
0 Kudos
Reply