M
Mohammed A khader
Guest
Hi All,
When simulating the following piece of code I came across this
Error: COMP96_0316: Sincos_Rom.vhd : (37, 22): Case expression must be
of a locally static subtype.
In case statement I am concatenating 3 std_logic types to a vector of
signed type of length 3.It is clear from the defination that vector is
static (that is vector length is locally fixed as 3 ).
In order to force the singed vector to 3 I changed it to follwoing
expression
case signed(2 downto 0)'( Sincos_Sel & negate & image) is ...
but still some other syntax error was displayed.
Error: COMP96_0015: Sincos_Rom.vhd : (37, 31): ')' expected.
Please help me in understanding it...
Code is here ......
Operation_Sel:case signed'( Sincos_Sel & negate & image) is
when "000" =>
shift := '0';
complement := '0';
when "001" =>
shift := '1';
complement := '0';
when "010" =>
shift := '0';
complement := '1';
when "011" =>
shift := '1';
complement := '1';
when "100" =>
shift := '1';
complement := '0';
when others =>
shift := 'X';
complement := 'X';
end case Operation_Sel;
Thanks,
Mohammed Khader.
When simulating the following piece of code I came across this
Error: COMP96_0316: Sincos_Rom.vhd : (37, 22): Case expression must be
of a locally static subtype.
In case statement I am concatenating 3 std_logic types to a vector of
signed type of length 3.It is clear from the defination that vector is
static (that is vector length is locally fixed as 3 ).
In order to force the singed vector to 3 I changed it to follwoing
expression
case signed(2 downto 0)'( Sincos_Sel & negate & image) is ...
but still some other syntax error was displayed.
Error: COMP96_0015: Sincos_Rom.vhd : (37, 31): ')' expected.
Please help me in understanding it...
Code is here ......
Operation_Sel:case signed'( Sincos_Sel & negate & image) is
when "000" =>
shift := '0';
complement := '0';
when "001" =>
shift := '1';
complement := '0';
when "010" =>
shift := '0';
complement := '1';
when "011" =>
shift := '1';
complement := '1';
when "100" =>
shift := '1';
complement := '0';
when others =>
shift := 'X';
complement := 'X';
end case Operation_Sel;
Thanks,
Mohammed Khader.