Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

entity attributes help

Status
Not open for further replies.

albertobosio

Programmer
Jul 14, 2005
1
0
0
IT
I have a code like this:



entity router is
.....
end router;


architecture behave of router is

....
queue_0: fifo port map (clock,write_enb(0),read_enb_0,data_out_fsm,data_out_0,empty_0,full_0);

queue_1: fifo port map (clock,write_enb(1),read_enb_1,data_out_fsm,data_out_1,empty_1,full_1);

queue_2: fifo port map (clock,write_enb(2),read_enb_2,data_out_fsm,data_out_2,empty_2,full_2);

....
end behave;

in entity router I create 3 instace of entity fifo (queue_0,queue_1 and queue_2), where fifo is:

entity fifo is port
....
end fifo;

architecture behave of fifo is
....
begin
.....
end behave;


Can I use the attributes fifo'instance_name to know which is the instace of fifo ?

this is a right way to do this ?

architecture behave of fifo is
....
begin
....
if (fifo'instance_name = XX)

....
end behave;


many thanks in advances..

Alberto
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top