Line 30... |
Line 30... |
-- The size of the dual page memory is determined by g_nof_points.
|
-- The size of the dual page memory is determined by g_nof_points.
|
--
|
--
|
-- Remarks: . This unit is only suitable for the pipelined fft (fft_r2_pipe).
|
-- Remarks: . This unit is only suitable for the pipelined fft (fft_r2_pipe).
|
--
|
--
|
|
|
library ieee, common_pkg_lib, common_counter_lib, common_ram_lib;
|
library ieee, common_pkg_lib, astron_counter_lib, astron_ram_lib;
|
use IEEE.std_logic_1164.all;
|
use IEEE.std_logic_1164.all;
|
use IEEE.numeric_std.all;
|
use IEEE.numeric_std.all;
|
use common_pkg_lib.common_pkg.all;
|
use common_pkg_lib.common_pkg.all;
|
use work.fft_pkg.all;
|
use work.fft_pkg.all;
|
|
|
Line 147... |
Line 147... |
gen_bit_flip_spectrum_only : if g_dont_flip_channels=true generate -- the channel interleaving in time is preserved
|
gen_bit_flip_spectrum_only : if g_dont_flip_channels=true generate -- the channel interleaving in time is preserved
|
wr_adr <= adr_fft_flip & adr_chan_cnt;
|
wr_adr <= adr_fft_flip & adr_chan_cnt;
|
end generate;
|
end generate;
|
end generate;
|
end generate;
|
|
|
u_adr_point_cnt : entity common_counter_lib.common_counter
|
u_adr_point_cnt : entity astron_counter_lib.common_counter
|
generic map(
|
generic map(
|
g_latency => 1,
|
g_latency => 1,
|
g_init => 0,
|
g_init => 0,
|
g_width => ceil_log2(g_nof_points)
|
g_width => ceil_log2(g_nof_points)
|
)
|
)
|
Line 168... |
Line 168... |
end generate;
|
end generate;
|
more_chan : if c_nof_channels>1 generate
|
more_chan : if c_nof_channels>1 generate
|
cnt_ena <= '1' when in_val = '1' and TO_UINT(adr_chan_cnt) = c_nof_channels-1 else '0';
|
cnt_ena <= '1' when in_val = '1' and TO_UINT(adr_chan_cnt) = c_nof_channels-1 else '0';
|
end generate;
|
end generate;
|
|
|
u_adr_chan_cnt : entity common_counter_lib.common_counter
|
u_adr_chan_cnt : entity astron_counter_lib.common_counter
|
generic map(
|
generic map(
|
g_latency => 1,
|
g_latency => 1,
|
g_init => 0,
|
g_init => 0,
|
g_width => g_nof_chan
|
g_width => g_nof_chan
|
)
|
)
|
Line 181... |
Line 181... |
clk => clk,
|
clk => clk,
|
cnt_en => in_val,
|
cnt_en => in_val,
|
count => adr_chan_cnt
|
count => adr_chan_cnt
|
);
|
);
|
|
|
u_buff : entity common_ram_lib.common_paged_ram_r_w
|
u_buff : entity astron_ram_lib.common_paged_ram_r_w
|
generic map (
|
generic map (
|
g_str => "use_adr",
|
g_str => "use_adr",
|
g_data_w => c_dat_w,
|
g_data_w => c_dat_w,
|
g_nof_pages => 2,
|
g_nof_pages => 2,
|
g_page_sz => c_page_size,
|
g_page_sz => c_page_size,
|