Nicolas Matringe <> wrote in message news:<>...
> Hi
> There are many reasons.
> If you use std_logic for busses, you will need std_logic for its
> elements, logic feeding it or being fed by it, unless you want to use
> conversion function.
Yes, you are right, std_logic is needed for busses but all the
other logic is of type bit. conversion functions can be used once to
change logic to & fro std_logic.Using std_logic logic for this only
reason for the whole system makes the simulator much slower.
> You design for synthesis, that's OK. We all do that too. But before you
> implement your code you will have to simulate it, and std_logic is much
> nicer than bit (unitialized or conflicting signals appear, for example)
No, If a desingner assigns multiple sources to a signal mistakenly
then simulator would'nt show it as a error(mistake).
>
> These are the 2 reasons that come to my mind but I'm sure I can think of
> others
)
Waiting for your more resons...
To believe as you think please answer one more question.
what would synthesis tool would do if I write this code.....
All signals are of type std_logic.
process (SEL, A, B, C, D)
begin
case SEL is
when "00" => MUX_OUT <= A;
when "01" => MUX_OUT <= B;
when "10" => MUX_OUT <= C;
when "11" => MUX_OUT <= D;
when others => MUX_OUT <= 'X';
end case;
end process;
what would synthesis tool would do if 1)I declare signals as of type
bit 2)I declare signals as of type std_logic.(what would it do with
others clause in this case).
Thanks in Advance.
Regards,
Mohamemd A.khader.