I builded a niosII system use the SOPC builder，and now I need to communicates with a FPGA module through the niosII system，How do I achieve it？I have search some Information in the Altera website ，and the general ideas to do it is ：build a dual-port ram between the niosII system and FPGA module But I am a rookie in this Field，I don't know how to do it clearly，is there any one can help me？I appreciate it very much！
You can add Avalon bus interface to your FPGA module. Here more details about the bus: http://www.altera.com/literature/manual/mnl_avalon_spec.pdfWhat kind of data do you need to access in your module? It the data volume is low you can simply implement Avalon MM Slave interface and poll periodically the registers from Nios II.
First go to the sopc builder add the desire component like PIO and give it to desire name , and then go to nios-ii processor .v file and add that component in it (take a view of other io, how they are added) and then create new symbol of nios-ii and update it. then you will have that io available at input or output side whatever you select while adding component in sopc. this is the hardware part.
linas：thank you for your help，and I still have a question：If I build a dual-port ram use the MageWizard Plug-in manager,how can I conect the nios II system to the dual-port ram ? And the data between niosII system and FPGA module are some 16-bit word data,and each word may Has a different meaning，So I need write each word of data in a different address in the ram，and the reading process is also the same，So I think I can't do it in the way you just mentioned
Kaushal:first thanks for your help,and if I build a dual-port ram use the MageWizard Plug-in manager(),how can I connect the nios II system to the dual-port ram? can I just connect the nios II system to the dual-port ram through some PIO (connect the PIO to the address bus、data bus....)，and than operate this PIOs in the nios II system to write/read data to/from the dual-port ram?
What about using DMA, that writes data from your module to shared single port RAM later accessed by Nios II? You must write some kind Avalon MM adapter to access your component from Nios II in every case.
linas：So now the most important thing is to learn how to write the Avalon MM adapter to access my dual-port ram form Nios II！thank you！
Look at the documentation of Altera's Avalon bus. These adapters (slave and master templates) are provided by Altera here: http://www.altera.com/support/examples/exm-list.jsp?cat=embeddedYou may also search in this forum, there were vhdl versions of these adapters somewhere. But I suggest you to skip on-chip RAM. I am sure, that your Nios II has its own memory, it would be smarter that your component writes data directly to that memory. Arbitration circuitry is crated by SOPC Builder, so you need just to provide write signal, address and data through your adapter to the Avalon bus.