From e2e0c7abf215c9e14f4bfc8002e627a5059b79d3 Mon Sep 17 00:00:00 2001
From: Pepping <pepping>
Date: Tue, 20 Jan 2015 13:43:59 +0000
Subject: [PATCH] Added top comments

---
 .../reorder/src/vhdl/reorder_sequencer.vhd    | 70 +++++++++++++++++++
 1 file changed, 70 insertions(+)

diff --git a/libraries/base/reorder/src/vhdl/reorder_sequencer.vhd b/libraries/base/reorder/src/vhdl/reorder_sequencer.vhd
index c6dfcbcf75..cd39debba6 100644
--- a/libraries/base/reorder/src/vhdl/reorder_sequencer.vhd
+++ b/libraries/base/reorder/src/vhdl/reorder_sequencer.vhd
@@ -17,6 +17,76 @@
 -- 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: Providing address and control signals for external memory realizing a
+--          reordering of the data. Based on alternating read and writes. 
+--
+--
+-- Description: The values of generic g_reorder_seq determine the rhythm of the 
+--              sequencer. The sequencer is based on the use of a dualpage memory.
+--              While data is written in page 0, page 1 is read. The state machine 
+--              alternated between reads and writes: read periods and write periods.
+--              The number of accesses in a read and wrte period is determined by the 
+--              values of the generic.
+--              The generics are interpreted as follows: 
+--
+--              - wr_chunksize is the number of samples that are written during a write access.
+--              - wr_nof_chunks is the number of write accesses performed during a write period
+--              - rd_chunksize is the number of samples that are read during a read access.
+--              - rd_nof_chunks is the number of read accesses performed during a read period
+--              - gapsize is the address space to be skipped in between two consecutive write or
+--                read periods. Gapsize can be used to create byte-alignment in the memory.
+--              - nof_blocks determines the number of write and read periods before the page 
+--                swap takes place. 
+--               
+--              The example shows the following configuration: 
+--
+--              wr_chunksize    : POSITIVE := 8
+--              wr_nof_chunks   : POSITIVE := 1;              
+--              rd_chunksize    : POSITIVE := 4;  
+--              rd_nof_chunks   : POSITIVE := 2;              
+--              gapsize         : NATURAL  := 0;              
+--              nof_blocks      : POSITIVE := 5;              
+
+--                    WR             RD    
+--                 --------       --------
+--                 |0     |       |0,0   |   rd_chunksize  
+--   wr_chunksize  |      |       --------
+--                 |      |       |2,1   |
+--                 --------       --------
+--        gapsize  |      |       |      |
+--                 --------       --------
+--                 |1     |       |0,1   |
+--                 |      |       --------
+--                 |      |       |3,0   |
+--                 --------       --------
+--                 |      |       |      |
+--                 --------       --------
+--                 |2     |       |1,0   |  
+--                 |      |       --------
+--                 |      |       |3,1   |
+--                 --------       --------
+--                 |      |       |      |
+--                 --------       --------
+--                 |3     |       |1,1   |
+--                 |      |       --------
+--                 |      |       |4,0   |
+--                 --------       --------
+--                 |      |       |      |
+--                 --------       -------- 
+--                 |4     |       |2,0   | 
+--                 |      |       -------- 
+--                 |      |       |4,1   | 
+--                 --------       -------- 
+--                 |      |       |      | 
+--                 --------       -------- 
+--                  page 0         page 1
+--            
+--              The index in the write page indicate the write period(0-4)
+--              The first index in the read page indicates the read period(0-4)
+--              The second index in the read page indicates the chunknumber(0-1)
+--
+-- Remarks:
+
 
 LIBRARY IEEE, common_lib;
 USE IEEE.STD_LOGIC_1164.ALL;
-- 
GitLab