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
507e680a
Commit
507e680a
authored
Jun 25, 2015
by
Andrey Filippov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
more cleanup
parent
4152a851
Changes
2
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
50 additions
and
33 deletions
+50
-33
jp_channel.v
compressor_jp/jp_channel.v
+42
-27
stuffer393.v
compressor_jp/stuffer393.v
+8
-6
No files found.
compressor_jp/jp_channel.v
View file @
507e680a
This diff is collapsed.
Click to expand it.
compressor_jp/stuffer393.v
View file @
507e680a
...
...
@@ -44,7 +44,7 @@
module
stuffer393
(
input
clk
,
// 2x pixel clock
input
en_in
,
// enable, 0- reset (other clock domain, needs re-sync)
input
reset_data_counters
,
// reset data transfer counters (only when DMA and compressor are disabled)
///
input reset_data_counters, // reset data transfer counters (only when DMA and compressor are disabled)
input
flush
,
// flush output data (fill byte with 0, long word with 0
input
abort
,
// @ any, extracts 0->1 and flushes
input
stb
,
// input data strobe
...
...
@@ -60,7 +60,7 @@ module stuffer393 (
output
reg
[
15
:
0
]
q
,
// [15:0] output data
output
reg
qv
,
// output data valid
output
done
,
// reset by !en, goes high after some delay after flushing
output
reg
[
23
:
0
]
imgptr
,
// [23:0]image pointer in 32-byte chunks
///
output reg [23:0] imgptr, // [23:0]image pointer in 32-byte chunks
output
reg
flushing
,
output
reg
running
// from registering timestamp until done
`ifdef
debug_stuffer
...
...
@@ -310,7 +310,8 @@ end
//reset_data_counters; // reset data transfer counters (only when DMA and compressor are disabled)
if
(
reset_data_counters
)
etrax_dma
[
3
:
0
]
<=
0
;
// not needed to be reset after frame, and that was wrong (to early)
// if (reset_data_counters ) etrax_dma[3:0] <= 0; // not needed to be reset after frame, and that was wrong (to early)
if
(
!
en
)
etrax_dma
[
3
:
0
]
<=
0
;
// Now en here waits for flashing to end, so it should not be too early
else
if
(
qv
)
etrax_dma
[
3
:
0
]
<=
etrax_dma
[
3
:
0
]
+
1
;
// just for testing
...
...
@@ -349,11 +350,12 @@ end
((
stage2_bits
[
4
]
&&
!
send8h
)
?
stage2
[
23
:
16
]
:
8'b0
)
};
inc_imgsz32
<=
(
etrax_dma
[
3
:
0
]
==
4'h0
)
&&
qv
;
//reset_data_counters instead of !en here?
if
(
reset_data_counters
||
done
)
imgsz32
[
19
:
0
]
<=
0
;
// if (reset_data_counters || done) imgsz32[19:0] <= 0;
if
(
!
en
||
done
)
imgsz32
[
19
:
0
]
<=
0
;
// now en is just for stuffer, waits for flushing to end
else
if
(
inc_imgsz32
)
imgsz32
[
19
:
0
]
<=
imgsz32
[
19
:
0
]
+
1
;
if
(
reset_data_counters
)
imgptr
[
23
:
0
]
<=
0
;
else
if
(
done
)
imgptr
[
23
:
0
]
<=
imgptr
[
23
:
0
]
+
imgsz32
[
19
:
0
]
;
///
if (reset_data_counters) imgptr[23:0] <= 0;
///
else if (done) imgptr[23:0] <= imgptr[23:0]+ imgsz32[19:0];
flush_end_delayed
<=
en
&
pre_flush_end_delayed
;
// en just to prevent optimizing pre_flush_end_delayed+flush_end_delayed into a single SRL16
end
...
...
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