Forum Discussion
Altera_Forum
Honored Contributor
15 years agohelp 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
Honored 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.
- Altera_Forum
Honored Contributor
dont use real type? use fixed point instead.
- Altera_Forum
Honored Contributor
sir,i am constructing hamming window for speech recognition system.can plz suggest me now anything on my program.
- Altera_Forum
Honored Contributor
what are you compiling this code in? If it's a synthesizer then it won't work, reals aren't synthesizable.