Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
X
x393_sata
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
Elphel
x393_sata
Commits
1344fec0
Commit
1344fec0
authored
Jul 23, 2015
by
Alexey Grebenkin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
copypaste typos fix in dma_control.v
parent
3b5ef7db
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
12 deletions
+12
-12
dma_control.v
dma_control.v
+12
-12
No files found.
dma_control.v
View file @
1344fec0
...
...
@@ -188,26 +188,26 @@ wire to_we;
assign
to_wr_next_addr
=
to_wr_addr
+
1'b1
;
assign
to_rd_next_addr
=
to_rd_addr
+
1'b1
;
//
h
clk domain counters
always
@
(
posedge
h
clk
)
//
s
clk domain counters
always
@
(
posedge
s
clk
)
begin
to_wr_addr
<=
rst
?
10'h0
:
to_we
?
to_wr_next_addr
:
to_wr_addr
;
to_wr_addr_gr
<=
rst
?
10'h0
:
to_we
?
to_wr_next_addr
^
{
1'b0
,
to_wr_next_addr
[
9
:
1
]
}
:
to_wr_addr_gr
;
end
//
s
clk domain counters
always
@
(
posedge
s
clk
)
//
h
clk domain counters
always
@
(
posedge
h
clk
)
begin
to_rd_addr
<=
rst
?
9'h0
:
to_re
?
to_rd_next_addr
:
to_rd_addr
;
to_rd_addr_gr
<=
rst
?
9'h0
:
to_re
?
to_rd_next_addr
^
{
1'b0
,
to_rd_next_addr
[
8
:
1
]
}
:
to_rd_addr_gr
;
end
// write address ->
s
clk (rd) domain to compare
always
@
(
posedge
s
clk
)
// write address ->
h
clk (rd) domain to compare
always
@
(
posedge
h
clk
)
begin
to_wr_addr_gr_r
<=
rst
?
10'h0
:
to_wr_addr
;
to_wr_addr_gr_rr
<=
rst
?
10'h0
:
to_wr_addr_rr
;
end
// read address ->
h
clk (wr) domain to compare
always
@
(
posedge
h
clk
)
// read address ->
s
clk (wr) domain to compare
always
@
(
posedge
s
clk
)
begin
to_rd_addr_gr_r
<=
rst
?
9'h0
:
to_rd_addr
;
to_rd_addr_gr_rr
<=
rst
?
9'h0
:
to_rd_addr_rr
;
...
...
@@ -228,13 +228,13 @@ begin: to_rd_antigray
end
endgenerate
// so we've got the following:
//
h
clk domain: to_wr_addr - current write address
// to_rd_addr_r - read address some
h
clk ticks ago
//
s
clk domain: to_wr_addr - current write address
// to_rd_addr_r - read address some
s
clk ticks ago
// => we can say if the fifo have the possibility to be full
// since actual to_rd_addr could only be incremented
//
//
s
clk domain: to_rd_addr - current read address
// to_wr_addr_r - write address some
s
clk ticks ago
//
h
clk domain: to_rd_addr - current read address
// to_wr_addr_r - write address some
h
clk ticks ago
// => we can say if the fifo have the possibility to be empty
// since actual to_wr_addr could only be incremented
assign
to_full
=
{
to_wr_addr
,
1'b0
}
==
to_rd_addr_r
+
1'b1
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment