About multiple targets

S

smu

Hello,

Until now, I used especially the ACTEL FPGAs.
Today, I start to use FPGAs of other manufacturers.
It seems that it is possible to define several architectures for an
entity but I did not find the appropriate syntax.
Which is correct syntax to declare several architectures of an entity?
And how selection between these different architectures can be done?

I need this syntax because I want to optimize my design for each target.

Thank you in advance

smu
 
N

Neo

smu said:
Hello,

Until now, I used especially the ACTEL FPGAs.
Today, I start to use FPGAs of other manufacturers.
It seems that it is possible to define several architectures for an
entity but I did not find the appropriate syntax.
Which is correct syntax to declare several architectures of an entity?
And how selection between these different architectures can be done?

I need this syntax because I want to optimize my design for each target.

Thank you in advance

smu

The syntax is :
configuration <config_name> of <entity_name> is
for <reqd_architecture_name>
end for;
end configuration <config_name>;

previous to this you should have those architectures defined in the
entity.
by default if you have multiple architectures in an entity I think if
you dont configure, then the last architecture compiled will be taken
for simulation.

-Neo
 
S

smu

Neo said:
The syntax is :
configuration <config_name> of <entity_name> is
for <reqd_architecture_name>
end for;
end configuration <config_name>;

previous to this you should have those architectures defined in the
entity.
by default if you have multiple architectures in an entity I think if
you dont configure, then the last architecture compiled will be taken
for simulation.

-Neo

By supposing that we have a FOO entity and three associated
architectures (FOO_ACTEL, FOO_ALTERA and FOO_VHDL), how can we write the
code so that we can choose one of three possibilities?

smu

P.S. I had never used HDL to describe my FPGAs but only schematics.
 
R

Ralf Hildebrandt

smu wrote:

It seems that it is possible to define several architectures for an
entity but I did not find the appropriate syntax.
Which is correct syntax to declare several architectures of an entity?
And how selection between these different architectures can be done?

I need this syntax because I want to optimize my design for each target.

Beside the possibility to select an architecture with the configuration
as Mike an Neo have stated there is another option to achieve
target-specific designs:
You could use generic parameters. With them you could drive
generate-statements as well normal if-then descisions.

The advantage of generics yould be, that you only have to provide one
architecture. This is especially useful, if there are only slight
optimizations for special designs included. Bugfixing during development
is much easier as you don't have to modify many architecture files, if
something has to be changed.
The disadvantage is the bigger source code which makes it harder to
understand.

If you have very different VHDL source for each target - take
configurations, if there are only slight differences - take generic
parameters.

Ralf
 
J

jtw

-snip-
By supposing that we have a FOO entity and three associated architectures
(FOO_ACTEL, FOO_ALTERA and FOO_VHDL), how can we write the code so that we
can choose one of three possibilities?

smu

P.S. I had never used HDL to describe my FPGAs but only schematics.

Generics in your configuration. This works wonders for simulation.

Since the architectures would be in different files, you would select the
appropriate one in your synthesis project file.

JTW
 
N

Neo

smu said:
By supposing that we have a FOO entity and three associated
architectures (FOO_ACTEL, FOO_ALTERA and FOO_VHDL), how can we write the
code so that we can choose one of three possibilities?

smu

P.S. I had never used HDL to describe my FPGAs but only schematics.


Now suppose you have all the 3 architectures in a entity FOO then for
choosing a particular architecture say FOO_ALTERA in the same module
you have to write in the end:
configuration one_of_three of FOO is
for FOO_ALTERA
end for;
end configuration one_of_three;

The same format applies with some slight changes when you choose the
architectures in a top level module while instantiating the
components.
 
R

rickman

smu said:
Hello,

Until now, I used especially the ACTEL FPGAs.
Today, I start to use FPGAs of other manufacturers.
It seems that it is possible to define several architectures for an
entity but I did not find the appropriate syntax.
Which is correct syntax to declare several architectures of an entity?
And how selection between these different architectures can be done?

I need this syntax because I want to optimize my design for each target.

I can't answer your question, but you might not need completely separate
architectures for each entity. When I need to specify target specific
hardware descriptions, I use GENERATE statements. They work a bit like
#define in C, but can also do loops and conditionals.

I find that I don't need to completely change my code between targets,
just small parts like block rams and such.

--

Rick "rickman" Collins

(e-mail address removed)
Ignore the reply address. To email me use the above address with the XY
removed.

Arius - A Signal Processing Solutions Company
Specializing in DSP and FPGA design URL http://www.arius.com
4 King Ave 301-682-7772 Voice
Frederick, MD 21701-3110 301-682-7666 FAX
 

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

Forum statistics

Threads
473,733
Messages
2,569,439
Members
44,829
Latest member
PIXThurman

Latest Threads

Top