Skip to content
Snippets Groups Projects
Commit a29e6124 authored by Pepping's avatar Pepping
Browse files

UPdated comments and added ASSERTS

parent 9ed58bc4
No related branches found
No related tags found
No related merge requests found
......@@ -25,8 +25,8 @@
-- 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 number of accesses in a read and write period is determined by the
-- values of the generics.
-- The generics are interpreted as addresses in the sosi clock-domain. If the
-- datarate and/or the datawidth of the memory interface is higher than the
-- sosi domain than the g_data_w_ratio generic can be used to specify the
......@@ -42,56 +42,86 @@
--
-- - wr_chunksize is the number of samples that are written during a write access.
-- A write access always consists of 1 access.
-- - rd_chunksize is the number of samples that are read during a read access.
-- - rd_chunksize is the number of samples that are read during a read access.(multiple read accesses can be perfromed during a read period!!!!)
-- - rd_nof_chunks is the number of read accesses performed during a read period
-- - rd_interval defines the number of blocks in between two consecutive reads.
-- - 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. Note that this number should be a multiple of rd_chunksize.
-- Generally these number of blocks define a sync period.
--
-- The example shows the following configuration:
--
-- g_data_w_ratio = 1
-- wr_chunksize : POSITIVE := 8
-- rd_chunksize : POSITIVE := 4;
-- rd_nof_chunks : POSITIVE := 2;
-- rd_interval : POSITIVE := 2;
-- gapsize : NATURAL := 0;
-- nof_blocks : POSITIVE := 5;
-- nof_blocks : POSITIVE := 8;
--
-- The two columns represents the pages of the dual paged memory. The first column
-- is written, while the second column is read. After the first chunk is written(0)
-- to the write-page, the chunks (0,0) and (0,1) are read from the read-page. Then
-- the second chunk (1) is written and after that chunks (1,0) and (1,1) are read.
--
-- The wr_chunk_index and rd_chunk_index indicate in which order the chunks are
-- written and read. Note that we read twice as much chunks as that we write. That
-- is because the read chunks are smaller than the write chunks.
--
-- wr rd
-- chunk chunk
-- WR RD index index
-- -------- --------
-- |0 | |0,0 | rd_chunksize 0 0
-- wr_chunksize | | --------
-- | | |2,1 | rd_chunksize 5
-- | | |2,0 | rd_chunksize 4
-- -------- --------
-- gapsize | | | | gapsize
-- -------- --------
-- |1 | |1,1 | 1 3
-- |1 | |4,0 | 1 8
-- | | --------
-- | | |4,0 | 8
-- | | |6,0 | 12
-- -------- --------
-- | | | |
-- -------- --------
-- |2 | |0,1 | 2 1
-- | | --------
-- | | |3,0 | 6
-- | | |2,1 | 5
-- -------- --------
-- | | | |
-- -------- --------
-- |3 | |2,0 | 3 4
-- |3 | |4,1 | 3 9
-- | | --------
-- | | |4,1 | 9
-- | | |6,1 | 13
-- -------- --------
-- | | | |
-- -------- --------
-- |4 | |1,0 | 4 2
-- | | --------
-- | | |3,0 | 6
-- -------- --------
-- | | | |
-- -------- --------
-- |5 | |5,0 | 5 10
-- | | --------
-- | | |7,0 | 14
-- -------- --------
-- | | | |
-- -------- --------
-- |6 | |1,1 | 6 3
-- | | --------
-- | | |3,1 | 7
-- -------- --------
-- | | | |
-- -------- --------
-- |7 | |5,1 | 7 11
-- | | --------
-- | | |7,1 | 15
-- -------- --------
-- | | | |
-- -------- --------
-- page 0 page 1
--
-- Alternately after every single write access of wr_chunksize to one page there are rd_nof_chunks read accesses of rd_chunksize to the other page.
......@@ -110,6 +140,7 @@
-- rd_chunksize, rd_nof_chunks, gapsize and nof_blocks are divisible by g_data_w_ratio.
-- 2) wr_chunksize = rd_chunksize*rd_nof_chunks, so write one big chunk and read small chunks.
-- It is not supported to write small chunks and read one big chunk.
-- 3) Also be sure that nof_blocks is larger than or equal to rd_chunksize
LIBRARY IEEE, common_lib;
......@@ -177,6 +208,11 @@ BEGIN
-- CHECK IF PROVIDED GENERICS ARE ALLOWED.
---------------------------------------------------------------
ASSERT g_reorder_seq.wr_chunksize = g_reorder_seq.rd_nof_chunks*g_reorder_seq.rd_chunksize REPORT "Total write configuration is different from total read configuration!!!" SEVERITY FAILURE;
ASSERT g_reorder_seq.nof_blocks >= g_reorder_seq.rd_chunksize REPORT "The nof_blocks must be larger than or equal to the rd_chunksize!!!" SEVERITY FAILURE;
ASSERT g_reorder_seq.wr_chunksize REM g_data_w_ratio = 0 REPORT "The wr_chunksize must divisible by the g_data_w_ratio!!!" SEVERITY FAILURE;
ASSERT g_reorder_seq.rd_chunksize REM g_data_w_ratio = 0 REPORT "The rd_chunksize must divisible by the g_data_w_ratio!!!" SEVERITY FAILURE;
ASSERT g_reorder_seq.gapsize REM g_data_w_ratio = 0 REPORT "The gapsize must divisible by the g_data_w_ratio!!!" SEVERITY FAILURE;
ASSERT g_reorder_seq.nof_blocks REM g_data_w_ratio = 0 REPORT "The nof_blocks must divisible by the g_data_w_ratio!!!" SEVERITY FAILURE;
p_comb : PROCESS(r, dp_rst, done)
VARIABLE v : reg_type;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment