📄 cf_fft_2048_18.vhd
字号:
---- Copyright (c) 2003 Launchbird Design Systems, Inc.-- All rights reserved.-- -- Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:-- Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.-- Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.-- -- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,-- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.-- IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,-- OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;-- OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT-- (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.-- -- -- Overview:-- -- Performs a radix 2 Fast Fourier Transform.-- The FFT architecture is pipelined on a rank basis; each rank has its own butterfly and ranks are-- isolated from each other using memory interleavers. This FFT can perform calcualations on continuous-- streaming data (one data set right after another). More over, inputs and outputs are passed in pairs,-- doubling the bandwidth. For instance, a 2048 point FFT can perform a transform every 1024 cycles.-- -- Interface:-- -- Synchronization:-- clock_c : Clock input.-- enable_i : Synchronous enable.-- reset_i : Synchronous reset.-- -- Inputs:-- sync_i : Input sync pulse must occur one frame prior to data input.-- data_0_i : Input data 0. Width is 2 * precision. Real on the left, imag on the right.-- data_1_i : Input data 1. Width is 2 * precision. Real on the left, imag on the right.-- -- Outputs:-- sync_o : Output sync pulse occurs one frame before data output.-- data_0_o : Output data 0. Width is 2 * precision. Real on the left, imag on the right.-- data_1_o : Output data 1. Width is 2 * precision. Real on the left, imag on the right.-- -- Built In Parameters:-- -- FFT Points = 2048-- Precision = 18-- -- -- -- -- Generated by Confluence 0.6.3 -- Launchbird Design Systems, Inc. -- www.launchbird.com-- -- Build Date : Fri Aug 22 08:49:36 CDT 2003-- -- Interface-- -- Build Name : cf_fft_2048_18-- Clock Domains : clock_c -- Vector Input : enable_i(1)-- Vector Input : reset_i(1)-- Vector Input : sync_i(1)-- Vector Input : data_0_i(36)-- Vector Input : data_1_i(36)-- Vector Output : sync_o(1)-- Vector Output : data_0_o(36)-- Vector Output : data_1_o(36)-- -- -- library ieee;use ieee.std_logic_1164.all;use ieee.numeric_std.all;entity cf_fft_2048_18_41 isport (clock_c : in std_logic;i1 : in unsigned(35 downto 0);i2 : in unsigned(35 downto 0);i3 : in unsigned(1 downto 0);i4 : in unsigned(0 downto 0);i5 : in unsigned(0 downto 0);o1 : out unsigned(35 downto 0);o2 : out unsigned(35 downto 0));end entity cf_fft_2048_18_41;architecture rtl of cf_fft_2048_18_41 issignal n1 : unsigned(35 downto 0) := "000000000000000000000000000000000000";signal n2 : unsigned(17 downto 0);signal n3 : unsigned(17 downto 0);signal n4 : unsigned(35 downto 0) := "000000000000000000000000000000000000";signal n5 : unsigned(17 downto 0);signal n6 : unsigned(17 downto 0);signal n7 : unsigned(17 downto 0) := "000000000000000000";signal n8 : unsigned(17 downto 0) := "000000000000000000";signal n9 : unsigned(17 downto 0) := "000000000000000000";signal n10 : unsigned(17 downto 0) := "000000000000000000";signal n11 : unsigned(35 downto 0) := "000000000000000000000000000000000000";signal n12 : unsigned(17 downto 0);signal n13 : unsigned(17 downto 0);signal n14 : unsigned(35 downto 0);signal n15 : unsigned(17 downto 0);signal n16 : unsigned(17 downto 0) := "000000000000000000";signal n17 : unsigned(35 downto 0);signal n18 : unsigned(17 downto 0);signal n19 : unsigned(17 downto 0) := "000000000000000000";signal n20 : unsigned(17 downto 0);signal n21 : unsigned(17 downto 0) := "000000000000000000";signal n22 : unsigned(35 downto 0);signal n23 : unsigned(17 downto 0);signal n24 : unsigned(17 downto 0) := "000000000000000000";signal n25 : unsigned(35 downto 0);signal n26 : unsigned(17 downto 0);signal n27 : unsigned(17 downto 0) := "000000000000000000";signal n28 : unsigned(17 downto 0);signal n29 : unsigned(17 downto 0) := "000000000000000000";signal n30 : unsigned(17 downto 0);signal n31 : unsigned(17 downto 0);signal n32 : unsigned(35 downto 0);signal n33 : unsigned(35 downto 0) := "000000000000000000000000000000000000";signal n34 : unsigned(17 downto 0);signal n35 : unsigned(17 downto 0);signal n36 : unsigned(35 downto 0);signal n37 : unsigned(35 downto 0) := "000000000000000000000000000000000000";beginprocess (clock_c) begin if rising_edge(clock_c) then if i5 = "1" then n1 <= "000000000000000000000000000000000000"; elsif i4 = "1" then n1 <= i1; end if; end if;end process;n2 <= n1(35 downto 35) & n1(34 downto 34) & n1(33 downto 33) & n1(32 downto 32) & n1(31 downto 31) & n1(30 downto 30) & n1(29 downto 29) & n1(28 downto 28) & n1(27 downto 27) & n1(26 downto 26) & n1(25 downto 25) & n1(24 downto 24) & n1(23 downto 23) & n1(22 downto 22) & n1(21 downto 21) & n1(20 downto 20) & n1(19 downto 19) & n1(18 downto 18);n3 <= n1(17 downto 17) & n1(16 downto 16) & n1(15 downto 15) & n1(14 downto 14) & n1(13 downto 13) & n1(12 downto 12) & n1(11 downto 11) & n1(10 downto 10) & n1(9 downto 9) & n1(8 downto 8) & n1(7 downto 7) & n1(6 downto 6) & n1(5 downto 5) & n1(4 downto 4) & n1(3 downto 3) & n1(2 downto 2) & n1(1 downto 1) & n1(0 downto 0);process (clock_c) begin if rising_edge(clock_c) then if i5 = "1" then n4 <= "000000000000000000000000000000000000"; elsif i4 = "1" then n4 <= i2; end if; end if;end process;n5 <= n4(35 downto 35) & n4(34 downto 34) & n4(33 downto 33) & n4(32 downto 32) & n4(31 downto 31) & n4(30 downto 30) & n4(29 downto 29) & n4(28 downto 28) & n4(27 downto 27) & n4(26 downto 26) & n4(25 downto 25) & n4(24 downto 24) & n4(23 downto 23) & n4(22 downto 22) & n4(21 downto 21) & n4(20 downto 20) & n4(19 downto 19) & n4(18 downto 18);n6 <= n4(17 downto 17) & n4(16 downto 16) & n4(15 downto 15) & n4(14 downto 14) & n4(13 downto 13) & n4(12 downto 12) & n4(11 downto 11) & n4(10 downto 10) & n4(9 downto 9) & n4(8 downto 8) & n4(7 downto 7) & n4(6 downto 6) & n4(5 downto 5) & n4(4 downto 4) & n4(3 downto 3) & n4(2 downto 2) & n4(1 downto 1) & n4(0 downto 0);process (clock_c) begin if rising_edge(clock_c) then if i5 = "1" then n7 <= "000000000000000000"; elsif i4 = "1" then n7 <= n2; end if; end if;end process;process (clock_c) begin if rising_edge(clock_c) then if i5 = "1" then n8 <= "000000000000000000"; elsif i4 = "1" then n8 <= n7; end if; end if;end process;process (clock_c) begin if rising_edge(clock_c) then if i5 = "1" then n9 <= "000000000000000000"; elsif i4 = "1" then n9 <= n3; end if; end if;end process;process (clock_c) begin if rising_edge(clock_c) then if i5 = "1" then n10 <= "000000000000000000"; elsif i4 = "1" then n10 <= n9; end if; end if;end process;process (clock_c) begin if rising_edge(clock_c) then if i4 = "1" then case i3 is when "00" => n11 <= "011111111111111111000000000000000000"; when "01" => n11 <= "010110101000001001101001010111110110"; when "10" => n11 <= "000000000000000000100000000000000000"; when "11" => n11 <= "101001010111110110101001010111110110"; when others => n11 <= "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"; end case; end if; end if;end process;n12 <= n11(35 downto 35) & n11(34 downto 34) & n11(33 downto 33) & n11(32 downto 32) & n11(31 downto 31) & n11(30 downto 30) & n11(29 downto 29) & n11(28 downto 28) & n11(27 downto 27) & n11(26 downto 26) & n11(25 downto 25) & n11(24 downto 24) & n11(23 downto 23) & n11(22 downto 22) & n11(21 downto 21) & n11(20 downto 20) & n11(19 downto 19) & n11(18 downto 18);n13 <= n11(17 downto 17) & n11(16 downto 16) & n11(15 downto 15) & n11(14 downto 14) & n11(13 downto 13) & n11(12 downto 12) & n11(11 downto 11) & n11(10 downto 10) & n11(9 downto 9) & n11(8 downto 8) & n11(7 downto 7) & n11(6 downto 6) & n11(5 downto 5) & n11(4 downto 4) & n11(3 downto 3) & n11(2 downto 2) & n11(1 downto 1) & n11(0 downto 0);n14 <= unsigned(signed(n5) * signed(n12));n15 <= n14(34 downto 34) & n14(33 downto 33) & n14(32 downto 32) & n14(31 downto 31) & n14(30 downto 30) & n14(29 downto 29) & n14(28 downto 28) & n14(27 downto 27) & n14(26 downto 26) & n14(25 downto 25) & n14(24 downto 24) & n14(23 downto 23) & n14(22 downto 22) & n14(21 downto 21) & n14(20 downto 20) & n14(19 downto 19) & n14(18 downto 18) & n14(17 downto 17);process (clock_c) begin if rising_edge(clock_c) then if i5 = "1" then n16 <= "000000000000000000"; elsif i4 = "1" then n16 <= n15; end if; end if;end process;n17 <= unsigned(signed(n6) * signed(n13));n18 <= n17(34 downto 34) & n17(33 downto 33) & n17(32 downto 32) & n17(31 downto 31) & n17(30 downto 30) & n17(29 downto 29) & n17(28 downto 28) & n17(27 downto 27) & n17(26 downto 26) & n17(25 downto 25) & n17(24 downto 24) & n17(23 downto 23) & n17(22 downto 22) & n17(21 downto 21) & n17(20 downto 20) & n17(19 downto 19) & n17(18 downto 18) & n17(17 downto 17);process (clock_c) begin if rising_edge(clock_c) then if i5 = "1" then n19 <= "000000000000000000"; elsif i4 = "1" then n19 <= n18; end if; end if;end process;n20 <= n16 - n19;process (clock_c) begin if rising_edge(clock_c) then if i5 = "1" then n21 <= "000000000000000000"; elsif i4 = "1" then n21 <= n20; end if; end if;end process;n22 <= unsigned(signed(n5) * signed(n13));n23 <= n22(34 downto 34) & n22(33 downto 33) & n22(32 downto 32) & n22(31 downto 31) & n22(30 downto 30) & n22(29 downto 29) & n22(28 downto 28) & n22(27 downto 27) & n22(26 downto 26) & n22(25 downto 25) & n22(24 downto 24) & n22(23 downto 23) & n22(22 downto 22) & n22(21 downto 21) & n22(20 downto 20) & n22(19 downto 19) & n22(18 downto 18) & n22(17 downto 17);process (clock_c) begin if rising_edge(clock_c) then if i5 = "1" then n24 <= "000000000000000000"; elsif i4 = "1" then n24 <= n23; end if; end if;end process;n25 <= unsigned(signed(n6) * signed(n12));n26 <= n25(34 downto 34) & n25(33 downto 33) & n25(32 downto 32) & n25(31 downto 31) & n25(30 downto 30) & n25(29 downto 29) & n25(28 downto 28) & n25(27 downto 27) & n25(26 downto 26) & n25(25 downto 25) & n25(24 downto 24) & n25(23 downto 23) & n25(22 downto 22) & n25(21 downto 21) & n25(20 downto 20) & n25(19 downto 19) & n25(18 downto 18) & n25(17 downto 17);process (clock_c) begin if rising_edge(clock_c) then
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -