To make a connection to the cpu in the SOPC builder you will have to check the Avalon bus spec. to see how the interface works. The avalon bus is quite flexible and has a lot of different signals to choose from. You only need to implement those that are relevant for your component. The component editor give good tips of what is missing when starting to assign signals to the interface. First create the interface you need in the interface tab. Probably Avalon slave in your case. Then assign the port signals from your HDL-file to that interface. Most likely you will need a data bus in and one out, read and write enables, if using two input registers you will need at least a 1-bit address line. If you want signals to be available outside the sopc module then you assign your signal to the "global_signals" interface as type "export". Also remember that your component can only accept one input at a time per Avalon-MM slave port. So if you are creating an adder you'll have to write each input separately (different address locations) or pack the to inputs into a wider data width that your component supports.
Here's some documentation that'll help you out: http://www.altera.com/literature/lit-qts.jsp
[此贴子已经被作者于2008-9-5 12:38:53编辑过] |