Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
17 years ago

Component editor in SOPC

The 7.2 dialog for the SOPC component editor has puzzled even after reading the (brief) docs.

For my first custom component I used the 'avalon slave' template, and most of the default settings were close enough to generate a working interface without having to understand what the setting were for.

Now I want to add a second clock input to this component. On the signals tab, I understand signal name, type,width, but what does 'interface' mean? The only interface that seems to make sense is 'clock', but I have already used that for my 1st clock and I assume they would need to be distinct from each other. If I blindly move forward and add this modified component to my system on the SOPC dialog, I see that I still only get to assign one physical clock to this component. This is clearly wrong. I need better docs or a good explanation.

5 Replies

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    SOPC Builder 7.2 is really an interim product. The component editor and its accompanying documentation is poor at best. Supposedly 8.0 will be much more complete. However, what you need to do is add another clock interface.

    1 - Add a new signal to your list of signals.

    2 - In the interface column change the interface to "new Clock Input". Then change the signal type to "clk".

    Now on your interfaces tab you'll see your new clock input. You can also change the name of it if you would like.

    Jake
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Ah now thats more like it, thanks.

    For my 2nd custom component I need a bidir data bus with cs1,cs2,rd,clk to access a couple of A/Ds. A simple avalon slave template does not give me an option for bidir data, so I add a tristate slave template, but that does not give me a clk. Mixing interfaces signals gives me the signal types I want, but then I see on the interfaces tab I have two timing dialogs, one for the standard slave and one for the tristate slave. This does not seem right.

    I was getting the idea that 'interface' was just like 'name' and had no special meaning, but it looks like it does matter. What's the story?
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    You may try creating an avalon breakout component. Then you can have your custom code outside of SOPC.

    Basically, the avalon breakout module pulls the avalon signals to the toplevel sopc system generated HDL code. Then you can instantiate your custom code to that. This way, you can determine the clock domain crossing method, and you do not have to rerun SOPC when you make a change to your custom code. It can be a bit more work up front but can save time on the back end. You do need to know avalon bus transactions, but its good to know this anyways.

    I prefer this method with some of the more complex custom components.
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    I know I can use the breakout method as you call it, but I really thought tool would be able to handle this very basic interface. Its really just like an sram interface with two chips but no address lines. Why is that so special?

    For my two A/Ds, I added a tri-state bridge to the system and then two instances of a new tri-state slave component with clk, reset, cs, rd,wr,data. After generation I see it was smart enough give me just one data bus, but not smart enough to give me just one rd and one wr. Maybe I do need to stick with one component, but then it looks like I need to do address decode for the two chip selects, and I am back to the old 'interface to custom logic' method.