S
Squidge
Guest
Can anyone tell me any disadvantages of using 'std_logic' over the builtin
type 'bit'? I'm still learning VHDL, and the books and tutorials I've read
all use 'bit' and 'bit_vector', but I find 'std_logic' and
'std_logic_vector' much more flexible. For example, when creating a
prescaler for an input clock, I normally like to use a simple counter and
assign the clock pin to one of the bits of the counter. I can't work out
how to use a bit_vector as a counter without errors stating that
bit_vector's don't support the '+' operator.
So, can std_logic suitably replace the 'bit' operator, or are there places
where 'bit' would be more suitable ? (flexibility, speed reasons, etc)
type 'bit'? I'm still learning VHDL, and the books and tutorials I've read
all use 'bit' and 'bit_vector', but I find 'std_logic' and
'std_logic_vector' much more flexible. For example, when creating a
prescaler for an input clock, I normally like to use a simple counter and
assign the clock pin to one of the bits of the counter. I can't work out
how to use a bit_vector as a counter without errors stating that
bit_vector's don't support the '+' operator.
So, can std_logic suitably replace the 'bit' operator, or are there places
where 'bit' would be more suitable ? (flexibility, speed reasons, etc)