Hello everyone,
I am new to VHDL and I am having problems with synthesis.
Is variable indexing of arrays (e.g. std_logic_vector) not really synthesizable?
For example,
-----
VARIABLE x : std_logic_vector(7 DOWNTO 0);
VARIABLE start : natural := 2;
VARIABLE end : natural := 4;
VARIABLE y : std_logic_vector(2 DOWNTO 0);
------
y := x(end DOWNTO start);
-------------------------------------------------
Why is this code not synthesizable? the tool I am using gives me
"Slice indices should be static"?
Is there someway to get around this in hardware?
The solution that I have till now is: Shifiting right and left till the part that we need remains and all others are 0's then ORing the parts that we need together.
Waiting for your replies.
Thank you very much
____
O.S.
I am new to VHDL and I am having problems with synthesis.
Is variable indexing of arrays (e.g. std_logic_vector) not really synthesizable?
For example,
-----
VARIABLE x : std_logic_vector(7 DOWNTO 0);
VARIABLE start : natural := 2;
VARIABLE end : natural := 4;
VARIABLE y : std_logic_vector(2 DOWNTO 0);
------
y := x(end DOWNTO start);
-------------------------------------------------
Why is this code not synthesizable? the tool I am using gives me
"Slice indices should be static"?
Is there someway to get around this in hardware?
The solution that I have till now is: Shifiting right and left till the part that we need remains and all others are 0's then ORing the parts that we need together.
Waiting for your replies.
Thank you very much
____
O.S.