Line 25... |
Line 25... |
--
|
--
|
--
|
--
|
-- Remarks:
|
-- Remarks:
|
--
|
--
|
|
|
library ieee, common_pkg_lib, common_components_lib, common_requantize_lib, rTwoSDF_lib;
|
library ieee, common_pkg_lib, common_components_lib, astron_requantize_lib, astron_r2sdf_fft_lib;
|
use IEEE.std_logic_1164.all;
|
use IEEE.std_logic_1164.all;
|
use common_pkg_lib.common_pkg.all;
|
use common_pkg_lib.common_pkg.all;
|
use common_pkg_lib.common_str_pkg.all;
|
use common_pkg_lib.common_str_pkg.all;
|
use rTwoSDF_lib.twiddlesPkg.all;
|
use astron_r2sdf_fft_lib.twiddlesPkg.all;
|
use rTwoSDF_lib.rTwoSDFPkg.all;
|
use astron_r2sdf_fft_lib.rTwoSDFPkg.all;
|
use work.fft_pkg.all;
|
use work.fft_pkg.all;
|
|
|
entity fft_r2_bf_par is
|
entity fft_r2_bf_par is
|
generic (
|
generic (
|
g_stage : natural := 3;
|
g_stage : natural := 3;
|
g_element : natural := 1;
|
g_element : natural := 1;
|
g_scale_enable : boolean := TRUE;
|
g_scale_enable : boolean := TRUE;
|
-- internal pipeline settings
|
-- internal pipeline settings
|
g_pipeline : t_fft_pipeline := c_fft_pipeline -- defined in rTwoSDF_lib.rTwoSDFPkg
|
g_pipeline : t_fft_pipeline := c_fft_pipeline -- defined in astron_r2sdf_fft_lib.rTwoSDFPkg
|
);
|
);
|
port (
|
port (
|
clk : in std_logic;
|
clk : in std_logic;
|
rst : in std_logic;
|
rst : in std_logic;
|
x_in_re : in std_logic_vector;
|
x_in_re : in std_logic_vector;
|
Line 100... |
Line 100... |
begin
|
begin
|
|
|
------------------------------------------------------------------------------
|
------------------------------------------------------------------------------
|
-- complex butterfly
|
-- complex butterfly
|
------------------------------------------------------------------------------
|
------------------------------------------------------------------------------
|
u_bf_re : entity rTwoSDF_lib.rTwoBF
|
u_bf_re : entity astron_r2sdf_fft_lib.rTwoBF
|
generic map (
|
generic map (
|
g_in_a_zdly => c_bf_in_a_zdly,
|
g_in_a_zdly => c_bf_in_a_zdly,
|
g_out_d_zdly => c_bf_out_b_zdly
|
g_out_d_zdly => c_bf_out_b_zdly
|
)
|
)
|
port map (
|
port map (
|
Line 115... |
Line 115... |
in_val => in_val,
|
in_val => in_val,
|
out_c => sum_re,
|
out_c => sum_re,
|
out_d => dif_re
|
out_d => dif_re
|
);
|
);
|
|
|
u_bf_im : entity rTwoSDF_lib.rTwoBF
|
u_bf_im : entity astron_r2sdf_fft_lib.rTwoBF
|
generic map (
|
generic map (
|
g_in_a_zdly => c_bf_in_a_zdly,
|
g_in_a_zdly => c_bf_in_a_zdly,
|
g_out_d_zdly => c_bf_out_b_zdly
|
g_out_d_zdly => c_bf_out_b_zdly
|
)
|
)
|
port map (
|
port map (
|
Line 133... |
Line 133... |
);
|
);
|
|
|
------------------------------------------------------------------------------
|
------------------------------------------------------------------------------
|
-- requantize x output
|
-- requantize x output
|
------------------------------------------------------------------------------
|
------------------------------------------------------------------------------
|
u_requantize_x_re : entity common_requantize_lib.common_requantize
|
u_requantize_x_re : entity astron_requantize_lib.common_requantize
|
generic map (
|
generic map (
|
g_representation => "SIGNED",
|
g_representation => "SIGNED",
|
g_lsb_w => c_stage_bit_growth,
|
g_lsb_w => c_stage_bit_growth,
|
g_lsb_round => TRUE,
|
g_lsb_round => TRUE,
|
g_lsb_round_clip => FALSE,
|
g_lsb_round_clip => FALSE,
|
Line 154... |
Line 154... |
in_dat => sum_re,
|
in_dat => sum_re,
|
out_dat => sum_quant_re,
|
out_dat => sum_quant_re,
|
out_ovr => open
|
out_ovr => open
|
);
|
);
|
|
|
u_requantize_x_im : entity common_requantize_lib.common_requantize
|
u_requantize_x_im : entity astron_requantize_lib.common_requantize
|
generic map (
|
generic map (
|
g_representation => "SIGNED",
|
g_representation => "SIGNED",
|
g_lsb_w => c_stage_bit_growth,
|
g_lsb_w => c_stage_bit_growth,
|
g_lsb_round => TRUE,
|
g_lsb_round => TRUE,
|
g_lsb_round_clip => FALSE,
|
g_lsb_round_clip => FALSE,
|
Line 239... |
Line 239... |
);
|
);
|
|
|
------------------------------------------------------------------------------
|
------------------------------------------------------------------------------
|
-- twiddle multiplication
|
-- twiddle multiplication
|
------------------------------------------------------------------------------
|
------------------------------------------------------------------------------
|
u_TwiddleMult: entity rTwoSDF_lib.rTwoWMul
|
u_TwiddleMult: entity astron_r2sdf_fft_lib.rTwoWMul
|
generic map (
|
generic map (
|
g_stage => g_stage,
|
g_stage => g_stage,
|
g_lat => g_pipeline.mul_lat
|
g_lat => g_pipeline.mul_lat
|
)
|
)
|
port map (
|
port map (
|
Line 266... |
Line 266... |
print_str("Parallel: [stage = " & integer'image(g_stage) & " [element = " & integer'image(g_element) & "] " & "[index = " & integer'image(wMap(g_element, g_stage)) & "] " );
|
print_str("Parallel: [stage = " & integer'image(g_stage) & " [element = " & integer'image(g_element) & "] " & "[index = " & integer'image(wMap(g_element, g_stage)) & "] " );
|
|
|
------------------------------------------------------------------------------
|
------------------------------------------------------------------------------
|
-- requantize y output
|
-- requantize y output
|
------------------------------------------------------------------------------
|
------------------------------------------------------------------------------
|
u_requantize_y_re : entity common_requantize_lib.common_requantize
|
u_requantize_y_re : entity astron_requantize_lib.common_requantize
|
generic map (
|
generic map (
|
g_representation => "SIGNED",
|
g_representation => "SIGNED",
|
g_lsb_w => c_stage_bit_growth,
|
g_lsb_w => c_stage_bit_growth,
|
g_lsb_round => TRUE,
|
g_lsb_round => TRUE,
|
g_lsb_round_clip => FALSE,
|
g_lsb_round_clip => FALSE,
|
Line 287... |
Line 287... |
in_dat => mul_out_re,
|
in_dat => mul_out_re,
|
out_dat => mul_quant_re,
|
out_dat => mul_quant_re,
|
out_ovr => open
|
out_ovr => open
|
);
|
);
|
|
|
u_requantize_y_im : entity common_requantize_lib.common_requantize
|
u_requantize_y_im : entity astron_requantize_lib.common_requantize
|
generic map (
|
generic map (
|
g_representation => "SIGNED",
|
g_representation => "SIGNED",
|
g_lsb_w => c_stage_bit_growth,
|
g_lsb_w => c_stage_bit_growth,
|
g_lsb_round => TRUE,
|
g_lsb_round => TRUE,
|
g_lsb_round_clip => FALSE,
|
g_lsb_round_clip => FALSE,
|