Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
Platform-independent core collection
Manage
Activity
Members
Labels
Plan
Issues
15
Issue boards
Milestones
Wiki
Code
Merge requests
5
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Projects
Platform-independent core collection
Commits
e3950a08
Commit
e3950a08
authored
6 years ago
by
Dimitris Lampridis
Browse files
Options
Downloads
Patches
Plain Diff
hdl: implement g_show ahead for async fifos
parent
c1eceba0
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
modules/genrams/common/inferred_async_fifo.vhd
+14
-4
14 additions, 4 deletions
modules/genrams/common/inferred_async_fifo.vhd
modules/genrams/common/inferred_async_fifo_dual_rst.vhd
+13
-3
13 additions, 3 deletions
modules/genrams/common/inferred_async_fifo_dual_rst.vhd
with
27 additions
and
7 deletions
modules/genrams/common/inferred_async_fifo.vhd
+
14
−
4
View file @
e3950a08
...
...
@@ -115,11 +115,12 @@ architecture syn of inferred_async_fifo is
end
record
;
type
t_mem_type
is
array
(
0
to
g_size
-1
)
of
std_logic_vector
(
g_data_width
-1
downto
0
);
signal
mem
:
t_mem_type
;
signal
mem
:
t_mem_type
:
=
(
others
=>
(
others
=>
'0'
))
;
signal
rcb
,
wcb
:
t_counter_block
;
signal
rd_ptr_muxed
:
t_counter
;
signal
full_int
,
empty_int
:
std_logic
;
signal
almost_full_int
,
almost_empty_int
:
std_logic
;
signal
going_full
:
std_logic
;
...
...
@@ -140,6 +141,15 @@ begin -- syn
rd_int
<=
rd_i
and
not
empty_int
;
we_int
<=
we_i
and
not
full_int
;
p_rd_ptr_mux
:
process
(
rcb
,
rd_int
)
begin
if
(
rd_int
=
'1'
and
g_show_ahead
)
then
rd_ptr_muxed
<=
rcb
.
bin_next
;
elsif
((
rd_int
=
'1'
and
not
g_show_ahead
)
or
(
g_show_ahead
))
then
rd_ptr_muxed
<=
rcb
.
bin
;
end
if
;
end
process
p_rd_ptr_mux
;
p_mem_write
:
process
(
clk_wr_i
)
begin
if
rising_edge
(
clk_wr_i
)
then
...
...
@@ -152,8 +162,8 @@ begin -- syn
p_mem_read
:
process
(
clk_rd_i
)
begin
if
rising_edge
(
clk_rd_i
)
then
if
(
rd_int
=
'1'
)
then
q_int
<=
mem
(
to_integer
(
unsigned
(
r
cb
.
bin
(
rcb
.
bin
'left
-1
downto
0
))));
if
(
rd_int
=
'1'
or
g_show_ahead
)
then
q_int
<=
mem
(
to_integer
(
unsigned
(
r
d_ptr_muxed
(
rd_ptr_muxed
'left
-1
downto
0
))));
end
if
;
end
if
;
end
process
;
...
...
This diff is collapsed.
Click to expand it.
modules/genrams/common/inferred_async_fifo_dual_rst.vhd
+
13
−
3
View file @
e3950a08
...
...
@@ -88,10 +88,11 @@ architecture syn of inferred_async_fifo_dual_rst is
end
record
;
type
t_mem_type
is
array
(
0
to
g_size
-1
)
of
std_logic_vector
(
g_data_width
-1
downto
0
);
signal
mem
:
t_mem_type
;
signal
mem
:
t_mem_type
:
=
(
others
=>
(
others
=>
'0'
))
;
signal
rcb
,
wcb
:
t_counter_block
;
signal
rd_ptr_muxed
:
t_counter
;
signal
full_int
,
empty_int
:
std_logic
;
signal
almost_full_int
,
almost_empty_int
:
std_logic
;
...
...
@@ -113,6 +114,15 @@ begin -- syn
rd_int
<=
rd_i
and
not
empty_int
;
we_int
<=
we_i
and
not
full_int
;
p_rd_ptr_mux
:
process
(
rcb
,
rd_int
)
begin
if
(
rd_int
=
'1'
and
g_show_ahead
)
then
rd_ptr_muxed
<=
rcb
.
bin_next
;
elsif
((
rd_int
=
'1'
and
not
g_show_ahead
)
or
(
g_show_ahead
))
then
rd_ptr_muxed
<=
rcb
.
bin
;
end
if
;
end
process
p_rd_ptr_mux
;
p_mem_write
:
process
(
clk_wr_i
)
begin
if
rising_edge
(
clk_wr_i
)
then
...
...
@@ -125,8 +135,8 @@ begin -- syn
p_mem_read
:
process
(
clk_rd_i
)
begin
if
rising_edge
(
clk_rd_i
)
then
if
rd_int
=
'1'
then
q_int
<=
mem
(
to_integer
(
unsigned
(
r
cb
.
bin
(
rcb
.
bin
'LEFT
-1
downto
0
))));
if
(
rd_int
=
'1'
or
g_show_ahead
)
then
q_int
<=
mem
(
to_integer
(
unsigned
(
r
d_ptr_muxed
(
rd_ptr_muxed
'left
-1
downto
0
))));
end
if
;
end
if
;
end
process
p_mem_read
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
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