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
0e866d77
Commit
0e866d77
authored
Jun 12, 2016
by
Andrey Filippov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Simulating 8x8 DCT
parent
6912f6d6
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
76 additions
and
51 deletions
+76
-51
dct2d8x8_chen.v
dsp/dct2d8x8_chen.v
+1
-1
dct_chen_transpose.v
dsp/dct_chen_transpose.v
+8
-8
x393_testbench04.sav
x393_testbench04.sav
+67
-42
No files found.
dsp/dct2d8x8_chen.v
View file @
0e866d77
...
...
@@ -44,7 +44,7 @@ module dct2d8x8_chen#(
parameter
STAGE1_SAFE_BITS
=
3
,
// leave this number of extra bits on DCT1D input to prevent output saturation
parameter
STAGE2_SAFE_BITS
=
3
,
// leave this number of extra bits on DCT1D input to prevent output saturation
parameter
TRANSPOSE_WIDTH
=
16
,
// transpose memory width
parameter
TRIM_STAGE_1
=
0
,
// Trim these MSBs from the stage1 results
parameter
TRIM_STAGE_1
=
1
,
// Trim these MSBs from the stage1 results (1 - matches old DCT)
parameter
TRIM_STAGE_2
=
2
,
// Trim these MSBs from the stage2 results TODO: put real value
parameter
DSP_WIDTH
=
24
,
parameter
DSP_OUT_WIDTH
=
24
,
...
...
dsp/dct_chen_transpose.v
View file @
0e866d77
...
...
@@ -56,7 +56,7 @@ module dct_chen_transpose#(
reg
wcol13
;
// columns 1 and 3 (special)
wire
[
3
:
0
]
wrow_mod
;
// effective row, including modifier for wpage
wire
[
1
:
0
]
wcol01_mod
=
wcol
[
1
:
0
]
+
wcol
[
2
]
;
wire
[
1
:
0
]
wcol01_mod
=
wcol
[
1
:
0
]
-
wcol
[
2
]
;
reg
[
6
:
0
]
waddr
;
wire
pre2_stop
;
reg
[
WIDTH
-
1
:
0
]
transpose_ram
[
0
:
127
]
;
...
...
@@ -76,12 +76,12 @@ module dct_chen_transpose#(
assign
dout_10_32_76_54
=
ram_reg2
;
// TODO: prevent writing to previous page after pause!
always
@
(
posedge
clk
)
begin
wcol13
<=
~
wcol
[
0
]
&
~
wcol
[
2
]
;
wcol13
<=
pre_we_r
&
~
wcol
[
0
]
&
~
wcol
[
2
]
;
waddr
[
0
]
<=
wrow_mod
[
0
]
^
wrow_mod
[
2
]
;
waddr
[
1
]
<=
wcol
[
1
]
;
waddr
[
2
]
<=
~
wcol01_mod
[
0
]
^
wcol01_mod
[
1
]
;
waddr
[
3
]
<=
~
wcol01_mod
[
1
]
;
waddr
[
4
]
<=
wrow_mod
[
0
]
^
wrow_mod
[
2
]
;
waddr
[
1
]
<=
wcol
[
0
]
;
waddr
[
2
]
<=
wcol01_mod
[
1
]
;
waddr
[
3
]
<=
~
wcol01_mod
[
0
]
^
wcol01_mod
[
1
]
;
waddr
[
4
]
<=
wrow_mod
[
1
]
^
wrow_mod
[
2
]
;
waddr
[
5
]
<=
wrow_mod
[
2
]
;
waddr
[
6
]
<=
wpage
;
...
...
@@ -91,7 +91,7 @@ module dct_chen_transpose#(
if
(
rst
)
wcntr
<=
0
;
else
if
(
pre_we_r
)
wcntr
<=
wcntr
+
1
;
// including page, should be before 'if (pre2_start)'
else
if
(
pre2_start
)
wcntr
<=
{
wcntr
[
6
]
,
6'b0
};
// if happens during pre_we_r - will be ignore, otherwise (after pause) will zero in-page adderss
else
if
(
pre2_start
)
wcntr
<=
{
wcntr
[
6
]
,
6'b0
};
// if happens during pre_we_r - will be ignore
d
, otherwise (after pause) will zero in-page adderss
we_r
<=
pre_we_r
;
...
...
@@ -99,7 +99,7 @@ module dct_chen_transpose#(
if
(
rst
)
rcntr
<=
~
0
;
else
if
(
pre_rstart_w
)
rcntr
<=
0
;
else
if
(
rcntr
!=
~
0
)
rcntr
<=
rcntr
+
1
;
else
if
(
!
(
&
rcntr
))
rcntr
<=
rcntr
+
1
;
re_r
<=
~
rcntr
[
2
]
;
regen_r
<=
re_r
;
...
...
x393_testbench04.sav
View file @
0e866d77
[*]
[*] GTKWave Analyzer v3.3.66 (w)1999-2015 BSI
[*] Sun Jun 12
05:41:06
2016
[*] Sun Jun 12
10:04:58
2016
[*]
[dumpfile] "/home/andrey/git/x393/simulation/x393_testbench03-2016061
1211111571
.fst"
[dumpfile_mtime] "Sun Jun 12 0
3:26:5
9 2016"
[dumpfile_size] 85
746817
[dumpfile] "/home/andrey/git/x393/simulation/x393_testbench03-2016061
2033213998
.fst"
[dumpfile_mtime] "Sun Jun 12 0
9:48:1
9 2016"
[dumpfile_size] 85
326946
[savefile] "/home/andrey/git/x393/x393_testbench04.sav"
[timestart] 90
597
800
[timestart] 90
696
800
[size] 1823 1180
[pos] 0 0
*-1
4.383114 90668200
209370000 209396667 209423333 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1
*-1
5.073349 90841667
209370000 209396667 209423333 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1
[treeopen] x393_testbench03.
[treeopen] x393_testbench03.read_compressor_frame_irq.
[treeopen] x393_testbench03.read_contol_register_irq.
...
...
@@ -30,6 +30,7 @@
[treeopen] x393_testbench03.x393_i.compressor393_i.cmprs_channel_block[0].jp_channel_i.dct2d8x8_chen_i.dct1d_chen_stage1_i.dsp_ma1_i.DSP48E1_i.
[treeopen] x393_testbench03.x393_i.compressor393_i.cmprs_channel_block[0].jp_channel_i.dct2d8x8_chen_i.dct1d_chen_stage1_i.dsp_ma2_i.
[treeopen] x393_testbench03.x393_i.compressor393_i.cmprs_channel_block[0].jp_channel_i.dct2d8x8_chen_i.dct1d_chen_stage1_i.dsp_ma2_i.DSP48E1_i.
[treeopen] x393_testbench03.x393_i.compressor393_i.cmprs_channel_block[0].jp_channel_i.dct2d8x8_chen_i.dct_chen_transpose_i.
[treeopen] x393_testbench03.x393_i.compressor393_i.cmprs_channel_block[0].jp_channel_i.xdct393_i.
[treeopen] x393_testbench03.x393_i.compressor393_i.cmprs_channel_block[1].
[treeopen] x393_testbench03.x393_i.compressor393_i.cmprs_channel_block[2].
...
...
@@ -61,8 +62,8 @@
[treeopen] x393_testbench03.x393_i.sensors393_i.sensor_channel_block[3].
[treeopen] x393_testbench03.x393_i.sensors393_i.sensor_channel_block[3].sensor_channel_i.
[treeopen] x393_testbench03.x393_i.sensors393_i.sensor_channel_block[3].sensor_channel_i.sensor_i2c_io_i.
[sst_width]
352
[signals_width] 26
7
[sst_width]
238
[signals_width] 26
0
[sst_expanded] 1
[sst_vpaned_height] 420
@820
...
...
@@ -2172,7 +2173,7 @@ x393_testbench03.x393_i.compressor393_i.cmprs_channel_block[0].jp_channel_i.dct2
x393_testbench03.x393_i.compressor393_i.cmprs_channel_block[0].jp_channel_i.dct2d8x8_chen_i.dct1d_chen_stage1_i.dout1_w[23:0]
@1401200
-ma1
@
8
00200
@
c
00200
-ma2
@22
[color] 7
...
...
@@ -2236,12 +2237,13 @@ x393_testbench03.x393_i.compressor393_i.cmprs_channel_block[0].jp_channel_i.dct2
-
@1000200
-dsp48e1
@1401200
-ma2
@28
x393_testbench03.x393_i.compressor393_i.cmprs_channel_block[0].jp_channel_i.dct2d8x8_chen_i.start
x393_testbench03.x393_i.compressor393_i.cmprs_channel_block[0].jp_channel_i.dct2d8x8_chen_i.en_in_r
x393_testbench03.x393_i.compressor393_i.cmprs_channel_block[0].jp_channel_i.dct2d8x8_chen_i.dct1_en
@
8
00200
@
c
00200
-reorder_in
@28
x393_testbench03.x393_i.compressor393_i.cmprs_channel_block[0].jp_channel_i.dct2d8x8_chen_i.dct1d_chen_reorder_in_i.en
...
...
@@ -2260,37 +2262,8 @@ x393_testbench03.x393_i.compressor393_i.cmprs_channel_block[0].jp_channel_i.dct2
x393_testbench03.x393_i.compressor393_i.cmprs_channel_block[0].jp_channel_i.dct2d8x8_chen_i.dct1d_chen_reorder_in_i.en_out
@200
-
@1000200
-reorder_in
@28
x393_testbench03.x393_i.compressor393_i.cmprs_channel_block[0].jp_channel_i.dct2d8x8_chen_i.dct1d_chen_stage1_i.start
x393_testbench03.x393_i.compressor393_i.cmprs_channel_block[0].jp_channel_i.dct2d8x8_chen_i.dct1d_chen_stage1_i.en
x393_testbench03.x393_i.compressor393_i.cmprs_channel_block[0].jp_channel_i.dct2d8x8_chen_i.dct1d_chen_stage1_i.pre2_start_out
x393_testbench03.x393_i.compressor393_i.cmprs_channel_block[0].jp_channel_i.dct2d8x8_chen_i.dct1d_chen_stage1_i.en_out
@420
x393_testbench03.x393_i.compressor393_i.cmprs_channel_block[0].jp_channel_i.dct2d8x8_chen_i.dct1d_chen_stage1_i.dout[23:0]
@28
x393_testbench03.x393_i.compressor393_i.cmprs_channel_block[0].jp_channel_i.dct2d8x8_chen_i.dct1d_chen_stage1_i.en_out
@22
x393_testbench03.x393_i.compressor393_i.cmprs_channel_block[0].jp_channel_i.dct2d8x8_chen_i.dct1d_chen_stage1_i.per_type[2:0]
@28
x393_testbench03.x393_i.compressor393_i.cmprs_channel_block[0].jp_channel_i.dct2d8x8_chen_i.dct1d_chen_stage1_i.pre2_start_out
@c00022
x393_testbench03.x393_i.compressor393_i.cmprs_channel_block[0].jp_channel_i.dct2d8x8_chen_i.dct1d_chen_stage1_i.phase[7:0]
@28
(0)x393_testbench03.x393_i.compressor393_i.cmprs_channel_block[0].jp_channel_i.dct2d8x8_chen_i.dct1d_chen_stage1_i.phase[7:0]
(1)x393_testbench03.x393_i.compressor393_i.cmprs_channel_block[0].jp_channel_i.dct2d8x8_chen_i.dct1d_chen_stage1_i.phase[7:0]
(2)x393_testbench03.x393_i.compressor393_i.cmprs_channel_block[0].jp_channel_i.dct2d8x8_chen_i.dct1d_chen_stage1_i.phase[7:0]
(3)x393_testbench03.x393_i.compressor393_i.cmprs_channel_block[0].jp_channel_i.dct2d8x8_chen_i.dct1d_chen_stage1_i.phase[7:0]
(4)x393_testbench03.x393_i.compressor393_i.cmprs_channel_block[0].jp_channel_i.dct2d8x8_chen_i.dct1d_chen_stage1_i.phase[7:0]
(5)x393_testbench03.x393_i.compressor393_i.cmprs_channel_block[0].jp_channel_i.dct2d8x8_chen_i.dct1d_chen_stage1_i.phase[7:0]
(6)x393_testbench03.x393_i.compressor393_i.cmprs_channel_block[0].jp_channel_i.dct2d8x8_chen_i.dct1d_chen_stage1_i.phase[7:0]
(7)x393_testbench03.x393_i.compressor393_i.cmprs_channel_block[0].jp_channel_i.dct2d8x8_chen_i.dct1d_chen_stage1_i.phase[7:0]
@1401200
-group_end
@28
x393_testbench03.x393_i.compressor393_i.cmprs_channel_block[0].jp_channel_i.dct2d8x8_chen_i.dbg_stage1_pre2_en_out
x393_testbench03.x393_i.compressor393_i.cmprs_channel_block[0].jp_channel_i.dct2d8x8_chen_i.stage1_pre2_start_out
-reorder_in
@1000200
-stage1
@800200
...
...
@@ -2310,13 +2283,14 @@ x393_testbench03.x393_i.compressor393_i.cmprs_channel_block[0].jp_channel_i.dct2
x393_testbench03.x393_i.compressor393_i.cmprs_channel_block[0].jp_channel_i.dct2d8x8_chen_i.dct1d_chen_reorder_out_dbg_i.waddr[3:0]
@28
x393_testbench03.x393_i.compressor393_i.cmprs_channel_block[0].jp_channel_i.dct2d8x8_chen_i.dct1d_chen_reorder_out_dbg_i.we_r
@2
3
@2
2
x393_testbench03.x393_i.compressor393_i.cmprs_channel_block[0].jp_channel_i.dct2d8x8_chen_i.dct1d_chen_reorder_out_dbg_i.raddr[3:0]
@28
x393_testbench03.x393_i.compressor393_i.cmprs_channel_block[0].jp_channel_i.dct2d8x8_chen_i.dbg_pre_first_out
x393_testbench03.x393_i.compressor393_i.cmprs_channel_block[0].jp_channel_i.dct2d8x8_chen_i.dbg_dv
x393_testbench03.x393_i.compressor393_i.cmprs_channel_block[0].jp_channel_i.dct2d8x8_chen_i.dbg_en_out
@22
@420
[color] 6
x393_testbench03.x393_i.compressor393_i.cmprs_channel_block[0].jp_channel_i.dct2d8x8_chen_i.dbg_d_out[23:0]
@28
x393_testbench03.x393_i.compressor393_i.cmprs_channel_block[0].jp_channel_i.dct2d8x8_chen_i.stage1_pre2_start_out
...
...
@@ -2326,6 +2300,57 @@ x393_testbench03.x393_i.compressor393_i.cmprs_channel_block[0].jp_channel_i.dct2
-
@1000200
-stage1_dbg
@800200
-transpose
@28
x393_testbench03.x393_i.compressor393_i.cmprs_channel_block[0].jp_channel_i.dct2d8x8_chen_i.dct_chen_transpose_i.rst
x393_testbench03.x393_i.compressor393_i.cmprs_channel_block[0].jp_channel_i.dct2d8x8_chen_i.dct_chen_transpose_i.pre2_start
x393_testbench03.x393_i.compressor393_i.cmprs_channel_block[0].jp_channel_i.dct2d8x8_chen_i.dct_chen_transpose_i.pre2_stop
@420
x393_testbench03.x393_i.compressor393_i.cmprs_channel_block[0].jp_channel_i.dct2d8x8_chen_i.dct_chen_transpose_i.din[15:0]
@22
[color] 3
x393_testbench03.x393_i.compressor393_i.cmprs_channel_block[0].jp_channel_i.dct2d8x8_chen_i.dct_chen_transpose_i.waddr[6:0]
@28
x393_testbench03.x393_i.compressor393_i.cmprs_channel_block[0].jp_channel_i.dct2d8x8_chen_i.dct_chen_transpose_i.pre_we_r
x393_testbench03.x393_i.compressor393_i.cmprs_channel_block[0].jp_channel_i.dct2d8x8_chen_i.dct_chen_transpose_i.we_r
@22
x393_testbench03.x393_i.compressor393_i.cmprs_channel_block[0].jp_channel_i.dct2d8x8_chen_i.dct_chen_transpose_i.pre_rstart_w
@800023
[color] 2
x393_testbench03.x393_i.compressor393_i.cmprs_channel_block[0].jp_channel_i.dct2d8x8_chen_i.dct_chen_transpose_i.wcntr[6:0]
@29
[color] 2
(0)x393_testbench03.x393_i.compressor393_i.cmprs_channel_block[0].jp_channel_i.dct2d8x8_chen_i.dct_chen_transpose_i.wcntr[6:0]
[color] 2
(1)x393_testbench03.x393_i.compressor393_i.cmprs_channel_block[0].jp_channel_i.dct2d8x8_chen_i.dct_chen_transpose_i.wcntr[6:0]
[color] 2
(2)x393_testbench03.x393_i.compressor393_i.cmprs_channel_block[0].jp_channel_i.dct2d8x8_chen_i.dct_chen_transpose_i.wcntr[6:0]
[color] 2
(3)x393_testbench03.x393_i.compressor393_i.cmprs_channel_block[0].jp_channel_i.dct2d8x8_chen_i.dct_chen_transpose_i.wcntr[6:0]
[color] 2
(4)x393_testbench03.x393_i.compressor393_i.cmprs_channel_block[0].jp_channel_i.dct2d8x8_chen_i.dct_chen_transpose_i.wcntr[6:0]
[color] 2
(5)x393_testbench03.x393_i.compressor393_i.cmprs_channel_block[0].jp_channel_i.dct2d8x8_chen_i.dct_chen_transpose_i.wcntr[6:0]
[color] 2
(6)x393_testbench03.x393_i.compressor393_i.cmprs_channel_block[0].jp_channel_i.dct2d8x8_chen_i.dct_chen_transpose_i.wcntr[6:0]
@1001201
-group_end
@22
x393_testbench03.x393_i.compressor393_i.cmprs_channel_block[0].jp_channel_i.dct2d8x8_chen_i.dct_chen_transpose_i.wpage
x393_testbench03.x393_i.compressor393_i.cmprs_channel_block[0].jp_channel_i.dct2d8x8_chen_i.dct_chen_transpose_i.wrow[2:0]
x393_testbench03.x393_i.compressor393_i.cmprs_channel_block[0].jp_channel_i.dct2d8x8_chen_i.dct_chen_transpose_i.wrow_mod[3:0]
x393_testbench03.x393_i.compressor393_i.cmprs_channel_block[0].jp_channel_i.dct2d8x8_chen_i.dct_chen_transpose_i.wcol[2:0]
x393_testbench03.x393_i.compressor393_i.cmprs_channel_block[0].jp_channel_i.dct2d8x8_chen_i.dct_chen_transpose_i.wcol01_mod[1:0]
@28
x393_testbench03.x393_i.compressor393_i.cmprs_channel_block[0].jp_channel_i.dct2d8x8_chen_i.dct_chen_transpose_i.wcol13
@22
x393_testbench03.x393_i.compressor393_i.cmprs_channel_block[0].jp_channel_i.dct2d8x8_chen_i.dct_chen_transpose_i.rcntr[5:0]
x393_testbench03.x393_i.compressor393_i.cmprs_channel_block[0].jp_channel_i.dct2d8x8_chen_i.dct_chen_transpose_i.raddr[5:0]
@200
-
@1000200
-transpose
@22
x393_testbench03.x393_i.compressor393_i.cmprs_channel_block[0].jp_channel_i.dct2d8x8_chen_i.dct2in_pad_h[23:0]
x393_testbench03.x393_i.compressor393_i.cmprs_channel_block[0].jp_channel_i.dct2d8x8_chen_i.dct2in_pad_l[23:0]
...
...
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