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
64fa9dc1
Commit
64fa9dc1
authored
1 month ago
by
Eric Kooistra
Browse files
Options
Downloads
Patches
Plain Diff
Avoid using same address for wr_adr_b as for wr_adr_a.
parent
0fd1547d
No related branches found
No related tags found
No related merge requests found
Pipeline
#114484
passed
1 month ago
Stage: linting
Changes
2
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
libraries/base/common/src/vhdl/common_paged_ram_w_rr.vhd
+14
-0
14 additions, 0 deletions
libraries/base/common/src/vhdl/common_paged_ram_w_rr.vhd
libraries/base/common/tb/vhdl/tb_tb_common_paged_ram_ww_rr.vhd
+4
-1
4 additions, 1 deletion
...ries/base/common/tb/vhdl/tb_tb_common_paged_ram_ww_rr.vhd
with
18 additions
and
1 deletion
libraries/base/common/src/vhdl/common_paged_ram_w_rr.vhd
+
14
−
0
View file @
64fa9dc1
...
...
@@ -19,6 +19,7 @@
--
-------------------------------------------------------------------------------
-- Author: E. Kooistra
-- Purpose: Dual page memory with single wr in one page and dual rd in other page
-- Description:
-- When next_page pulses then the next access will occur in the other page.
...
...
@@ -63,7 +64,19 @@ entity common_paged_ram_w_rr is
end
common_paged_ram_w_rr
;
architecture
str
of
common_paged_ram_w_rr
is
signal
wr_adr_b
:
std_logic_vector
(
wr_adr
'range
);
begin
-- Make used wr_adr_b for page b always differ from wr_adr for port a, to avoid read and write at same address,
-- which would yield undefined data result in simulation (and maybe also on HW even though wr_en_b = '0') when
-- block RAM mixed_port_feed_through_mode = DONT_CARE.
p_wr_adr_b
:
process
(
wr_adr
)
begin
wr_adr_b
<=
(
others
=>
'0'
);
if
to_uint
(
wr_adr
)
=
0
then
wr_adr_b
(
0
)
<=
'1'
;
end
if
;
end
process
;
u_ww_rr
:
entity
work
.
common_paged_ram_ww_rr
generic
map
(
g_technology
=>
g_technology
,
...
...
@@ -83,6 +96,7 @@ begin
wr_adr_a
=>
wr_adr
,
wr_en_a
=>
wr_en
,
wr_dat_a
=>
wr_dat
,
wr_adr_b
=>
wr_adr_b
,
-- double read access from the other one page
rd_adr_a
=>
rd_adr_a
,
rd_en_a
=>
rd_en_a
,
...
...
This diff is collapsed.
Click to expand it.
libraries/base/common/tb/vhdl/tb_tb_common_paged_ram_ww_rr.vhd
+
4
−
1
View file @
64fa9dc1
...
...
@@ -38,7 +38,10 @@ begin
-- g_pipeline_out : NATURAL := 0; -- >= 0
-- g_page_sz : NATURAL := 10 -- >= 1
u_1
:
entity
work
.
tb_common_paged_ram_ww_rr
generic
map
(
0
,
0
,
1
);
-- Cannot support g_page_sz = 1, when block RAM mixed_port_feed_through_mode = DONT_CARE, because with only one
-- word the adr_a cannot be different from adr_b. Using g_page_sz = 1 is an extreme corner case, because the
-- RAM only has one word, so acts as a register.
--u_1 : entity work.tb_common_paged_ram_ww_rr generic map (0, 0, 1);
u_2
:
entity
work
.
tb_common_paged_ram_ww_rr
generic
map
(
0
,
0
,
2
);
u_8
:
entity
work
.
tb_common_paged_ram_ww_rr
generic
map
(
0
,
0
,
8
);
...
...
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