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++
12690 Discussions

SystemC module + Avalon communication

Altera_Forum
Honored Contributor II
1,106 Views

Hello 

I've just made a simple module in SystemC, then converted it to Verilog (by Agility SC Compiler). Now I have to connect it with microcontroller made in NIOS II. 

I've try to read the Avalon documentation, but have completly no idea about how to do it. Any help really wanted. 

 

 

P.S. I hope my english is good ;)
0 Kudos
2 Replies
Altera_Forum
Honored Contributor II
426 Views

Your component needs to have an SOPC Builder Tcl file created for it, eg. given an Avalon slave peripheral called avs_peripheral.v, you need an associated avs_peripheral_hw.tcl file that describes its interface to SOPC builder. The SOPC Builder Users Guide for Quartus 10.1 (ug_sopc_builder.pdf) describes how to do this. 

 

To get an initial starting point for your _hw.tcl file, you can start SOPC builder, and then select File->New Component, then click on the HDL tab, and point to your avs_peripheral.v file. The component editor will then try to guess what types of signals are on the component, eg. clock, reset, Avalon slave, and conduits (wires that should be exposed at the top of your SOPC builder design). You can then click on the Signals, Interfaces, and HDL parameters tabs and select the appropriate interface for your signals (you'll probably need the users guide open to figure out what to do for each tab). 

 

The guide explains this in more detail, but at least now you know what you are looking for. 

 

Cheers, 

Dave 

 

PS. If you look at the zip file I just posted under the thread 'avalon verification; readdatavalid assertion failures' you'll see a fairly complex _hw.tcl example (it extracts SOPC builder GUI parameters and turns them into VHDL generics, and then writes out an instance file). If your component does not use parameters, then its unlikely you'll need to be this complex. However, it may be a useful reference for you.
0 Kudos
Altera_Forum
Honored Contributor II
426 Views

thank you very much! I think I get it :) 

cheers
0 Kudos
Reply