order of declaration and instantiation

N

Neil Zanella

Hello,

Suppose an architecture instantiates an entity. I would like to know
whether the entity instantiated by the architecture must appear before
the definition of the architecture or whether it doesn't make any
difference whatsoever.

Thanks,

Neil
 
J

Jonathan Bromley

Suppose an architecture instantiates an entity. I would like to know
whether the entity instantiated by the architecture must appear before
the definition of the architecture or whether it doesn't make any
difference whatsoever.

If you're talking of direct instantiation (VHDL-93)...

instance: entity work.thing port map(...);

then the entity must have been compiled into the relevant library
before the instantiating architecture is compiled.

By contrast, if you instantiate a COMPONENT, then the component
declaration must have been compiled, typically into a package that's
USEd by the instantiating architecture, but possibly in the
declarative part of the architecture. In this case there is no
need to have created the entity at all at the time you do the
compilation.

Indirect instantiation via components therefore supports top-down
design rather better than direct instantiation.
Jonathan Bromley
 

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,159
Messages
2,570,879
Members
47,415
Latest member
PeggyCramp

Latest Threads

Top