?? lowpassfiltervhdlcord.txt
字號:
LIBRARY IEEE;
USE IEEE.std_logic_1164.all;
USE IEEE.numeric_std.ALL;
ENTITY hdlbutter IS
PORT( clk : IN std_logic;
clk_enable : IN std_logic;
reset : IN std_logic;
filter_in : IN std_logic_vector(11 DOWNTO 0); -- sfix12_En7
filter_out : OUT std_logic_vector(11 DOWNTO 0) -- sfix12_En7
);
END hdlbutter;
----------------------------------------------------------------
--Module Architecture: hdlbutter
----------------------------------------------------------------
ARCHITECTURE rtl OF hdlbutter IS
-- Local Functions
-- Type Definitions
TYPE numdelay_pipeline_type IS ARRAY (NATURAL range <>) OF signed(19 DOWNTO 0); -- sfix20_En15
TYPE dendelay_pipeline_type IS ARRAY (NATURAL range <>) OF signed(19 DOWNTO 0); -- sfix20_En15
-- Constants
CONSTANT coeff_b1_section1 : signed(15 DOWNTO 0) := to_signed(4106, 16); -- sfix16_En14
CONSTANT coeff_b2_section1 : signed(15 DOWNTO 0) := to_signed(8212, 16); -- sfix16_En14
CONSTANT coeff_b3_section1 : signed(15 DOWNTO 0) := to_signed(4106, 16); -- sfix16_En14
CONSTANT coeff_a2_section1 : signed(15 DOWNTO 0) := to_signed(8225, 16); -- sfix16_En14
CONSTANT coeff_a3_section1 : signed(15 DOWNTO 0) := to_signed(10233, 16); -- sfix16_En14
CONSTANT coeff_b1_section2 : signed(15 DOWNTO 0) := to_signed(7528, 16); -- sfix16_En14
CONSTANT coeff_b2_section2 : signed(15 DOWNTO 0) := to_signed(15057, 16); -- sfix16_En14
CONSTANT coeff_b3_section2 : signed(15 DOWNTO 0) := to_signed(7528, 16); -- sfix16_En14
CONSTANT coeff_a2_section2 : signed(15 DOWNTO 0) := to_signed(6464, 16); -- sfix16_En14
CONSTANT coeff_a3_section2 : signed(15 DOWNTO 0) := to_signed(4533, 16); -- sfix16_En14
CONSTANT coeff_b1_section3 : signed(15 DOWNTO 0) := to_signed(8724, 16); -- sfix16_En14
CONSTANT coeff_b2_section3 : signed(15 DOWNTO 0) := to_signed(17448, 16); -- sfix16_En14
CONSTANT coeff_b3_section3 : signed(15 DOWNTO 0) := to_signed(8724, 16); -- sfix16_En14
CONSTANT coeff_a2_section3 : signed(15 DOWNTO 0) := to_signed(5577, 16); -- sfix16_En14
CONSTANT coeff_a3_section3 : signed(15 DOWNTO 0) := to_signed(1663, 16); -- sfix16_En14
CONSTANT coeff_b1_section4 : signed(15 DOWNTO 0) := to_signed(7215, 16); -- sfix16_En14
CONSTANT coeff_b2_section4 : signed(15 DOWNTO 0) := to_signed(14430, 16); -- sfix16_En14
CONSTANT coeff_b3_section4 : signed(15 DOWNTO 0) := to_signed(7215, 16); -- sfix16_En14
CONSTANT coeff_a2_section4 : signed(15 DOWNTO 0) := to_signed(5217, 16); -- sfix16_En14
CONSTANT coeff_a3_section4 : signed(15 DOWNTO 0) := to_signed(500, 16); -- sfix16_En14
CONSTANT coeff_b1_section5 : signed(15 DOWNTO 0) := to_signed(5657, 16); -- sfix16_En14
CONSTANT coeff_b2_section5 : signed(15 DOWNTO 0) := to_signed(11315, 16); -- sfix16_En14
CONSTANT coeff_b3_section5 : signed(15 DOWNTO 0) := to_signed(5657, 16); -- sfix16_En14
CONSTANT coeff_a2_section5 : signed(15 DOWNTO 0) := to_signed(5342, 16); -- sfix16_En14
CONSTANT coeff_a3_section5 : signed(15 DOWNTO 0) := to_signed(904, 16); -- sfix16_En14
CONSTANT coeff_b1_section6 : signed(15 DOWNTO 0) := to_signed(6291, 16); -- sfix16_En14
CONSTANT coeff_b2_section6 : signed(15 DOWNTO 0) := to_signed(12581, 16); -- sfix16_En14
CONSTANT coeff_b3_section6 : signed(15 DOWNTO 0) := to_signed(6291, 16); -- sfix16_En14
CONSTANT coeff_a2_section6 : signed(15 DOWNTO 0) := to_signed(5940, 16); -- sfix16_En14
CONSTANT coeff_a3_section6 : signed(15 DOWNTO 0) := to_signed(2838, 16); -- sfix16_En14
CONSTANT coeff_b1_section7 : signed(15 DOWNTO 0) := to_signed(7624, 16); -- sfix16_En14
CONSTANT coeff_b2_section7 : signed(15 DOWNTO 0) := to_signed(15247, 16); -- sfix16_En14
CONSTANT coeff_b3_section7 : signed(15 DOWNTO 0) := to_signed(7624, 16); -- sfix16_En14
CONSTANT coeff_a2_section7 : signed(15 DOWNTO 0) := to_signed(7199, 16); -- sfix16_En14
CONSTANT coeff_a3_section7 : signed(15 DOWNTO 0) := to_signed(6911, 16); -- sfix16_En14
CONSTANT coeff_b1_section8 : signed(15 DOWNTO 0) := to_signed(4364, 16); -- sfix16_En14
CONSTANT coeff_b2_section8 : signed(15 DOWNTO 0) := to_signed(8728, 16); -- sfix16_En14
CONSTANT coeff_b3_section8 : signed(15 DOWNTO 0) := to_signed(4364, 16); -- sfix16_En14
CONSTANT coeff_a2_section8 : signed(15 DOWNTO 0) := to_signed(9674, 16); -- sfix16_En14
CONSTANT coeff_a3_section8 : signed(15 DOWNTO 0) := to_signed(14923, 16); -- sfix16_En14
CONSTANT coeff_b1_section9 : signed(15 DOWNTO 0) := to_signed(5362, 16); -- sfix16_En14
CONSTANT coeff_b2_section9 : signed(15 DOWNTO 0) := to_signed(10725, 16); -- sfix16_En14
CONSTANT coeff_b3_section9 : signed(15 DOWNTO 0) := to_signed(5362, 16); -- sfix16_En14
CONSTANT coeff_a2_section9 : signed(15 DOWNTO 0) := to_signed(7669, 16); -- sfix16_En14
CONSTANT coeff_a3_section9 : signed(15 DOWNTO 0) := to_signed(8433, 16); -- sfix16_En14
CONSTANT coeff_b1_section10 : signed(15 DOWNTO 0) := to_signed(8569, 16); -- sfix16_En14
CONSTANT coeff_b2_section10 : signed(15 DOWNTO 0) := to_signed(17138, 16); -- sfix16_En14
CONSTANT coeff_b3_section10 : signed(15 DOWNTO 0) := to_signed(8569, 16); -- sfix16_En14
CONSTANT coeff_a2_section10 : signed(15 DOWNTO 0) := to_signed(6179, 16); -- sfix16_En14
CONSTANT coeff_a3_section10 : signed(15 DOWNTO 0) := to_signed(3612, 16); -- sfix16_En14
CONSTANT coeff_b1_section11 : signed(15 DOWNTO 0) := to_signed(10112, 16); -- sfix16_En14
CONSTANT coeff_b2_section11 : signed(15 DOWNTO 0) := to_signed(20224, 16); -- sfix16_En14
CONSTANT coeff_b3_section11 : signed(15 DOWNTO 0) := to_signed(10112, 16); -- sfix16_En14
CONSTANT coeff_a2_section11 : signed(15 DOWNTO 0) := to_signed(5445, 16); -- sfix16_En14
CONSTANT coeff_a3_section11 : signed(15 DOWNTO 0) := to_signed(1236, 16); -- sfix16_En14
CONSTANT coeff_b1_section12 : signed(15 DOWNTO 0) := to_signed(8515, 16); -- sfix16_En14
CONSTANT coeff_b2_section12 : signed(15 DOWNTO 0) := to_signed(17030, 16); -- sfix16_En14
CONSTANT coeff_b3_section12 : signed(15 DOWNTO 0) := to_signed(8515, 16); -- sfix16_En14
CONSTANT coeff_a2_section12 : signed(15 DOWNTO 0) := to_signed(5193, 16); -- sfix16_En14
CONSTANT coeff_a3_section12 : signed(15 DOWNTO 0) := to_signed(421, 16); -- sfix16_En14
CONSTANT coeff_b1_section13 : signed(15 DOWNTO 0) := to_signed(5578, 16); -- sfix16_En14
CONSTANT coeff_b2_section13 : signed(15 DOWNTO 0) := to_signed(11155, 16); -- sfix16_En14
CONSTANT coeff_b3_section13 : signed(15 DOWNTO 0) := to_signed(5578, 16); -- sfix16_En14
CONSTANT coeff_a2_section13 : signed(15 DOWNTO 0) := to_signed(5267, 16); -- sfix16_En14
CONSTANT coeff_a3_section13 : signed(15 DOWNTO 0) := to_signed(660, 16); -- sfix16_En14
CONSTANT coeff_b1_section14 : signed(15 DOWNTO 0) := to_signed(6079, 16); -- sfix16_En14
CONSTANT coeff_b2_section14 : signed(15 DOWNTO 0) := to_signed(12159, 16); -- sfix16_En14
CONSTANT coeff_b3_section14 : signed(15 DOWNTO 0) := to_signed(6079, 16); -- sfix16_En14
CONSTANT coeff_a2_section14 : signed(15 DOWNTO 0) := to_signed(5741, 16); -- sfix16_En14
CONSTANT coeff_a3_section14 : signed(15 DOWNTO 0) := to_signed(2193, 16); -- sfix16_En14
CONSTANT coeff_b1_section15 : signed(15 DOWNTO 0) := to_signed(7202, 16); -- sfix16_En14
CONSTANT coeff_b2_section15 : signed(15 DOWNTO 0) := to_signed(14404, 16); -- sfix16_En14
CONSTANT coeff_b3_section15 : signed(15 DOWNTO 0) := to_signed(7202, 16); -- sfix16_En14
CONSTANT coeff_a2_section15 : signed(15 DOWNTO 0) := to_signed(6801, 16); -- sfix16_En14
CONSTANT coeff_a3_section15 : signed(15 DOWNTO 0) := to_signed(5624, 16); -- sfix16_En14
CONSTANT coeff_b1_section16 : signed(15 DOWNTO 0) := to_signed(9410, 16); -- sfix16_En14
CONSTANT coeff_b2_section16 : signed(15 DOWNTO 0) := to_signed(18821, 16); -- sfix16_En14
CONSTANT coeff_b3_section16 : signed(15 DOWNTO 0) := to_signed(9410, 16); -- sfix16_En14
CONSTANT coeff_a2_section16 : signed(15 DOWNTO 0) := to_signed(8886, 16); -- sfix16_En14
CONSTANT coeff_a3_section16 : signed(15 DOWNTO 0) := to_signed(12371, 16); -- sfix16_En14
-- Signals
SIGNAL input_register : signed(11 DOWNTO 0); -- sfix12_En7
-- Section 1 Signals
SIGNAL a1sum1 : signed(19 DOWNTO 0); -- sfix20_En11
SIGNAL a2sum1 : signed(19 DOWNTO 0); -- sfix20_En11
SIGNAL b1sum1 : signed(19 DOWNTO 0); -- sfix20_En11
SIGNAL b2sum1 : signed(19 DOWNTO 0); -- sfix20_En11
SIGNAL numtypeconvert1 : signed(19 DOWNTO 0); -- sfix20_En15
SIGNAL dentypeconvert1 : signed(19 DOWNTO 0); -- sfix20_En15
SIGNAL numdelay_section1 : numdelay_pipeline_type(0 TO 1); -- sfix20_En15
SIGNAL dendelay_section1 : dendelay_pipeline_type(0 TO 1); -- sfix20_En15
SIGNAL a2mul1 : signed(35 DOWNTO 0); -- sfix36_En29
SIGNAL a3mul1 : signed(35 DOWNTO 0); -- sfix36_En29
SIGNAL b1mul1 : signed(35 DOWNTO 0); -- sfix36_En29
SIGNAL b2mul1 : signed(35 DOWNTO 0); -- sfix36_En29
SIGNAL b3mul1 : signed(35 DOWNTO 0); -- sfix36_En29
SIGNAL b1multypeconvert1 : signed(19 DOWNTO 0); -- sfix20_En11
SIGNAL add_temp : signed(38 DOWNTO 0); -- sfix39_En29
SIGNAL add_temp_1 : signed(38 DOWNTO 0); -- sfix39_En29
SIGNAL sub_temp : signed(38 DOWNTO 0); -- sfix39_En29
SIGNAL sub_temp_1 : signed(38 DOWNTO 0); -- sfix39_En29
-- Section 2 Signals
SIGNAL a1sum2 : signed(19 DOWNTO 0); -- sfix20_En11
SIGNAL a2sum2 : signed(19 DOWNTO 0); -- sfix20_En11
SIGNAL b1sum2 : signed(19 DOWNTO 0); -- sfix20_En11
SIGNAL b2sum2 : signed(19 DOWNTO 0); -- sfix20_En11
SIGNAL numtypeconvert2 : signed(19 DOWNTO 0); -- sfix20_En15
SIGNAL dentypeconvert2 : signed(19 DOWNTO 0); -- sfix20_En15
SIGNAL dendelay_section2 : dendelay_pipeline_type(0 TO 1); -- sfix20_En15
SIGNAL a2mul2 : signed(35 DOWNTO 0); -- sfix36_En29
SIGNAL a3mul2 : signed(35 DOWNTO 0); -- sfix36_En29
SIGNAL b1mul2 : signed(35 DOWNTO 0); -- sfix36_En29
SIGNAL b2mul2 : signed(35 DOWNTO 0); -- sfix36_En29
SIGNAL b3mul2 : signed(35 DOWNTO 0); -- sfix36_En29
SIGNAL b1multypeconvert2 : signed(19 DOWNTO 0); -- sfix20_En11
SIGNAL add_temp_2 : signed(38 DOWNTO 0); -- sfix39_En29
SIGNAL add_temp_3 : signed(38 DOWNTO 0); -- sfix39_En29
SIGNAL sub_temp_2 : signed(38 DOWNTO 0); -- sfix39_En29
SIGNAL sub_temp_3 : signed(38 DOWNTO 0); -- sfix39_En29
-- Section 3 Signals
SIGNAL a1sum3 : signed(19 DOWNTO 0); -- sfix20_En11
SIGNAL a2sum3 : signed(19 DOWNTO 0); -- sfix20_En11
SIGNAL b1sum3 : signed(19 DOWNTO 0); -- sfix20_En11
SIGNAL b2sum3 : signed(19 DOWNTO 0); -- sfix20_En11
SIGNAL numtypeconvert3 : signed(19 DOWNTO 0); -- sfix20_En15
SIGNAL dentypeconvert3 : signed(19 DOWNTO 0); -- sfix20_En15
SIGNAL dendelay_section3 : dendelay_pipeline_type(0 TO 1); -- sfix20_En15
SIGNAL a2mul3 : signed(35 DOWNTO 0); -- sfix36_En29
SIGNAL a3mul3 : signed(35 DOWNTO 0); -- sfix36_En29
SIGNAL b1mul3 : signed(35 DOWNTO 0); -- sfix36_En29
SIGNAL b2mul3 : signed(35 DOWNTO 0); -- sfix36_En29
SIGNAL b3mul3 : signed(35 DOWNTO 0); -- sfix36_En29
SIGNAL b1multypeconvert3 : signed(19 DOWNTO 0); -- sfix20_En11
SIGNAL add_temp_4 : signed(38 DOWNTO 0); -- sfix39_En29
SIGNAL add_temp_5 : signed(38 DOWNTO 0); -- sfix39_En29
SIGNAL sub_temp_4 : signed(38 DOWNTO 0); -- sfix39_En29
SIGNAL sub_temp_5 : signed(38 DOWNTO 0); -- sfix39_En29
-- Section 4 Signals
SIGNAL a1sum4 : signed(19 DOWNTO 0); -- sfix20_En11
SIGNAL a2sum4 : signed(19 DOWNTO 0); -- sfix20_En11
SIGNAL b1sum4 : signed(19 DOWNTO 0); -- sfix20_En11
SIGNAL b2sum4 : signed(19 DOWNTO 0); -- sfix20_En11
SIGNAL numtypeconvert4 : signed(19 DOWNTO 0); -- sfix20_En15
SIGNAL dentypeconvert4 : signed(19 DOWNTO 0); -- sfix20_En15
SIGNAL dendelay_section4 : dendelay_pipeline_type(0 TO 1); -- sfix20_En15
SIGNAL a2mul4 : signed(35 DOWNTO 0); -- sfix36_En29
SIGNAL a3mul4 : signed(35 DOWNTO 0); -- sfix36_En29
SIGNAL b1mul4 : signed(35 DOWNTO 0); -- sfix36_En29
SIGNAL b2mul4 : signed(35 DOWNTO 0); -- sfix36_En29
SIGNAL b3mul4 : signed(35 DOWNTO 0); -- sfix36_En29
SIGNAL b1multypeconvert4 : signed(19 DOWNTO 0); -- sfix20_En11
SIGNAL add_temp_6 : signed(38 DOWNTO 0); -- sfix39_En29
SIGNAL add_temp_7 : signed(38 DOWNTO 0); -- sfix39_En29
SIGNAL sub_temp_6 : signed(38 DOWNTO 0); -- sfix39_En29
SIGNAL sub_temp_7 : signed(38 DOWNTO 0); -- sfix39_En29
-- Section 5 Signals
SIGNAL a1sum5 : signed(19 DOWNTO 0); -- sfix20_En11
SIGNAL a2sum5 : signed(19 DOWNTO 0); -- sfix20_En11
SIGNAL b1sum5 : signed(19 DOWNTO 0); -- sfix20_En11
SIGNAL b2sum5 : signed(19 DOWNTO 0); -- sfix20_En11
SIGNAL numtypeconvert5 : signed(19 DOWNTO 0); -- sfix20_En15
SIGNAL dentypeconvert5 : signed(19 DOWNTO 0); -- sfix20_En15
SIGNAL dendelay_section5 : dendelay_pipeline_type(0 TO 1); -- sfix20_En15
SIGNAL a2mul5 : signed(35 DOWNTO 0); -- sfix36_En29
SIGNAL a3mul5 : signed(35 DOWNTO 0); -- sfix36_En29
SIGNAL b1mul5 : signed(35 DOWNTO 0); -- sfix36_En29
SIGNAL b2mul5 : signed(35 DOWNTO 0); -- sfix36_En29
SIGNAL b3mul5 : signed(35 DOWNTO 0); -- sfix36_En29
SIGNAL b1multypeconvert5 : signed(19 DOWNTO 0); -- sfix20_En11
SIGNAL add_temp_8 : signed(38 DOWNTO 0); -- sfix39_En29
SIGNAL add_temp_9 : signed(38 DOWNTO 0); -- sfix39_En29
SIGNAL sub_temp_8 : signed(38 DOWNTO 0); -- sfix39_En29
SIGNAL sub_temp_9 : signed(38 DOWNTO 0); -- sfix39_En29
-- Section 6 Signals
SIGNAL a1sum6 : signed(19 DOWNTO 0); -- sfix20_En11
SIGNAL a2sum6 : signed(19 DOWNTO 0); -- sfix20_En11
SIGNAL b1sum6 : signed(19 DOWNTO 0); -- sfix20_En11
SIGNAL b2sum6 : signed(19 DOWNTO 0); -- sfix20_En11
SIGNAL numtypeconvert6 : signed(19 DOWNTO 0); -- sfix20_En15
SIGNAL dentypeconvert6 : signed(19 DOWNTO 0); -- sfix20_En15
SIGNAL dendelay_section6 : dendelay_pipeline_type(0 TO 1); -- sfix20_En15
SIGNAL a2mul6 : signed(35 DOWNTO 0); -- sfix36_En29
SIGNAL a3mul6 : signed(35 DOWNTO 0); -- sfix36_En29
SIGNAL b1mul6 : signed(35 DOWNTO 0); -- sfix36_En29
SIGNAL b2mul6 : signed(35 DOWNTO 0); -- sfix36_En29
SIGNAL b3mul6 : signed(35 DOWNTO 0); -- sfix36_En29
SIGNAL b1multypeconvert6 : signed(19 DOWNTO 0); -- sfix20_En11
SIGNAL add_temp_10 : signed(38 DOWNTO 0); -- sfix39_En29
SIGNAL add_temp_11 : signed(38 DOWNTO 0); -- sfix39_En29
SIGNAL sub_temp_10 : signed(38 DOWNTO 0); -- sfix39_En29
SIGNAL sub_temp_11 : signed(38 DOWNTO 0); -- sfix39_En29
-- Section 7 Signals
SIGNAL a1sum7 : signed(19 DOWNTO 0); -- sfix20_En11
SIGNAL a2sum7 : signed(19 DOWNTO 0); -- sfix20_En11
SIGNAL b1sum7 : signed(19 DOWNTO 0); -- sfix20_En11
SIGNAL b2sum7 : signed(19 DOWNTO 0); -- sfix20_En11
SIGNAL numtypeconvert7 : signed(19 DOWNTO 0); -- sfix20_En15
SIGNAL dentypeconvert7 : signed(19 DOWNTO 0); -- sfix20_En15
SIGNAL dendelay_section7 : dendelay_pipeline_type(0 TO 1); -- sfix20_En15
SIGNAL a2mul7 : signed(35 DOWNTO 0); -- sfix36_En29
SIGNAL a3mul7 : signed(35 DOWNTO 0); -- sfix36_En29
SIGNAL b1mul7 : signed(35 DOWNTO 0); -- sfix36_En29
SIGNAL b2mul7 : signed(35 DOWNTO 0); -- sfix36_En29
SIGNAL b3mul7 : signed(35 DOWNTO 0); -- sfix36_En29
SIGNAL b1multypeconvert7 : signed(19 DOWNTO 0); -- sfix20_En11
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -