Forum Discussion
Altera_Forum
Honored Contributor
15 years agoInteger to Bit Vector VHDL code error
I'm new to VHDL and I am trying to convert an integer to a 14 bit vector. Here is the protion of my code. gear_calc <= to_integer(unsigned(to_stdlogicvector(Input_2))); synchro_g...
Altera_Forum
Honored Contributor
15 years agoto_unsigned() takes a bit length as second parameter, it must be 14 in this case. A to_stdlogicvector() or to_bitvector() conversion has to be applied on the unsigned then.