variable Component name

Guest #6118874
Rate this post
• ▲ useful
▼ not useful
Hello
I'm trying to use a component and part of my code is:
----------------------------------------------------------------
for i in 0 to n-1 loop
for o in 0 to n-1 loop
for p in 0 to n-1 loop
if (o-p = 32) then
bf(i): butterfly port map(s(o),s(p),w(0),g1(i);g1(i+1))
end if;
end loop;
end loop;
end loop;
-----------------------------------------------------------------
but I can't set the name of component "bf(i)" and I can't set a static 
name either, because it's going to make as much component as needed by 
defining n by user.
So my question is how can I do this.
Appreciate your help.
Best Regards.
Arsalan
Guest #6119115
Rate this post
• ▲ useful
▼ not useful
arsalan ghasemian wrote:
> but I can't set the name of component "bf(i)"

Why do you want to do this? During simulation/synthesis, each of your 
n^3 component instances will be assigned an individual name 
automatically. For example, something like bf_1_3_7, depending on the 
tools. So just write bf for the name. There is no need for indexing the 
instances in your code.

arsalan ghasemian wrote:
> as much component as needed by
> defining n by user

Of course you know, that n must be fixed. It can be set during compile 
time, but not later when the simulation is running or when the design is 
on an FPGA or ASIC.

Reply

Note: the original post is older than 6 months. Please don't ask any new questions in this thread, but start a new one.

Formatting
  • [c]C-Code[/c]
  • [vhdl]VHDL-Code[/vhdl]
  • [code]code in other languages, ASCII drawings[/code]
  • [math]formula (LaTeX syntax)[/math]
  • [[Title]] – link to an article
  • Link to another post: right-click its post ID (#8078628), copy the address, paste it into the text

More about formatting

Post long source code as an attachment, not in the text.

Already registered? Log in

Not shown to anyone. We send you a link; your post appears once you confirm it there.

By submitting you create a free account and accept the terms of use.