Guest
Dear VHDL users,
A few days ago somebody asked on this list why not use bit instead of
std_logic. Actually why don't we use boolean instead of std_logic? (I am
interested in fpga synthesis.)
The main advantage is cleaner shorter code.
Instead of writing in a synchronous process:
if v < 10 and w > 20 then
a <= '1';
else
a <= '0';
end if;
then we have the shorter:
a <= v < 10 and w > 20;
and then rather than
if a = '1' then
we have
if a then
Better! I have been using for years std_logic everywhere, but the more I
think about it, the less reasons I see for it. What's your opinions?
Seb.
A few days ago somebody asked on this list why not use bit instead of
std_logic. Actually why don't we use boolean instead of std_logic? (I am
interested in fpga synthesis.)
The main advantage is cleaner shorter code.
Instead of writing in a synchronous process:
if v < 10 and w > 20 then
a <= '1';
else
a <= '0';
end if;
then we have the shorter:
a <= v < 10 and w > 20;
and then rather than
if a = '1' then
we have
if a then
Better! I have been using for years std_logic everywhere, but the more I
think about it, the less reasons I see for it. What's your opinions?
Seb.