O
Olivier Dir
Guest
Hi all,
for this code I would like write this code with loop or generate.
I don't know if it's possible.
pSelFifo : process(Clk, SRst)
begin
if SRst = '1' then
SelFifo <= (others=>'0');
elsif Clk'event and Clk='1' then
if DataAvlble(1) = '1' then
SelFifo <= "000001"
elsif DataAvlble(2) = '1' then
SelFifo <= "000010"
elsif DataAvlble(3) = '1' then
SelFifo <= "000100"
elsif DataAvlble(4) = '1' then
SelFifo <= "001000"
elsif DataAvlble(5) = '1' then
SelFifo <= "010000"
elsif DataAvlble(6) = '1' then
SelFifo <= "100000"
else
SelFifo <= (others=>'0');
end if;
end if;
end process;
thank for your help.
Olive
for this code I would like write this code with loop or generate.
I don't know if it's possible.
pSelFifo : process(Clk, SRst)
begin
if SRst = '1' then
SelFifo <= (others=>'0');
elsif Clk'event and Clk='1' then
if DataAvlble(1) = '1' then
SelFifo <= "000001"
elsif DataAvlble(2) = '1' then
SelFifo <= "000010"
elsif DataAvlble(3) = '1' then
SelFifo <= "000100"
elsif DataAvlble(4) = '1' then
SelFifo <= "001000"
elsif DataAvlble(5) = '1' then
SelFifo <= "010000"
elsif DataAvlble(6) = '1' then
SelFifo <= "100000"
else
SelFifo <= (others=>'0');
end if;
end if;
end process;
thank for your help.
Olive