jiten wrote:
> hi,
> i've found that + operator doesn't work with std_logic values.
> it works only with std_logic_vector.
Not even. You'd need Synopsys' std_logic_unsigned (eg) which use
is deprecated (with reasons) against numeric_std which requires
signed or unsigned types.
> i've checked if a,b & c are std_logic values than
> c <= a + b; gives compile time errors.
> why it happens?
> cann't we use + operator with single std_logic values.
> regards
> jitendra.
>
Lots of things the VHDL Jedi needs to learn
Unlike Verilog, VHDL is strongly typed.
Btw, I think a one bit adder is just an xor, so
c <= a xor b;
is probably what you're looking for.
Alternatively, you could use one-bit vectors (0 downto 0).
Bert Cuzeau