Configure component inside generate block

S

sakr

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
 
P

Paul Uiterlinden

sakr said:
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 :".
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,056
Messages
2,570,441
Members
47,119
Latest member
NoeliaIrby

Latest Threads

Top