Synthesizable VHDL code for filter design (using FDATOOL) not obtained for MATLAB R2015a
3 ビュー (過去 30 日間)
古いコメントを表示
Sir,
We designed a 6th order IIR low pass filter using FDATOOL in MATLABR2015a. We generated the VHDL code for the same using the 'Generate HDL' option under Analysis menu. However, in the generated VHDL code the filter coefficients were of datatype, 'real' and hence could not be synthesized by the Synplify tool in Libero IDE. Kindly guide us on the procedure to generate a synthesizable VHDL code for filter design using MATLAB.
A code snippet is provided below for reference:
LIBRARY IEEE;
USE IEEE.std_logic_1164.all;
USE IEEE.numeric_std.ALL;
ENTITY filter IS
PORT( clk : IN std_logic;
clk_enable : IN std_logic;
reset : IN std_logic;
filter_in : IN real; -- double
filter_out : OUT real -- double
);
END filter;
----------------------------------------------------------------
--Module Architecture: filter
----------------------------------------------------------------
ARCHITECTURE rtl OF filter IS
-- Local Functions
-- Type Definitions
TYPE delay_pipeline_type IS ARRAY (NATURAL range <>) OF real; -- double
-- Constants
CONSTANT scaleconst1 : real := 3.3591257762030907E-01; -- double
CONSTANT coeff_b1_section1 : real := 1.0000000000000000E+00; -- double
CONSTANT coeff_b2_section1 : real := 2.0000000000000000E+00; -- double
Thanks and Regards,
Arun Satheesan
0 件のコメント
回答 (1 件)
Bharath Venkataraman
2021 年 8 月 5 日
This is becasuse the filter is not quantized.
Use the Quantization panel in fdatool to create a fixed-point biquad filter. If you generate HDL for that filter, you will find that it has fixed-point settings.
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Optimization についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!