Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > VHDL > Configure component inside generate block

Reply
Thread Tools

Configure component inside generate block

 
 
sakr
Guest
Posts: n/a
 
      08-23-2010
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
 
Reply With Quote
 
 
 
 
Paul Uiterlinden
Guest
Posts: n/a
 
      08-23-2010
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.
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Fo:Block can you check to see if a block contains any text by using the block id? morrell XML 1 10-10-2006 07:18 PM
How to generate warnings when How generate a warning when int is converted to bool or vice versa? PengYu.UT@gmail.com C++ 3 04-06-2006 11:24 PM
How to generate variable labels for same component within a generate loop Weng Tianxiang VHDL 5 02-16-2006 01:45 PM
different between configure libraries and configure JDKs HS1 Java 0 11-18-2004 03:40 AM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57