- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
I have a system based on the Nios II processor, and I would like to add an external custom peripheral which disposes of an Avalon Clock, an Avalon-MM Slave Interface and and an Avalon Interrupt. To create such a peripheral inside the system created by the SOPC Builder, I think I understand well the process, but I am not sure when the peripheral is extern. Do we have to create also an internal component that has the same signals and their equivalent in conduit interface, or is there another method ? Thanks in advance JérômeLink Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I'm pretty sure that you have to add an internal component that you will instantiate by the SOPC builder. The coduit end interface allows you to export the signal you need to access by the extra-NIOS component.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
What do you mean by "external" component?
If your peripheral has an Avalon interface, then you simply create a SOPC component and you can hook it up to your NIOS etc. in SOPC. The component may have "conduit" signals which interface to the outside world. If you follow the naming convention for your component port names then the process of building a component is very simple. If you really need/want the component to be instantiated outside SOPC, then you're in effect hooking it up via/to an Avalon bridge.- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
When I say external component, I mean that the peripheral is not included in the system build with the SOPC. But my peripheral has an Avalon-MM Interface. So, in my schematic top file in quartus, I have a symbol for the system containing the Nios, and my peripheral has its own symbol, and here I connect them.
So to do that, I need to have a SOPC component with a conduit interface to connect the peripheral to the system. And this component do nothing except connect all avalon signal to their equivalent in the conduit. Is it correct ?- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
There are three ways to do this:
1 - Use the Component editor to create a component using a generic Avalon MM slave template. Because the component is not based on HDL, all of the Avalon interface signals will be exported out of the system to your top level when you generate the system. 2 - Create your own component using HDL that exports the signals via a conduit interface. 3 - Create your component based on HDL as if you were going to put it inside the SoPC system. Then edit the generated <component_name>_hw.tcl script that's generated and set the "INSTANTIATE_IN_SYSTEM_MODULE" variable to false. This will then export all of the avalon signals from the system. I've attached a component that's an example of# 2 if it's of any use to you. You can probably just use it directly if you'd like. Jake- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Jake,
I think the idea I had correspond to the# 2, which consists in create a internal component that just export the avalon bus (what you did in the example you given) , and separately I have my peripheral and I can it to the system in quartus. Else, I don't understand the# 1. If you create a component with the editor and add an Avalon MM slave interface, , that does not create any pin on the system symbol. For the# 3, I tried it, but the SOPC Builder give me the following error when I add my component to the system : "Error: TestComponent: Setting top_level_hdl_module is not allowed when instantiate_in_system_module = false"- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Method# 2 is the one I usually tell people to use since it's much more clear that the slave port is wired up to an exported conduit. With tweaks to the .tcl file (elaboration callback) you can customize which signals you want popped up to the top.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Method# 2 also appears the more clear for me.
Thanks for your help everybody.- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page