Forums
New posts
Search forums
Members
Current visitors
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Menu
Log in
Register
Install the app
Install
Forums
Archive
Archive
VHDL
constants of sfixed in architecture body
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
[QUOTE="Paul, post: 4098766"] Hi, in the example attached I did try to set some filter coeffs constants for a fir filter (direct form I second order structure). Modelsim complains on Type mark "coeefficient_type" cannot be actual parameter. Illegal name (subtype declaration "coeefficient_type") in expression. Is there a limitation or simple a syntax error. Is there a way to do this - how to get it? Thanks, Olaf library ieee; use ieee.std_logic_1164.all; use ieee.numeric_std.all; library floatfixlib; use floatfixlib.math_utility_pkg.all; -- ieee_proposed for VHDL-93 version use floatfixlib.fixed_pkg.all; -- ieee_proposed for compatibility version entity df1tsos is port ( clk : in std_ulogic; clk_en : in std_ulogic; reset : in std_ulogic; input : in sfixed(16 downto -14); -- [-2 2) output : out sfixed(16 downto -14) -- [-2 2) ); end entity df1tsos; architecture rtl of df1tsos is subtype numerator_type is sfixed(16 downto -14); -- [-2 2) subtype denominator_type is sfixed(16 downto -14); -- [-2 2) subtype numerator_state_type is sfixed(16 downto -12); -- [-8 8) subtype denominator_state_type is sfixed(16 downto -12); -- [-8 8) subtype coeefficient_type is sfixed(16 downto -14); -- [-2 2) signal numerator_s : numerator_type; signal denominator_s : denominator_type; constant b0_coeff : coeefficient_type := to_sfixed( 0.000000000000000, coeefficient_type); constant b1_coeff : coeefficient_type := to_sfixed( 1.000000000000000, coeefficient_type); constant b2_coeff : coeefficient_type := to_sfixed( 0.843811035156250, coeefficient_type); constant a0_coeff : coeefficient_type := to_sfixed( 1.000000000000000, coeefficient_type); constant a1_coeff : coeefficient_type := to_sfixed(-1.538757324218750, coeefficient_type); constant a2_coeff : coeefficient_type := to_sfixed( 0.601013183593750, coeefficient_type); begin end architecture rtl; [/QUOTE]
Verification
Post reply
Forums
Archive
Archive
VHDL
constants of sfixed in architecture body
Top