Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
X
x393
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
Commits
56006910
Commit
56006910
authored
Jan 26, 2015
by
Andrey Filippov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
another memory sequence encoder module
parent
7faa227a
Changes
2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
245 additions
and
4 deletions
+245
-4
cmd_encod_linear_rd.v
memctrl/cmd_encod_linear_rd.v
+240
-0
cmd_encod_linear_wr.v
memctrl/cmd_encod_linear_wr.v
+5
-4
No files found.
memctrl/cmd_encod_linear_rd.v
0 → 100644
View file @
56006910
This diff is collapsed.
Click to expand it.
memctrl/cmd_encod_linear_wr.v
View file @
56006910
...
...
@@ -59,7 +59,7 @@ module cmd_encod_linear_wr #(
localparam
ENC_CMD_WRITE
=
1
;
localparam
ENC_CMD_PRECHARGE
=
2
;
localparam
ENC_CMD_ACTIVATE
=
3
;
localparam
PAUSE
_ADDR
=
4
;
localparam
REPEAT
_ADDR
=
4
;
localparam
CMD_NOP
=
0
;
// 3-bit normal memory RCW commands (positive logic)
localparam
CMD_WRITE
=
3
;
...
...
@@ -97,13 +97,13 @@ module cmd_encod_linear_wr #(
if
(
rst
)
gen_addr
<=
0
;
else
if
(
!
start
&&
!
gen_run
)
gen_addr
<=
0
;
else
if
((
gen_addr
==
(
PAUSE_ADDR
-
1
))
&&
(
num128
[
5
:
1
]
==
0
))
gen_addr
<=
PAUSE
_ADDR
+
1
;
// skip loop alltogeter
else
if
((
gen_addr
!=
PAUSE
_ADDR
)
||
(
num128
[
5
:
1
]
==
0
))
gen_addr
<=
gen_addr
+
1
;
// not in a loop
else
if
((
gen_addr
==
(
REPEAT_ADDR
-
1
))
&&
(
num128
[
5
:
1
]
==
0
))
gen_addr
<=
REPEAT
_ADDR
+
1
;
// skip loop alltogeter
else
if
((
gen_addr
!=
REPEAT
_ADDR
)
||
(
num128
[
5
:
1
]
==
0
))
gen_addr
<=
gen_addr
+
1
;
// not in a loop
if
(
rst
)
num128
<=
0
;
else
if
(
start
)
num128
<=
num128_in
;
else
if
(
!
gen_run
)
gen_addr
<=
0
;
//
else
if
((
gen_addr
==
(
PAUSE_ADDR
-
1
))
||
(
gen_addr
==
PAUSE
_ADDR
))
num128
<=
num128
-
1
;
else
if
((
gen_addr
==
(
REPEAT_ADDR
-
1
))
||
(
gen_addr
==
REPEAT
_ADDR
))
num128
<=
num128
-
1
;
end
always
@
(
posedge
clk
)
if
(
start
)
begin
...
...
@@ -126,6 +126,7 @@ module cmd_encod_linear_wr #(
4'h7
:
rom_r
<=
(
ENC_CMD_PRECHARGE
<<
ENC_CMD_SHIFT
)
;
4'h8
:
rom_r
<=
(
ENC_CMD_NOP
<<
ENC_CMD_SHIFT
)
|
(
2
<<
ENC_PAUSE_SHIFT
)
;
4'h9
:
rom_r
<=
(
ENC_CMD_NOP
<<
ENC_CMD_SHIFT
)
|
(
1
<<
ENC_PRE_DONE
)
;
default:
rom_r
<=
0
;
endcase
end
always
@
(
posedge
rst
or
posedge
clk
)
begin
...
...
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