Configure component inside generate block

Discussion in 'VHDL' started by sakr, Aug 23, 2010.

  1. sakr

    sakr Guest

    I was trying to write a configuration declaration to certain
    component; when compiling that configuration, I had a warning that the
    Component configuration "all : myComp" applies to no component
    instantiation statements.

    This an example of how my configuration declaration looks like; direct
    and simple:

    for myArch
    for all : myComp
    use entity myLib.myComp(myCompArch);
    end for;
    end for;

    I could attribute the problem to the fact that the myComp is
    instintaited inside a generate block.

    genLabel : for i in 0 to i_max generate
    myCompInst : component myComp
    port map (
    ...
    ...
    ...
    );

    end generate genLabel;

    Just to make sure I have no typos, I moved the component instintiation
    outside the generate block, then compiled the configuration, and I
    received no errors, or warnings, and the component binding was as I
    expected.

    So, my question is how to configure a compenet, when it is
    instintaited inside a generate block.

    Best Regards,
    Mostafa Sakr
     
    sakr, Aug 23, 2010
    #1
    1. Advertising

  2. sakr wrote:

    > I was trying to write a configuration declaration to certain
    > component; when compiling that configuration, I had a warning that the
    > Component configuration "all : myComp" applies to no component
    > instantiation statements.
    >
    > This an example of how my configuration declaration looks like; direct
    > and simple:
    >
    > for myArch
    > for all : myComp
    > use entity myLib.myComp(myCompArch);
    > end for;
    > end for;
    >
    > I could attribute the problem to the fact that the myComp is
    > instintaited inside a generate block.
    >
    > genLabel : for i in 0 to i_max generate
    > myCompInst : component myComp
    > port map (
    > ...
    > ...
    > ...
    > );
    >
    > end generate genLabel;
    >
    > Just to make sure I have no typos, I moved the component instintiation
    > outside the generate block, then compiled the configuration, and I
    > received no errors, or warnings, and the component binding was as I
    > expected.
    >
    > So, my question is how to configure a compenet, when it is
    > instintaited inside a generate block.


    The for-generate loop acts like an extra level of hierarchy, for
    configurations. So your configuration declaration should contain:

    for myArch
    for genLabel
    for all : myComp
    use entity myLib.myComp(myCompArch);
    end for;
    end for;
    end for;


    Additionally, your instantiation should be:

    genLabel : for i in 0 to i_max generate
    myCompInst : myComp
    port map (
    ...
    ...
    ...
    );

    end generate genLabel;

    So without the word "component" after "myCompInst :".

    --
    Paul Uiterlinden
    www.aimvalley.nl
    e-mail addres: remove the not.
     
    Paul Uiterlinden, Aug 23, 2010
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Soni
    Replies:
    0
    Views:
    1,092
  2. Karuppasamy

    com+ component and Component Service

    Karuppasamy, Jan 13, 2004, in forum: ASP .Net
    Replies:
    0
    Views:
    616
    Karuppasamy
    Jan 13, 2004
  3. Weng Tianxiang
    Replies:
    5
    Views:
    1,319
    Christophe
    Feb 16, 2006
  4. HS1
    Replies:
    0
    Views:
    466
  5. morrell
    Replies:
    1
    Views:
    969
    roy axenov
    Oct 10, 2006
Loading...

Share This Page