vivado width mismatch error in synthesis

OP #6305818
Rate this post
useful
not useful
Hi!
vivado gives me this error :
[Synth 8-690] width mismatch in assignment; target has 16 bits, source 
has 1 bits  for this line :  leds <= "0" & leds(length-1 to 1);
which is inserted in this contest :
1
if leds = led_left then
2
         direction <='1';
3
         leds <= "0" & leds(length-1 to 1);
the leds vector and the main constants are defined in this way :
1
kc: out STD_LOGIC_VECTOR(LENGTH-1 downto 0)
2
length : integer :=16;
3

4
constant kc_in : std_logic_vector(LENGTH-1 downto 0):=std_logic_vector(to_unsigned(2**kc'RIGHT,LENGTH));
5

6
constant led_left : std_logic_vector(LENGTH-1 downto 0) :=
7
std_logic_vector(to_unsigned(2**kc'LEFT,LENGTH));
8
signal leds : STD_LOGIC_VECTOR(length-1 downto 0):=kc_in;
Where is the problem?
thank you very much

Reply

Please log in before posting.

or

Log in with Google account

Registration is free and takes only a minute.

Register now