vlsi_freak
Full Member level 2

Which one would you use and why?
I vote for the first method???
signal a_sig : std_logic_vector(n downto 0);
signal b_sig : std_logic_vector(n downto 0);
process(a_sig,bsig)
variable c_sig : std_logic_vector(n downto 0);
begin
c_sig := a_sig-bsig;
a_is_smaller <= c_sig(c_sig'high);
end process;
process(a_sig,bsig)
variable c_sig : std_logic_vector(n downto 0);
begin
if(asig < bsig) then
a_is_smaller <= '1';
else
a_is_smaller <= '0';
end if;
end process;
I vote for the first method???
signal a_sig : std_logic_vector(n downto 0);
signal b_sig : std_logic_vector(n downto 0);
process(a_sig,bsig)
variable c_sig : std_logic_vector(n downto 0);
begin
c_sig := a_sig-bsig;
a_is_smaller <= c_sig(c_sig'high);
end process;
process(a_sig,bsig)
variable c_sig : std_logic_vector(n downto 0);
begin
if(asig < bsig) then
a_is_smaller <= '1';
else
a_is_smaller <= '0';
end if;
end process;