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
help with syntax
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="Tricky, post: 4066081"] Im having trouble getting the syntax correct for defining this constant in modelsim. basically Ive got a 3x3 2-D array of sfixed.I get the feeling Im not indexing the 2d array correctly. The errors I get are: # ** Warning: ./Testbenches/AWEP_filter_TB.vhd(48): (vcom-1172) Aggregate element expression (function call "to_sfixed") is not of type sub-array #2 of work.awep_setup_package.coeff_array_t. # ** Error: ./Testbenches/AWEP_filter_TB.vhd(48): No feasible entries for subprogram "to_sfixed". # ** Error: ./Testbenches/AWEP_filter_TB.vhd(48): Aggregate expression cannot be scalar type std.standard.integer. Could I get some help? subtype coeff_t is sfixed(1 downto -16); type coeff_array_t is array(-1 to 1, -1 to 1) of coeff_t; -- x y --top row FILTER_COEFFS : coeff_array_t := ( (-1,-1) => to_sfixed(0.0, coeff_t'high+1, abs(coeff_t'low) ) , ( 0,-1) => to_sfixed(0.0, coeff_t'high+1, abs(coeff_t'low) ) , ( 1,-1) => to_sfixed(0.0, coeff_t'high+1, abs(coeff_t'low) ) , --middle row (-1, 0) => to_sfixed(0.0, coeff_t'high+1, abs(coeff_t'low) ) , ( 0, 0) => to_sfixed(1.0, coeff_t'high+1, abs(coeff_t'low) ) , ( 1, 0) => to_sfixed(0.0, coeff_t'high+1, abs(coeff_t'low) ) , --bottom row (-1, 1) => to_sfixed(0.0, coeff_t'high+1, abs(coeff_t'low) ) , ( 0, 1) => to_sfixed(0.0, coeff_t'high+1, abs(coeff_t'low) ) , ( 1, 1) => to_sfixed(0.0, coeff_t'high+1, abs(coeff_t'low) ) ); [/QUOTE]
Verification
Post reply
Forums
Archive
Archive
VHDL
help with syntax
Top