Select Git revision
Code owners
Assign users and groups as approvers for specific file changes. Learn more.
reorder_transpose.vhd 20.16 KiB
--------------------------------------------------------------------------------
--
-- Copyright (C) 2011
-- ASTRON (Netherlands Institute for Radio Astronomy) <http://www.astron.nl/>
-- JIVE (Joint Institute for VLBI in Europe) <http://www.jive.nl/>
-- P.O.Box 2, 7990 AA Dwingeloo, The Netherlands
--
-- This program is free software: you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by
-- the Free Software Foundation, either version 3 of the License, or
-- (at your option) any later version.
--
-- This program is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-- GNU General Public License for more details.
--
-- You should have received a copy of the GNU General Public License
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
--
--------------------------------------------------------------------------------
-- Purpose: Performing a transpose (reordering data) on one or more streaming
-- inputs using external memory.
--
-- Description:
-- The input of multiple streams (g_nof_streams) is concatenated into a
-- single stream. Either the data field or the complex fields can be
-- used, based on the g_use_complex generic.
--
-- Data on this single stream is than transposed according to the settings
-- of g_frame_size_in and g_reorder_seq.
-- The actual transpose is divided in two stages. The first stage (pre_transpose)
-- is done using a subband select module (reorder_col in RadioHDL).
-- The second stage is done in external memory (DDR3, DDR4,...).
--
-- Stage 1: Pre Transpose
-- This stage is used to reorder data with a resolution as high as a single
-- sample, because the second stage (if using DDR3 for instance) has a resolution
-- of 16 or more samples. The ss_ss_transp mm interface can be used to specify
-- the desired reordering for the pre transpose.
--
-- Stage 2: Reorder Sequencer
-- After the pre transpose the data is send to the external memory
-- interface (to_mem_src_out). The reorder sequencer module provides the address
-- and control signals for the external memory. Writing and reading is done in a
-- alternating way. Data from the external memory is received via the
-- from_mem_snk_in interface. The sequencers rhythm is based on the settings of
-- the g_reorder_seq generic.
--
-- At the output the data from the single stream is split up in the original
-- g_nof_streams again. A block_gen module is used to generate the SYNC, SOP and EOP
-- signals.
--
-- SYNC and BSN
-- At the input the BSN number at every SYNC is written to a fifo. This BSN number
-- is inserted in the output data again when a SYNC is applied at the output.
--
-- SYNC Period
-- The SYNC period (the number of blocks per sync interval) is monitored with a counter.
-- In case the number of blocks within a syncperiod is not equal to the specified
-- g_reorder_seq.nof_blocks the sequencer will reset and start again when the number of
-- received blocksdoes match the g_reorder_seq.nof_blocks.
--
-- Complex or real data:
-- The the width of snk_in.data, re, im is g_in_dat_w. When g_use_complex = FALSE then
-- snk_in.data is passed on internally, so then the internal sosi.data width is also
-- g_in_dat_w. When g_use_complex = TRUE then snk_in.im and snk_in.re are concatenated
-- into an internal sosi.data that has then width 2*g_in_dat_w. The g_nof_streams are
-- also concatenated into the sosi.data.