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
454a65b4
Commit
454a65b4
authored
Jun 14, 2015
by
Andrey Filippov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
connecting first ported compressor modules together
parent
6e79acaf
Changes
2
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
191 additions
and
22 deletions
+191
-22
cmprs_pixel_buf_iface.v
compressor_jp/cmprs_pixel_buf_iface.v
+17
-11
jp_channel.v
compressor_jp/jp_channel.v
+174
-11
No files found.
compressor_jp/cmprs_pixel_buf_iface.v
View file @
454a65b4
...
...
@@ -23,11 +23,18 @@
`timescale
1
ns
/
1
ps
module
cmprs_pixel_buf_iface
#(
parameter
CMPRS_PREEND_EARLY
=
8
,
// TODO: adjust according to cmprs_macroblock_buf_iface latency. In
parameter
CMPRS_PREEND_EARLY
=
6
,
// TODO: adjust according to cmprs_macroblock_buf_iface latency. In
// color18 mode this should be later than end of address run - (6*64>18*18)
// "0" would generate pulse at eth same time as next macro mb_pre_start
parameter
CMPRS_RELEASE_EARLY
=
16
,
// set to minimal actual latency in memory read, but not more than
parameter
CMPRS_BUF_EXTRA_LATENCY
=
0
// extra register layers insered between the buffer and this module
parameter
CMPRS_BUF_EXTRA_LATENCY
=
0
,
// extra register layers insered between the buffer and this module
parameter
CMPRS_COLOR18
=
0
,
// JPEG 4:2:0 with 18x18 overlapping tiles for de-bayer
parameter
CMPRS_COLOR20
=
1
,
// JPEG 4:2:0 with 18x18 overlapping tiles for de-bayer (not implemented)
parameter
CMPRS_MONO16
=
2
,
// JPEG 4:2:0 with 16x16 non-overlapping tiles, color components zeroed
parameter
CMPRS_JP4
=
3
,
// JP4 mode with 16x16 macroblocks
parameter
CMPRS_JP4DIFF
=
4
,
// JP4DIFF mode TODO: see if correct
parameter
CMPRS_MONO8
=
7
// Regular JPEG monochrome with 8x8 macroblocks (not yet implemented)
)(
input
xclk
,
// global clock input, compressor single clock rate
input
frame_en
,
// if 0 - will reset logic immediately (but not page number)
...
...
@@ -57,7 +64,7 @@ module cmprs_pixel_buf_iface #(
localparam
PERIOD_MONO16
=
384
;
// 6*64 - sends 2 of zeroed blobks
localparam
PERIOD_JP4
=
256
;
// 4*64 - exact match
localparam
PERIOD_JP4DIFF
=
256
;
// TODO: see if correct
localparam
PERIOD_MONO8
=
64
;
// 1*64 - exact match - not yet implemented (no
t
mal mono JPEG)
localparam
PERIOD_MONO8
=
64
;
// 1*64 - exact match - not yet implemented (no
r
mal mono JPEG)
reg
[
CMPRS_BUF_EXTRA_LATENCY
+
3
:
0
]
buf_re
=
0
;
...
...
@@ -159,12 +166,12 @@ module cmprs_pixel_buf_iface #(
if
(
!
frame_en
)
period_cntr
<=
0
;
else
if
(
mb_pre_start
)
begin
case
(
converter_type
[
2
:
0
])
3'h0
:
period_cntr
<=
PERIOD_COLOR18
-
1
;
3'h1
:
period_cntr
<=
PERIOD_COLOR20
-
1
;
3'h2
:
period_cntr
<=
PERIOD_MONO16
-
1
;
3'h3
:
period_cntr
<=
PERIOD_JP4
-
1
;
3'h4
:
period_cntr
<=
PERIOD_JP4DIFF
-
1
;
3'h7
:
period_cntr
<=
PERIOD_MONO8
-
1
;
CMPRS_COLOR18
:
period_cntr
<=
PERIOD_COLOR18
-
1
;
CMPRS_COLOR20
:
period_cntr
<=
PERIOD_COLOR20
-
1
;
CMPRS_MONO16:
period_cntr
<=
PERIOD_MONO16
-
1
;
CMPRS_JP4:
period_cntr
<=
PERIOD_JP4
-
1
;
CMPRS_JP4DIFF
:
period_cntr
<=
PERIOD_JP4DIFF
-
1
;
CMPRS_MONO8:
period_cntr
<=
PERIOD_MONO8
-
1
;
default:
period_cntr
<=
'bx
;
endcase
end
else
if
(
|
period_cntr
)
period_cntr
<=
period_cntr
-
1
;
...
...
@@ -178,4 +185,3 @@ module cmprs_pixel_buf_iface #(
end
endmodule
compressor_jp/jp_channel.v
View file @
454a65b4
This diff is collapsed.
Click to expand it.
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