Hi, i have two std_logic_vector of 5 bits, with these i do a std_logic_vector of 10 bits. I need to convert this 10 bits vector into a natural number, range 0 to 1024.
I want to do this, to introduce the natural number in a rom and obtain the output.
libraryIEEE;useIEEE.STD_LOGIC_1164.ALL;useIEEE.numeric_std.all;ENTITY conver isPORT( a, b:INstd_logic_vector(4DOWNTO0));END conver;architecture con of conver isSIGNAL aux:std_logic_vector(9DOWNTO0);SIGNAL aux1:integerrange0to1024;BEGINPROCESS(a, b)begin
aux <= a & b;
aux1 <= to_integer(unsigned(aux));endprocess;end con;
But doesn't run, and other configurations neither, like conv_integer.
are you changing a or b only once. since you have used signals inside the process the aux1 will get assigned with a one clock cycle delay. so try something like this in the testbench: