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

How to share signals on Avalon bus ?

Altera_Forum
Honored Contributor II
1,353 Views

Hi all, 

after updating (Quartus II to version 4.2 and NIOS to 1.1) my CPU didn't run anymore due to obscure reasons (e.g. bit swapped addresses on some ports). That's why I've tried to completely reconstruct my cpu in this new environment. I used now 'create new component' instead of 'interface to user logic' to generate parts of my original device. It seems that it is now up to SOPC builder to decide which signals are shared on avalon bus and which not. Even if same timing is set and same interface name is used, SOPC builder generates shared byteenables_n but unshared write_n and read_n signals (CSn is of course never shared to guarantee single targets). 

 

How can I force shared avalon signals in 'create new component'? 

Do I have to use or-gates to merge unshared signals to a single signal? 

 

Thanks in advance 

 

Mike
0 Kudos
5 Replies
Altera_Forum
Honored Contributor II
341 Views

Sorry to hear that you're having trouble. Three options for you: 

 

1. AND/OR the signals together as you desire. In reality, this may be the best option. There shouldn't (please tell me if there is) a problem with always sharing address/data/chipselect per tri-state bridge

 

2. Edit the .ptf file of the component you made with component builder and turn on "is_shared" in the relevant SLAVE signal sections. A signal that 'is_shared = "1"' will be shared per tri-state bridge

 

3. Use the old interface to user-logic with all of its lovely quirks and limitations. Its still there, located in the 'legacy components' folder of SOPC Builder. 

 

After discussing this with some of our designers I think that the way its done now is actually all right, if not 100% optimial & whiz-bang -- the whole "is shared thing", from the perspective of the component builder and designing user-logic, is a bit skewed as the component builder has no knowledge if how multiple things will be later connected to a single tri-state bridge by the user. 

 

If you have any other problems or comments feel free to let us know!
0 Kudos
Altera_Forum
Honored Contributor II
341 Views

Jesse, 

again about problems with 'Create New Component' ...  

 

 

--- Quote Start ---  

originally posted by jesse@Dec 21 2004, 08:10 PM 

2. edit the .ptf file of the component you made with component builder and turn on "is_shared" in the relevant slave signal sections. a signal that 'is_shared = "1"' will be shared per tri-state bridge. 

--- Quote End ---  

 

.. but everytime compilation is started the .ptf file is replaced by its original contents and any altered parameters are lost? Can I start compilation without this update process? 

 

Thanks in advance 

 

Mike
0 Kudos
Altera_Forum
Honored Contributor II
341 Views

I don't know if this will flag an error or not, but try setting that file to read only. If that doesn't work then unfortunately I think you may be stuck editing this file every time.

0 Kudos
Altera_Forum
Honored Contributor II
341 Views

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

--- Quote Start ---  

.. but everytime compilation is started the .ptf file is replaced by its original contents and any altered parameters are lost? Can I start compilation without this update process?[/b] 

--- Quote End ---  

 

 

Here&#39;s the trick that I use. What you are experiencing is two text editors competing to be the one that saves the PTF file last. One of the editors is SOPC Builder itself! It will save the PTF file on program exit. 

 

Try this: 

 

Assuming that SOPC Builder is running 

 

1. File -> Browse Project Directory... This opens Windows Explorer for the project directory. 

 

2. In SOPC Builder, press the Exit button to write the current PTF to disk and close SOPC Builder. 

 

3. In Windows Explorer, sort by file type, double click on the PTF file (on my computer, this opens Notepad), edit the desired PTF setting, write the file, and exit Notepad. 

 

4. Start SOPC Builder again. 

 

Kerry
0 Kudos
Altera_Forum
Honored Contributor II
341 Views

BadOmen, 

a read-only file leads to an error message of SOPC-builder. Then it stops compiling. This doesn&#39;t work. 

 

kerry, 

you&#39;re right. If you change the contents of the .ptf file before you start SOPC-builder, most of these changes will be accepted. (e.g. it is not possible to change an irq signal from the component generator to irq_n). If you edit .ptf file while sopc-builder is open, all changes are lost when compiling starts. 

 

Thanks for your help 

 

Mike
0 Kudos
Reply