albertobosio
Programmer
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
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