Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

component mapping in a different way

Status
Not open for further replies.

verylsi

Full Member level 2
Joined
Mar 12, 2012
Messages
123
Helped
16
Reputation
32
Reaction score
16
Trophy points
1,308
Activity points
2,130
Hello All,

I recently encountered a code where components are mapped in the following mentioned manner..

It looks wonderful as it does not needs component declaration and port mapping alone is enough..

My question is how good is this practice .. and any comment on this is more than welcome.

HTML:
Architecture rtl of ABC is
begin

CrcInst : entity work.Crc
   port map( 
        clk => clk,
        reset => reset,
        Sync => Sync,
        sw => sw,        
        Crc => Crc,
        dataRecord => Data0,
        dataOut => crcData
);
 

This feature was introduced in VHDL1993. It is great because the compiler will compare the mapping directly to the entity, rather than the compiler checking the component (which matches) then the elaborator checking the component to the entity and it cant find a match (and this is 20 minutes after you pressed compile!)

This is called direct instantiation, and I would highly recommend it. It also allows you to select which architecture to use if there are several:

my_inst : entity some_lib.my_ent( select_arch )
 

Thanks tricky,

I will switch to this style with immediate effect :)
 

One thing to watch out for with direct instantiation is that the component must be compiled before it is used.
With the old style, the compile order for the source files doesn't matter.
 

Thanks tricky,

I will switch to this style with immediate effect :)

Remember that if you are instantiating Verilog, AHDL or black box components in your vhdl, you still need a component declaration.
 

Thank you all for your help ... :)
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top