Guest
Hi,
for arbitration purpose I need to store a 12 bit value
three times.
Then I need to compare the three registers.
What is the best way to save ressources ?
Is the approach shown a good one ?
process(Rst, Clk)
begin
if Rst='1' then
ls_reg0 <= (OTHERS => '0');
ls_reg1 <= (OTHERS => '0');
ls_equal <= '0';
elsif rising_edge(Clk) then
ls_equal <= '0';
if ls_store0='1' THEN
ls_reg0 <= DataIn;
end if;
if ls_store1='1' THEN
ls_reg1 <= DataIn;
end if;
if ls_store2='1' THEN
if ((ls_reg0=ls_reg1) AND (ls_reg1=DataIn)) then
ls_equal <= '1';
end if;
end if;
end if;
end process;
Rgds
André
for arbitration purpose I need to store a 12 bit value
three times.
Then I need to compare the three registers.
What is the best way to save ressources ?
Is the approach shown a good one ?
process(Rst, Clk)
begin
if Rst='1' then
ls_reg0 <= (OTHERS => '0');
ls_reg1 <= (OTHERS => '0');
ls_equal <= '0';
elsif rising_edge(Clk) then
ls_equal <= '0';
if ls_store0='1' THEN
ls_reg0 <= DataIn;
end if;
if ls_store1='1' THEN
ls_reg1 <= DataIn;
end if;
if ls_store2='1' THEN
if ((ls_reg0=ls_reg1) AND (ls_reg1=DataIn)) then
ls_equal <= '1';
end if;
end if;
end if;
end process;
Rgds
André