Forum Discussion
Altera_Forum
Honored Contributor
8 years agoa and b are std_logic_vectors. You cannot do arithmatic with them
you need to convert them to unsigned or signed types before you can do arithmatic. You probably want to declare them as signed or unsigned in the first place, or you will need a lot of type conversion: p := std_logic_vector( unsigned('0' & a) + unsigned('0' & b) ); if p, a and b were all declared as unsigned: a : unsigned(3 downto 0); type conversions wouldnt be needed: p := ('0'&a) + ('0'&b); Btw, why are you using "after" keyword. It is not synthesisable and is for simulation only.