Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
H
HDL
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Jira
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
RTSD
HDL
Commits
163c7bac
Commit
163c7bac
authored
10 years ago
by
Pepping
Browse files
Options
Downloads
Patches
Plain Diff
- Implemented rd_interval parameter
- Revised the s_wait_rd state.
parent
7880b577
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
libraries/base/reorder/src/vhdl/reorder_sequencer.vhd
+34
-35
34 additions, 35 deletions
libraries/base/reorder/src/vhdl/reorder_sequencer.vhd
with
34 additions
and
35 deletions
libraries/base/reorder/src/vhdl/reorder_sequencer.vhd
+
34
−
35
View file @
163c7bac
...
@@ -33,6 +33,7 @@
...
@@ -33,6 +33,7 @@
-- - wr_nof_chunks is the number of write accesses performed during a write period
-- - 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_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
-- - 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
-- - 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.
-- 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
-- - nof_blocks determines the number of write and read periods before the page
...
@@ -44,6 +45,7 @@
...
@@ -44,6 +45,7 @@
-- wr_nof_chunks : POSITIVE := 1;
-- wr_nof_chunks : POSITIVE := 1;
-- rd_chunksize : POSITIVE := 4;
-- rd_chunksize : POSITIVE := 4;
-- rd_nof_chunks : POSITIVE := 2;
-- rd_nof_chunks : POSITIVE := 2;
-- rd_interval : POSITIVE := 2;
-- gapsize : NATURAL := 0;
-- gapsize : NATURAL := 0;
-- nof_blocks : POSITIVE := 5;
-- nof_blocks : POSITIVE := 5;
...
@@ -55,27 +57,27 @@
...
@@ -55,27 +57,27 @@
-- -------- --------
-- -------- --------
-- gapsize | | | |
-- gapsize | | | |
-- -------- --------
-- -------- --------
-- |1 | |
0
,1 |
-- |1 | |
1
,1 |
-- | | --------
-- | | --------
-- | | |
3
,0 |
-- | | |
4
,0 |
-- -------- --------
-- -------- --------
-- | | | |
-- | | | |
-- -------- --------
-- -------- --------
-- |2 | |
1,0
|
-- |2 | |
0,1
|
-- | | --------
-- | | --------
-- | | |3,
1
|
-- | | |3,
0
|
-- -------- --------
-- -------- --------
-- | | | |
-- | | | |
-- -------- --------
-- -------- --------
-- |3 | |
1,1
|
-- |3 | |
2,0
|
-- | | --------
-- | | --------
-- | | |4,
0
|
-- | | |4,
1
|
-- -------- --------
-- -------- --------
-- | | | |
-- | | | |
-- -------- --------
-- -------- --------
-- |4 | |
2
,0 |
-- |4 | |
1
,0 |
-- | | --------
-- | | --------
-- | | |
4
,1 |
-- | | |
3
,1 |
-- -------- --------
-- -------- --------
-- | | | |
-- | | | |
-- -------- --------
-- -------- --------
...
@@ -119,6 +121,7 @@ ARCHITECTURE rtl OF reorder_sequencer IS
...
@@ -119,6 +121,7 @@ ARCHITECTURE rtl OF reorder_sequencer IS
CONSTANT
c_blocksize
:
POSITIVE
:
=
g_reorder_seq
.
wr_nof_chunks
*
(
g_reorder_seq
.
wr_chunksize
+
g_reorder_seq
.
gapsize
);
CONSTANT
c_blocksize
:
POSITIVE
:
=
g_reorder_seq
.
wr_nof_chunks
*
(
g_reorder_seq
.
wr_chunksize
+
g_reorder_seq
.
gapsize
);
CONSTANT
c_page_size
:
POSITIVE
:
=
c_blocksize
*
g_reorder_seq
.
nof_blocks
;
CONSTANT
c_page_size
:
POSITIVE
:
=
c_blocksize
*
g_reorder_seq
.
nof_blocks
;
CONSTANT
c_rd_block_increment
:
POSITIVE
:
=
c_blocksize
*
g_reorder_seq
.
rd_interval
;
CONSTANT
c_nof_wr_access
:
POSITIVE
:
=
g_reorder_seq
.
wr_nof_chunks
*
g_reorder_seq
.
nof_blocks
;
CONSTANT
c_nof_wr_access
:
POSITIVE
:
=
g_reorder_seq
.
wr_nof_chunks
*
g_reorder_seq
.
nof_blocks
;
CONSTANT
c_address_w
:
POSITIVE
:
=
ceil_log2
(
2
*
c_page_size
);
CONSTANT
c_address_w
:
POSITIVE
:
=
ceil_log2
(
2
*
c_page_size
);
CONSTANT
c_address_shift_w
:
POSITIVE
:
=
ceil_log2
(
g_data_w_ratio
);
CONSTANT
c_address_shift_w
:
POSITIVE
:
=
ceil_log2
(
g_data_w_ratio
);
...
@@ -224,35 +227,31 @@ BEGIN
...
@@ -224,35 +227,31 @@ BEGIN
END
IF
;
END
IF
;
WHEN
s_wait_rd
=>
WHEN
s_wait_rd
=>
IF
(
r
.
switch_cnt
=
g_reorder_seq
.
rd_nof_chunks
)
THEN
v
.
switch_cnt
:
=
0
;
v
.
rd_block_offset
:
=
(
r
.
rd_block_offset
+
c_rd_block_increment
)
MOD
c_page_size
;
v
.
state
:
=
s_write
;
IF
(
r
.
rd_block_offset
+
c_rd_block_increment
>=
c_page_size
)
THEN
v
.
rd_chunks_offset
:
=
r
.
rd_chunks_offset
+
g_reorder_seq
.
rd_chunksize
;
v
.
rd_chunks_cnt
:
=
r
.
rd_chunks_cnt
+
1
;
ELSE
ELSE
v
.
state
:
=
s_read
;
v
.
rd_block_cnt
:
=
r
.
rd_block_cnt
+
1
;
END
IF
;
END
IF
;
IF
(
r
.
rd_block_cnt
=
g_reorder_seq
.
nof_blocks
-1
AND
r
.
rd_chunks_cnt
=
g_reorder_seq
.
rd_nof_chunks
-1
)
THEN
IF
(
r
.
switch_cnt
=
g_reorder_seq
.
rd_nof_chunks
)
THEN
v
.
rd_block_offset
:
=
0
;
v
.
switch_cnt
:
=
0
;
v
.
rd_chunks_offset
:
=
0
;
v
.
state
:
=
s_write
;
v
.
rd_block_cnt
:
=
0
;
v
.
rd_chunks_cnt
:
=
0
;
IF
(
r
.
page_cnt
=
c_nof_wr_access
)
THEN
IF
(
r
.
page_cnt
=
c_nof_wr_access
)
THEN
v
.
rd_page_offset
:
=
r
.
wr_page_offset
;
v
.
rd_page_offset
:
=
r
.
wr_page_offset
;
v
.
wr_page_offset
:
=
r
.
rd_page_offset
;
v
.
wr_page_offset
:
=
r
.
rd_page_offset
;
v
.
page_cnt
:
=
0
;
v
.
page_cnt
:
=
0
;
v
.
first_write
:
=
'0'
;
v
.
first_write
:
=
'0'
;
-- IF(sync_ok_in = '0') THEN
-- v.state := s_idle;
-- END IF;
END
IF
;
ELSIF
(
r
.
rd_block_cnt
=
g_reorder_seq
.
nof_blocks
-1
)
THEN
v
.
rd_block_offset
:
=
0
;
v
.
rd_block_offset
:
=
0
;
v
.
rd_chunks_offset
:
=
r
.
rd_chunks_offset
+
g_reorder_seq
.
rd_chunksize
;
v
.
rd_chunks_offset
:
=
0
;
v
.
rd_block_cnt
:
=
0
;
v
.
rd_block_cnt
:
=
0
;
v
.
rd_chunks_cnt
:
=
r
.
rd_chunks_cnt
+
1
;
v
.
rd_chunks_cnt
:
=
0
;
END
IF
;
ELSE
ELSE
v
.
rd_block_offset
:
=
r
.
rd_block_offset
+
c_blocksize
;
v
.
state
:
=
s_read
;
v
.
rd_block_cnt
:
=
r
.
rd_block_cnt
+
1
;
END
IF
;
END
IF
;
WHEN
OTHERS
=>
WHEN
OTHERS
=>
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment