Friday, 21 February 2014

VHDL: Converting from an INTEGER type to a STD_LOGIC_VECTOR


I built a mod-16 counter, and the output result is a INTEGER (all the examples I saw used INTEGER).


I built a hex-to-7-segment-display decoder, and its input is a STD_LOGIC_VECTOR (wrote it that way because it was easy to map out the truth table).


I'd like to connect the output of the counter to the input of the decoder, but I get 'type mismatch' errors when trying to compile in QuartusII.


Is there a way to convert from a INTEGER type to a STD_LOGIC_VECTOR type in a VHDL listing?




No comments:

Post a Comment

arduino - Can I use TI's cc2541 BLE as micro controller to perform operations/ processing instead of ATmega328P AU to save cost?

I am using arduino pro mini (which contains Atmega328p AU ) along with cc2541(HM-10) to process and transfer data over BLE to smartphone. I...