Forum Discussion
Altera_Forum
Honored Contributor
14 years ago[VHDL] integer to std_logic or std_logic_vector conversion
Hello, I've some issues to convert integer to std_logic or std_logic_vector. I need to do so for a testbench which reads stimuli (binary or positive integers) in a text file, stores it as intege...
Altera_Forum
Honored Contributor
14 years agobtw, what are you trying to compile this code in? You cannot compile this code in Quartus, which is probably why you're getting a range constraint violation, because Quartus wants to map integers to 32 bits, and you only asked for 1 bit. (As well as non of the textio stuff being appropriate).
The first line should work fine in Modelsim.