Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
14 years ago

help to rectify the error

architecture Behavioral of hamming is

signal f : integer ;

signal i : real := 0.0 ;

signal Pi : real := 3.14159;

begin

f <= (passband)+ (transition_width /2) ;

l1 : for i in (N-1)/2 downto (1-N)/2 generate

w <= 0.54 + ( 0.46 *(COS((2*i*Pi)/(N-1))));

end generate ;

l2 : for i in (N-1)/2 downto (1-N)/2 generate

x<= 2*f*(SIN (i*wc)/i*Pi);

end generate ;

l3 : for i in (N-1)/2 downto (1-N)/2 generate

h <= w and x ;

end generate ;

end Behavioral;

ERRORS :

"C:/.Xilinx/gateor/hamming.vhd" Line 51. * can not have such operands in this context.

ERROR:HDLParsers:808 - "C:/.Xilinx/gateor/hamming.vhd" Line 54. * can not have such operands in this context.

I AM USING

use IEEE.MATH_REAL.ALL;

use IEEE.NUMERIC_STD.ALL;

4 Replies

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    what are you compiling this code in? If it's a synthesizer then it won't work, reals aren't synthesizable.

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    sir,i am constructing hamming window for speech recognition system.can plz suggest me now anything on my program.

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    and it could be a good idea to have a look at cosine/sine generation algorithms, or use a table to store precalculated values.