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 agoI decided to use std_logic_vectors and the reason bieng is that my inputs and outputs to my code are in parallel 14 bit strings, and I have to do some arithmetic and calculations with the inputs to come up with some ofthe outputs, so I thought it would be easier to do the calculations in integer types and convert back to bit vectors before I output.