...
 
Commits (85)
~*
.~*
unisims
vivado_*
syntax_*
......
This diff is collapsed.
[*]
[*] GTKWave Analyzer v3.3.78 (w)1999-2016 BSI
[*] Tue Dec 13 19:43:18 2016
[*] Wed Dec 6 03:32:52 2017
[*]
[dumpfile] "/home/eyesis/git/x393-neon/simulation/dct_tests_01-20161213123921501.fst"
[dumpfile_mtime] "Tue Dec 13 19:39:21 2016"
[dumpfile_size] 103386
[savefile] "/home/eyesis/git/x393-neon/dct_tests_01.sav"
[dumpfile] "/home/eyesis/nc393/elphel393/fpga-elphel/x393_branch_dct/simulation/dct_tests_01-20171205202130067.fst"
[dumpfile_mtime] "Wed Dec 6 03:21:30 2017"
[dumpfile_size] 164750
[savefile] "/home/eyesis/nc393/elphel393/fpga-elphel/x393_branch_dct/dct_tests_01.sav"
[timestart] 0
[size] 1814 1171
[pos] 1912 0
*-19.687614 3465000 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1
[size] 1920 1171
[pos] -8 0
*-19.730682 1595000 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1
[treeopen] dct_tests_01.
[treeopen] dct_tests_01.dct_iv8_1d_i.
[treeopen] dct_tests_01.dct_iv8_1d_i.dsp_ma_preadd_c_1_i.
......@@ -19,11 +19,14 @@
[sst_width] 204
[signals_width] 302
[sst_expanded] 1
[sst_vpaned_height] 344
[sst_vpaned_height] 343
@c00200
-top
@24
dct_tests_01.i
@420
dct_tests_01.i1
@24
dct_tests_01.j
@28
dct_tests_01.CLK
......@@ -79,6 +82,7 @@ dct_tests_01.x_out[23:0]
@28
[color] 2
dct_tests_01.start
dct_tests_01.start2
dct_tests_01.y_dv
dct_tests_01.y_pre_we
@22
......@@ -91,9 +95,10 @@ dct_tests_01.phase_y[3:0]
dct_tests_01.y_dct[23:0]
dct_tests_01.y_out[23:0]
dct_tests_01.dct_iv8_1d_i.y_index[2:0]
dct_tests_01.x_in_2d[23:0]
@1401200
-top
@c00200
@c00201
-2d-1d
@28
dct_tests_01.start
......@@ -156,7 +161,7 @@ dct_tests_01.dct_iv_8x8_i.dct_iv8_1d_pass1_1_i.en_out
dct_tests_01.dct_iv_8x8_i.dct_iv8_1d_pass1_1_i.y_index[2:0]
@200
-
@1401200
@1401201
-2d-1d
@c00200
-dct_iv8_1d
......@@ -203,7 +208,7 @@ dct_tests_01.dct_iv8_1d_i.dsp_post_add_1
dct_tests_01.dct_iv8_1d_i.dsp_accum_1
@22
dct_tests_01.dct_iv8_1d_i.dsp_p_1[47:0]
@800200
@c00200
-dsp_1
@22
dct_tests_01.dct_iv8_1d_i.dsp_ma_preadd_c_1_i.ain[24:0]
......@@ -235,7 +240,7 @@ dct_tests_01.dct_iv8_1d_i.dsp_ma_preadd_c_1_i.p_reg_cond[47:0]
dct_tests_01.dct_iv8_1d_i.dsp_ma_preadd_c_1_i.p_reg[47:0]
@200
-
@1000200
@1401200
-dsp_1
@22
dct_tests_01.dct_iv8_1d_i.dsp_p_2[47:0]
......@@ -274,7 +279,7 @@ dct_tests_01.dct_iv8_1d_i.dsp_p_2[47:0]
dct_tests_01.dct_iv8_1d_i.phase_cnt[3:0]
@22
dct_tests_01.dct_iv8_1d_i.dout[23:0]
@800200
@c00200
-dsp_2
@22
dct_tests_01.dct_iv8_1d_i.dsp_ma_preadd_c_2_i.ain[24:0]
......@@ -286,7 +291,7 @@ dct_tests_01.dct_iv8_1d_i.dsp_ma_preadd_c_2_i.ad_reg[24:0]
dct_tests_01.dct_iv8_1d_i.dsp_ma_preadd_c_2_i.p_reg[47:0]
@200
-
@1000200
@1401200
-dsp_2
@28
dct_tests_01.dct_iv8_1d_i.en
......@@ -393,10 +398,96 @@ dct_tests_01.d_out_2d[23:0]
dct_tests_01.dv_2dr
@22
dct_tests_01.d_out_2dr[23:0]
@8421
@8420
dct_tests_01.d_out_2dr[23:0]
@c00200
-debug
@420
dct_tests_01.dct_iv_8x8_i.dcth_dout0[23:0]
@8420
dct_tests_01.dct_iv_8x8_i.dcth_dout0[23:0]
@420
dct_tests_01.dct_iv_8x8_i.dcth_dout1[23:0]
@8420
dct_tests_01.dct_iv_8x8_i.dcth_dout1[23:0]
@28
dct_tests_01.dct_iv_8x8_i.transpose_start
@22
dct_tests_01.dct_iv_8x8_i.transpose_debug_di[7:0]
@8022
dct_tests_01.dct_iv_8x8_i.transpose_debug_di[7:0]
@420
dct_tests_01.dct_iv_8x8_i.transpose_di[23:0]
@8420
dct_tests_01.dct_iv_8x8_i.transpose_di[23:0]
@22
dct_tests_01.dct_iv_8x8_i.transpose_wa[7:0]
@8022
dct_tests_01.dct_iv_8x8_i.transpose_wa[7:0]
@28
(0)dct_tests_01.dct_iv_8x8_i.transpose_we[1:0]
@22
dct_tests_01.dct_iv_8x8_i.transpose_cntr[6:0]
@8022
dct_tests_01.dct_iv_8x8_i.transpose_cntr[6:0]
@420
dct_tests_01.dct_iv_8x8_i.transpose_out[23:0]
@8420
dct_tests_01.dct_iv_8x8_i.transpose_out[23:0]
@22
dct_tests_01.dct_iv_8x8_i.dctv_xin0[23:0]
dct_tests_01.dct_iv_8x8_i.dctv_xin1[23:0]
@28
dct_tests_01.dct_iv_8x8_i.dctv_start_0_r
dct_tests_01.dct_iv_8x8_i.dctv_start_1_r
@800028
dct_tests_01.dct_iv_8x8_i.dctv_out_we_1[1:0]
@28
(0)dct_tests_01.dct_iv_8x8_i.dctv_out_we_1[1:0]
(1)dct_tests_01.dct_iv_8x8_i.dctv_out_we_1[1:0]
dct_tests_01.dct_iv_8x8_i.dctv_out_sel
dct_tests_01.dct_iv_8x8_i.dctv_out_we_2
@1001200
-group_end
@420
[color] 3
dct_tests_01.dct_iv_8x8_i.dctv_dout0[23:0]
[color] 2
dct_tests_01.dct_iv_8x8_i.dctv_dout1[23:0]
@8420
dct_tests_01.dct_iv_8x8_i.dctv_dout0[23:0]
dct_tests_01.dct_iv_8x8_i.dctv_dout1[23:0]
@22
[color] 6
dct_tests_01.dct_iv_8x8_i.dctv_out_cntr[6:0]
[color] 7
dct_tests_01.dct_iv_8x8_i.dctv_out_wa_1[3:0]
@28
dct_tests_01.dct_iv_8x8_i.dctv_out_sel
[color] 2
(0)dct_tests_01.dct_iv_8x8_i.dctv_out_we_1[1:0]
dct_tests_01.dct_iv_8x8_i.dctv_out_run
dct_tests_01.dct_iv_8x8_i.dctv_out_run_1
@22
[color] 3
dct_tests_01.dct_iv_8x8_i.dctv_out_ra_1[6:0]
[color] 2
dct_tests_01.dct_iv_8x8_i.dctv_out_ra_1_w[3:0]
@420
dct_tests_01.dct_iv_8x8_i.dctv_out_reg_1[23:0]
@8420
[color] 5
dct_tests_01.dct_iv_8x8_i.dctv_out_reg_1[23:0]
@420
dct_tests_01.dct_iv_8x8_i.dctv_out_reg_2[23:0]
@8420
dct_tests_01.dct_iv_8x8_i.dctv_out_reg_2[23:0]
@28
dct_tests_01.dct_iv_8x8_i.pre_first_out
@200
-
@1401200
-debug
@800200
-dct_iv_8x8
@28
......@@ -632,14 +723,33 @@ dct_tests_01.dct_iv_8x8_i.dctv_out_reg_2[23:0]
dct_tests_01.dct_iv_8x8_i.dctv_out_reg_2[23:0]
@22
dct_tests_01.dct_iv_8x8_i.dctv_out_debug_reg_2[2:0]
@8420
dct_tests_01.dct_iv_8x8_i.d_out[23:0]
@28
dct_tests_01.dct_iv_8x8_i.dv
dct_tests_01.dct_iv_8x8_i.pre_first_out
@420
dct_tests_01.dct_iv_8x8_i.pre_busy
@1000200
-dct_iv_8x8
@800200
@c00200
-dct_iv_8x8r
@28
dct_tests_01.dct_iv_8x8r_i.clk
dct_tests_01.dct_iv_8x8r_i.start
@8420
dct_tests_01.dct_iv_8x8r_i.xin[23:0]
dct_tests_01.dct_iv_8x8r_i.dcth_dout0[23:0]
dct_tests_01.dct_iv_8x8r_i.dcth_dout1[23:0]
@28
dct_tests_01.dct_iv_8x8r_i.transpose_start
@8420
dct_tests_01.dct_iv_8x8r_i.transpose_out[23:0]
@200
-
@1000200
@1401200
-dct_iv_8x8r
@1000200
-st22d_test
[pattern_trace] 1
[pattern_trace] 0
[*]
[*] GTKWave Analyzer v3.3.78 (w)1999-2016 BSI
[*] Sat Dec 9 23:22:47 2017
[*]
[dumpfile] "/home/eyesis/nc393/elphel393/fpga-elphel/x393_branch_dct/simulation/dct_tests_02-20171209161906877.fst"
[dumpfile_mtime] "Sat Dec 9 23:19:07 2017"
[dumpfile_size] 222572
[savefile] "/home/eyesis/nc393/elphel393/fpga-elphel/x393_branch_dct/dct_tests_02.sav"
[timestart] 0
[size] 1814 1171
[pos] 0 40
*-20.492632 3096000 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1
[treeopen] dct_tests_02.
[treeopen] dct_tests_02.dtt_iv_8x8_i.
[treeopen] dct_tests_02.dtt_iv_8x8r_i.
[sst_width] 299
[signals_width] 287
[sst_expanded] 1
[sst_vpaned_height] 344
@420
dct_tests_02.i
dct_tests_02.i1
dct_tests_02.j
@28
dct_tests_02.CLK
dct_tests_02.RST
[color] 2
dct_tests_02.start
[color] 2
dct_tests_02.start2
@22
dct_tests_02.mode_in[1:0]
@420
dct_tests_02.x_in_2d[23:0]
@8420
dct_tests_02.x_in_2d[23:0]
@420
dct_tests_02.d_out_2d[23:0]
@8420
dct_tests_02.d_out_2d[23:0]
@22
dct_tests_02.mode_out[1:0]
@420
dct_tests_02.d_out_2dr[23:0]
@8420
dct_tests_02.d_out_2dr[23:0]
@800200
-dtt_iv8x8_direct
@28
dct_tests_02.dtt_iv_8x8_i.rst
dct_tests_02.dtt_iv_8x8_i.clk
dct_tests_02.dtt_iv_8x8_i.start
@22
dct_tests_02.dtt_iv_8x8_i.mode[1:0]
@420
dct_tests_02.dtt_iv_8x8_i.xin[23:0]
@8420
dct_tests_02.dtt_iv_8x8_i.xin[23:0]
@28
dct_tests_02.dtt_iv_8x8_i.pre_last_in
dct_tests_02.dtt_iv_8x8_i.pre_first_out
@29
dct_tests_02.dtt_iv_8x8_i.pre_busy
@28
dct_tests_02.dtt_iv_8x8_i.dv
@420
dct_tests_02.dtt_iv_8x8_i.d_out[23:0]
@8420
dct_tests_02.dtt_iv_8x8_i.d_out[23:0]
@800200
-debug
@28
dct_tests_02.dtt_iv_8x8_i.transpose_start
@420
dct_tests_02.dtt_iv_8x8_i.dcth_dout0[23:0]
@8420
dct_tests_02.dtt_iv_8x8_i.dcth_dout0[23:0]
@420
dct_tests_02.dtt_iv_8x8_i.dcth_dout1[23:0]
@8420
dct_tests_02.dtt_iv_8x8_i.dcth_dout1[23:0]
@22
dct_tests_02.dtt_iv_8x8_i.transpose_debug_di[7:0]
@8022
dct_tests_02.dtt_iv_8x8_i.transpose_debug_di[7:0]
@420
dct_tests_02.dtt_iv_8x8_i.transpose_di[23:0]
@8420
dct_tests_02.dtt_iv_8x8_i.transpose_di[23:0]
@c00022
dct_tests_02.dtt_iv_8x8_i.transpose_wa[7:0]
@28
(0)dct_tests_02.dtt_iv_8x8_i.transpose_wa[7:0]
(1)dct_tests_02.dtt_iv_8x8_i.transpose_wa[7:0]
(2)dct_tests_02.dtt_iv_8x8_i.transpose_wa[7:0]
(3)dct_tests_02.dtt_iv_8x8_i.transpose_wa[7:0]
(4)dct_tests_02.dtt_iv_8x8_i.transpose_wa[7:0]
(5)dct_tests_02.dtt_iv_8x8_i.transpose_wa[7:0]
(6)dct_tests_02.dtt_iv_8x8_i.transpose_wa[7:0]
(7)dct_tests_02.dtt_iv_8x8_i.transpose_wa[7:0]
@1401200
-group_end
@c08022
dct_tests_02.dtt_iv_8x8_i.transpose_wa[7:0]
@28
(0)dct_tests_02.dtt_iv_8x8_i.transpose_wa[7:0]
(1)dct_tests_02.dtt_iv_8x8_i.transpose_wa[7:0]
(2)dct_tests_02.dtt_iv_8x8_i.transpose_wa[7:0]
(3)dct_tests_02.dtt_iv_8x8_i.transpose_wa[7:0]
(4)dct_tests_02.dtt_iv_8x8_i.transpose_wa[7:0]
(5)dct_tests_02.dtt_iv_8x8_i.transpose_wa[7:0]
(6)dct_tests_02.dtt_iv_8x8_i.transpose_wa[7:0]
(7)dct_tests_02.dtt_iv_8x8_i.transpose_wa[7:0]
@1401200
-group_end
@28
(0)dct_tests_02.dtt_iv_8x8_i.transpose_we[1:0]
dct_tests_02.dtt_iv_8x8_i.pre_dsth
@8022
dct_tests_02.dtt_iv_8x8_i.transpose_cntr[6:0]
@22
dct_tests_02.dtt_iv_8x8_i.transpose_ra[7:0]
dct_tests_02.dtt_iv_8x8_i.transpose_reg[23:0]
@420
dct_tests_02.dtt_iv_8x8_i.transpose_out[23:0]
@8420
dct_tests_02.dtt_iv_8x8_i.transpose_out[23:0]
@22
dct_tests_02.dtt_iv_8x8_i.dctv_xin0[23:0]
dct_tests_02.dtt_iv_8x8_i.dctv_xin1[23:0]
@28
dct_tests_02.dtt_iv_8x8_i.dctv_start_0_r
dct_tests_02.dtt_iv_8x8_i.dctv_start_1_r
dct_tests_02.dtt_iv_8x8_i.dctv_out_sel
@800028
dct_tests_02.dtt_iv_8x8_i.pre2_dstv[1:0]
@28
(0)dct_tests_02.dtt_iv_8x8_i.pre2_dstv[1:0]
(1)dct_tests_02.dtt_iv_8x8_i.pre2_dstv[1:0]
@1001200
-group_end
@420
[color] 3
dct_tests_02.dtt_iv_8x8_i.dctv_dout0[23:0]
[color] 2
dct_tests_02.dtt_iv_8x8_i.dctv_dout1[23:0]
@8420
dct_tests_02.dtt_iv_8x8_i.dctv_dout0[23:0]
dct_tests_02.dtt_iv_8x8_i.dctv_dout1[23:0]
@420
dct_tests_02.dtt_iv_8x8_i.debug_dctv_dout[23:0]
@8420
[color] 5
dct_tests_02.dtt_iv_8x8_i.debug_dctv_dout[23:0]
@c00022
[color] 6
dct_tests_02.dtt_iv_8x8_i.dctv_out_cntr[6:0]
@28
[color] 6
(0)dct_tests_02.dtt_iv_8x8_i.dctv_out_cntr[6:0]
[color] 6
(1)dct_tests_02.dtt_iv_8x8_i.dctv_out_cntr[6:0]
[color] 6
(2)dct_tests_02.dtt_iv_8x8_i.dctv_out_cntr[6:0]
[color] 6
(3)dct_tests_02.dtt_iv_8x8_i.dctv_out_cntr[6:0]
[color] 6
(4)dct_tests_02.dtt_iv_8x8_i.dctv_out_cntr[6:0]
[color] 6
(5)dct_tests_02.dtt_iv_8x8_i.dctv_out_cntr[6:0]
[color] 6
(6)dct_tests_02.dtt_iv_8x8_i.dctv_out_cntr[6:0]
@1401200
-group_end
@28
[color] 7
dct_tests_02.dtt_iv_8x8_i.dctv_out_sel
[color] 2
dct_tests_02.dtt_iv_8x8_i.dctv_out_run
dct_tests_02.dtt_iv_8x8_i.dctv_out_start_1
@22
dct_tests_02.dtt_iv_8x8_i.dctv_out_wa[4:0]
@c00028
dct_tests_02.dtt_iv_8x8_i.dctv_out_we[1:0]
@28
(0)dct_tests_02.dtt_iv_8x8_i.dctv_out_we[1:0]
(1)dct_tests_02.dtt_iv_8x8_i.dctv_out_we[1:0]
@1401200
-group_end
@1000200
-debug
@22
dct_tests_02.dtt_iv_8x8_i.mode_out[1:0]
@28
dct_tests_02.dtt_iv_8x8_i.pre_first_out_w
@8420
dct_tests_02.dtt_iv_8x8_i.d_out[23:0]
@28
dct_tests_02.dtt_iv_8x8_i.dv
dct_tests_02.dtt_iv_8x8_i.pre_first_out
dct_tests_02.dtt_iv_8x8_i.pre_busy
dct_tests_02.dtt_iv_8x8_i.pre_first_out
@c00200
-direct_internal
@28
dct_tests_02.dtt_iv_8x8_i.dcth_en0
dct_tests_02.dtt_iv_8x8_i.dcth_en1
dct_tests_02.dtt_iv_8x8_i.dcth_start_0_r
dct_tests_02.dtt_iv_8x8_i.dcth_start_1_r
@22
dct_tests_02.dtt_iv_8x8_i.mode[1:0]
dct_tests_02.dtt_iv_8x8_i.mode_h[1:0]
dct_tests_02.dtt_iv_8x8_i.mode_h_late[1:0]
dct_tests_02.dtt_iv_8x8_i.mode_v[1:0]
dct_tests_02.dtt_iv_8x8_i.mode_out[1:0]
@28
dct_tests_02.dtt_iv_8x8_i.dctv_start_0_w
@22
dct_tests_02.dtt_iv_8x8_i.dctv_start_1_w
@800028
dct_tests_02.dtt_iv_8x8_i.pre2_dsth[1:0]
@28
(0)dct_tests_02.dtt_iv_8x8_i.pre2_dsth[1:0]
(1)dct_tests_02.dtt_iv_8x8_i.pre2_dsth[1:0]
@1001200
-group_end
@200
-
@800028
dct_tests_02.dtt_iv_8x8_i.pre2_dstv[1:0]
@28
(0)dct_tests_02.dtt_iv_8x8_i.pre2_dstv[1:0]
(1)dct_tests_02.dtt_iv_8x8_i.pre2_dstv[1:0]
@22
dct_tests_02.dtt_iv_8x8_i.dctv_out_cntr[6:0]
@800200
-g3
@28
dct_tests_02.dtt_iv_8x8_i.dct_iv8_1d_pass2_0_i.start
dct_tests_02.dtt_iv_8x8_i.dct_iv8_1d_pass2_0_i.dst_in
dct_tests_02.dtt_iv_8x8_i.dct_iv8_1d_pass2_0_i.dst_out
@1000200
-g3
@28
dct_tests_02.dtt_iv_8x8_i.dct_iv8_1d_pass2_1_i.start
dct_tests_02.dtt_iv_8x8_i.dct_iv8_1d_pass2_1_i.dst_in
dct_tests_02.dtt_iv_8x8_i.dct_iv8_1d_pass2_1_i.dst_out
@200
-
@1001200
-group_end
@1401200
-direct_internal
@1000200
-dtt_iv8x8_direct
@800200
-dtt_iv8x8_inv
@28
dct_tests_02.dtt_iv_8x8r_i.clk
dct_tests_02.dtt_iv_8x8r_i.start
dct_tests_02.dtt_iv_8x8r_i.mode[1:0]
@420
dct_tests_02.dtt_iv_8x8r_i.xin[23:0]
@8420
dct_tests_02.dtt_iv_8x8r_i.xin[23:0]
@28
dct_tests_02.dtt_iv_8x8r_i.mode_out[1:0]
@800200
-inv_internals
@28
dct_tests_02.dtt_iv_8x8r_i.transpose_start
@8420
dct_tests_02.dtt_iv_8x8r_i.dcth_dout0[23:0]
dct_tests_02.dtt_iv_8x8r_i.dcth_dout1[23:0]
dct_tests_02.dtt_iv_8x8r_i.transpose_out[23:0]
@200
-
@1000200
-inv_internals
@200
-
@1000200
-dtt_iv8x8_inv
@200
-dbg
[pattern_trace] 1
[pattern_trace] 0
[*]
[*] GTKWave Analyzer v3.3.78 (w)1999-2016 BSI
[*] Sat Dec 9 23:05:14 2017
[*]
[dumpfile] "/home/eyesis/nc393/elphel393/fpga-elphel/x393_branch_dct/simulation/dct_tests_03-20171209160023169.fst"
[dumpfile_mtime] "Sat Dec 9 23:00:23 2017"
[dumpfile_size] 225733
[savefile] "/home/eyesis/nc393/elphel393/fpga-elphel/x393_branch_dct/dct_tests_03.sav"
[timestart] 0
[size] 1920 1171
[pos] -1920 40
*-20.492632 1605000 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1
[treeopen] dct_tests_03.
[treeopen] dct_tests_03.dtt_iv_8x8_i.
[treeopen] dct_tests_03.dtt_iv_8x8r_i.
[sst_width] 318
[signals_width] 287
[sst_expanded] 1
[sst_vpaned_height] 344
@420
dct_tests_03.i
dct_tests_03.i1
dct_tests_03.j
@28
dct_tests_03.CLK
dct_tests_03.RST
[color] 2
dct_tests_03.start
[color] 2
dct_tests_03.start2
@22
dct_tests_03.mode_in[1:0]
@420
dct_tests_03.x_in_2d[23:0]
@8420
dct_tests_03.x_in_2d[23:0]
@22
dct_tests_03.mode_out[1:0]
@420
dct_tests_03.d_out_2dr[23:0]
@8420
dct_tests_03.d_out_2dr[23:0]
@800200
-dtt_iv8x8_direct
@28
dct_tests_03.dtt_iv_8x8_i.rst
dct_tests_03.dtt_iv_8x8_i.clk
dct_tests_03.dtt_iv_8x8_i.start
@22
dct_tests_03.dtt_iv_8x8_i.mode[1:0]
@420
dct_tests_03.dtt_iv_8x8_i.xin[23:0]
@8420
dct_tests_03.dtt_iv_8x8_i.xin[23:0]
@28
dct_tests_03.dtt_iv_8x8_i.pre_last_in
@800200
-debug
@28
dct_tests_03.dtt_iv_8x8_i.transpose_start
@420
dct_tests_03.dtt_iv_8x8_i.dcth_dout0[23:0]
@8420
dct_tests_03.dtt_iv_8x8_i.dcth_dout0[23:0]
@420
dct_tests_03.dtt_iv_8x8_i.dcth_dout1[23:0]
@8420
dct_tests_03.dtt_iv_8x8_i.dcth_dout1[23:0]
@22
dct_tests_03.dtt_iv_8x8_i.transpose_debug_di[7:0]
@8022
dct_tests_03.dtt_iv_8x8_i.transpose_debug_di[7:0]
@420
dct_tests_03.dtt_iv_8x8_i.transpose_di[23:0]
@8420
dct_tests_03.dtt_iv_8x8_i.transpose_di[23:0]
@c00022
dct_tests_03.dtt_iv_8x8_i.transpose_wa[7:0]
@28
(0)dct_tests_03.dtt_iv_8x8_i.transpose_wa[7:0]
(1)dct_tests_03.dtt_iv_8x8_i.transpose_wa[7:0]
(2)dct_tests_03.dtt_iv_8x8_i.transpose_wa[7:0]
(3)dct_tests_03.dtt_iv_8x8_i.transpose_wa[7:0]
(4)dct_tests_03.dtt_iv_8x8_i.transpose_wa[7:0]
(5)dct_tests_03.dtt_iv_8x8_i.transpose_wa[7:0]
(6)dct_tests_03.dtt_iv_8x8_i.transpose_wa[7:0]
(7)dct_tests_03.dtt_iv_8x8_i.transpose_wa[7:0]
@1401200
-group_end
@c08022
dct_tests_03.dtt_iv_8x8_i.transpose_wa[7:0]
@28
(0)dct_tests_03.dtt_iv_8x8_i.transpose_wa[7:0]
(1)dct_tests_03.dtt_iv_8x8_i.transpose_wa[7:0]
(2)dct_tests_03.dtt_iv_8x8_i.transpose_wa[7:0]
(3)dct_tests_03.dtt_iv_8x8_i.transpose_wa[7:0]
(4)dct_tests_03.dtt_iv_8x8_i.transpose_wa[7:0]
(5)dct_tests_03.dtt_iv_8x8_i.transpose_wa[7:0]
(6)dct_tests_03.dtt_iv_8x8_i.transpose_wa[7:0]
(7)dct_tests_03.dtt_iv_8x8_i.transpose_wa[7:0]
@1401200
-group_end
@28
(0)dct_tests_03.dtt_iv_8x8_i.transpose_we[1:0]
dct_tests_03.dtt_iv_8x8_i.pre_dsth
@8022
dct_tests_03.dtt_iv_8x8_i.transpose_cntr[6:0]
@22
dct_tests_03.dtt_iv_8x8_i.transpose_ra[7:0]
dct_tests_03.dtt_iv_8x8_i.transpose_reg[23:0]
@420
dct_tests_03.dtt_iv_8x8_i.transpose_out[23:0]
@8420
dct_tests_03.dtt_iv_8x8_i.transpose_out[23:0]
@22
dct_tests_03.dtt_iv_8x8_i.dctv_xin0[23:0]
dct_tests_03.dtt_iv_8x8_i.dctv_xin1[23:0]
@28
dct_tests_03.dtt_iv_8x8_i.dctv_start_0_r
dct_tests_03.dtt_iv_8x8_i.dctv_start_1_r
dct_tests_03.dtt_iv_8x8_i.dctv_out_sel
@800028
dct_tests_03.dtt_iv_8x8_i.pre2_dstv[1:0]
@28
(0)dct_tests_03.dtt_iv_8x8_i.pre2_dstv[1:0]
(1)dct_tests_03.dtt_iv_8x8_i.pre2_dstv[1:0]
@1001200
-group_end
@420
[color] 3
dct_tests_03.dtt_iv_8x8_i.dctv_dout0[23:0]
[color] 2
dct_tests_03.dtt_iv_8x8_i.dctv_dout1[23:0]
@8420
dct_tests_03.dtt_iv_8x8_i.dctv_dout0[23:0]
dct_tests_03.dtt_iv_8x8_i.dctv_dout1[23:0]
@420
dct_tests_03.dtt_iv_8x8_i.debug_dctv_dout[23:0]
@8420
[color] 5
dct_tests_03.dtt_iv_8x8_i.debug_dctv_dout[23:0]
@c00022
[color] 6
dct_tests_03.dtt_iv_8x8_i.dctv_out_cntr[6:0]
@28
[color] 6
(0)dct_tests_03.dtt_iv_8x8_i.dctv_out_cntr[6:0]
[color] 6
(1)dct_tests_03.dtt_iv_8x8_i.dctv_out_cntr[6:0]
[color] 6
(2)dct_tests_03.dtt_iv_8x8_i.dctv_out_cntr[6:0]
[color] 6
(3)dct_tests_03.dtt_iv_8x8_i.dctv_out_cntr[6:0]
[color] 6
(4)dct_tests_03.dtt_iv_8x8_i.dctv_out_cntr[6:0]
[color] 6
(5)dct_tests_03.dtt_iv_8x8_i.dctv_out_cntr[6:0]
[color] 6
(6)dct_tests_03.dtt_iv_8x8_i.dctv_out_cntr[6:0]
@1401200
-group_end
@28
[color] 7
dct_tests_03.dtt_iv_8x8_i.dctv_out_sel
[color] 2
dct_tests_03.dtt_iv_8x8_i.dctv_out_run
dct_tests_03.dtt_iv_8x8_i.dctv_out_start_1
@c00028
dct_tests_03.dtt_iv_8x8_i.dctv_out_we[1:0]
@28
(0)dct_tests_03.dtt_iv_8x8_i.dctv_out_we[1:0]
(1)dct_tests_03.dtt_iv_8x8_i.dctv_out_we[1:0]
@1401200
-group_end
@22
dct_tests_03.dtt_iv_8x8_i.debug_dctv_dout[23:0]
@28
dct_tests_03.dtt_iv_8x8_i.dctv_out_sel
dct_tests_03.dtt_iv_8x8_i.pre_dstv
@200
-alt
@28
dct_tests_03.dtt_iv_8x8_i.dstv
dct_tests_03.dtt_iv_8x8_i.out_sel
dct_tests_03.dtt_iv_8x8_i.out_run
@22
dct_tests_03.dtt_iv_8x8_i.out_cntr[6:0]
@28
dct_tests_03.dtt_iv_8x8_i.out_sel
@22
dct_tests_03.dtt_iv_8x8_i.out_wd[23:0]
@c00022
dct_tests_03.dtt_iv_8x8_i.out_wa[3:0]
@28
(0)dct_tests_03.dtt_iv_8x8_i.out_wa[3:0]
(1)dct_tests_03.dtt_iv_8x8_i.out_wa[3:0]
(2)dct_tests_03.dtt_iv_8x8_i.out_wa[3:0]
(3)dct_tests_03.dtt_iv_8x8_i.out_wa[3:0]
@1401200
-group_end
@28
dct_tests_03.dtt_iv_8x8_i.out_we
dct_tests_03.dtt_iv_8x8_i.sub16
dct_tests_03.dtt_iv_8x8_i.inc16
dct_tests_03.dtt_iv_8x8_i.start_out
@200
-top
@22
dct_tests_03.out_ram_wa[4:0]
@28
dct_tests_03.out_ram_cntr
dct_tests_03.out_ram_wah
@22
dct_tests_03.out_wa[3:0]
dct_tests_03.out_wd[23:0]
@28
dct_tests_03.out_we
dct_tests_03.out_ram_ren
dct_tests_03.out_ram_regen
@22
dct_tests_03.out_ram_ra[5:0]
@8420
dct_tests_03.out_ram_r[23:0]
dct_tests_03.out_ram_r2[23:0]
@29
dct_tests_03.out_pre_first
@28
dct_tests_03.out_ram_dv
@1000200
-debug
@22
dct_tests_03.dtt_iv_8x8_i.mode_out[1:0]
@28
dct_tests_03.dtt_iv_8x8_i.pre_first_out_w
dct_tests_03.dtt_iv_8x8_i.pre_busy
@c00200
-direct_internal
@28
dct_tests_03.dtt_iv_8x8_i.dcth_en0
dct_tests_03.dtt_iv_8x8_i.dcth_en1
dct_tests_03.dtt_iv_8x8_i.dcth_start_0_r
dct_tests_03.dtt_iv_8x8_i.dcth_start_1_r
@22
dct_tests_03.dtt_iv_8x8_i.mode[1:0]
dct_tests_03.dtt_iv_8x8_i.mode_h[1:0]
dct_tests_03.dtt_iv_8x8_i.mode_h_late[1:0]
dct_tests_03.dtt_iv_8x8_i.mode_v[1:0]
dct_tests_03.dtt_iv_8x8_i.mode_out[1:0]
@28
dct_tests_03.dtt_iv_8x8_i.dctv_start_0_w
@22
dct_tests_03.dtt_iv_8x8_i.dctv_start_1_w
@800028
dct_tests_03.dtt_iv_8x8_i.pre2_dsth[1:0]
@28
(0)dct_tests_03.dtt_iv_8x8_i.pre2_dsth[1:0]
(1)dct_tests_03.dtt_iv_8x8_i.pre2_dsth[1:0]
@1001200
-group_end
@200
-
@800028
dct_tests_03.dtt_iv_8x8_i.pre2_dstv[1:0]
@28
(0)dct_tests_03.dtt_iv_8x8_i.pre2_dstv[1:0]
(1)dct_tests_03.dtt_iv_8x8_i.pre2_dstv[1:0]
@22
dct_tests_03.dtt_iv_8x8_i.dctv_out_cntr[6:0]
@800200
-g3
@28
dct_tests_03.dtt_iv_8x8_i.dct_iv8_1d_pass2_0_i.start
dct_tests_03.dtt_iv_8x8_i.dct_iv8_1d_pass2_0_i.dst_in
dct_tests_03.dtt_iv_8x8_i.dct_iv8_1d_pass2_0_i.dst_out
@1000200
-g3
@28
dct_tests_03.dtt_iv_8x8_i.dct_iv8_1d_pass2_1_i.start
dct_tests_03.dtt_iv_8x8_i.dct_iv8_1d_pass2_1_i.dst_in
dct_tests_03.dtt_iv_8x8_i.dct_iv8_1d_pass2_1_i.dst_out
@200
-
@1001200
-group_end
@1401200
-direct_internal
@1000200
-dtt_iv8x8_direct
@800200
-dtt_iv8x8_inv
@28
dct_tests_03.dtt_iv_8x8r_i.clk
dct_tests_03.dtt_iv_8x8r_i.start
dct_tests_03.dtt_iv_8x8r_i.mode[1:0]
@420
dct_tests_03.dtt_iv_8x8r_i.xin[23:0]
@8420
dct_tests_03.dtt_iv_8x8r_i.xin[23:0]
@28
dct_tests_03.dtt_iv_8x8r_i.mode_out[1:0]
@800200
-inv_internals
@28
dct_tests_03.dtt_iv_8x8r_i.transpose_start
@8420
dct_tests_03.dtt_iv_8x8r_i.dcth_dout0[23:0]
dct_tests_03.dtt_iv_8x8r_i.dcth_dout1[23:0]
dct_tests_03.dtt_iv_8x8r_i.transpose_out[23:0]
@200
-
@1000200
-inv_internals
@200
-
@1000200
-dtt_iv8x8_inv
@200
-dbg
[pattern_trace] 1
[pattern_trace] 0
[*]
[*] GTKWave Analyzer v3.3.78 (w)1999-2016 BSI
[*] Wed Dec 13 06:00:34 2017
[*]
[dumpfile] "/home/eyesis/nc393/elphel393/fpga-elphel/x393_branch_dct/simulation/dct_tests_04-20171212192023266.fst"
[dumpfile_mtime] "Wed Dec 13 02:20:23 2017"
[dumpfile_size] 219185
[savefile] "/home/eyesis/nc393/elphel393/fpga-elphel/x393_branch_dct/dct_tests_04.sav"
[timestart] 1588000
[size] 1814 1171
[pos] 0 40
*-15.492632 1795000 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1
[treeopen] dct_tests_04.
[treeopen] dct_tests_04.dtt_iv_8x8_i.
[treeopen] dct_tests_04.dtt_iv_8x8r_i.
[sst_width] 318
[signals_width] 284
[sst_expanded] 1
[sst_vpaned_height] 344
@420
dct_tests_04.i
dct_tests_04.i1
dct_tests_04.j
@28
dct_tests_04.CLK
dct_tests_04.RST
[color] 2
dct_tests_04.start
[color] 2
dct_tests_04.start2
@22
dct_tests_04.mode_in[1:0]
@8420
dct_tests_04.x_in_2d[24:0]
@22
dct_tests_04.mode_out[1:0]
@8420
dct_tests_04.d_out_2dr[24:0]
@800200
-dtt_iv8x8_direct
@28
dct_tests_04.dtt_iv_8x8_i.rst
dct_tests_04.dtt_iv_8x8_i.clk
dct_tests_04.dtt_iv_8x8_i.start
@22
dct_tests_04.dtt_iv_8x8_i.mode[1:0]
@28
dct_tests_04.dtt_iv_8x8_i.pre_last_in
dct_tests_04.dtt_iv_8x8_i.pre_busy
@c00200
-debug
@28
dct_tests_04.dtt_iv_8x8_i.transpose_start
@22
dct_tests_04.dtt_iv_8x8_i.transpose_debug_di[7:0]
@8022
dct_tests_04.dtt_iv_8x8_i.transpose_debug_di[7:0]
@c00022
dct_tests_04.dtt_iv_8x8_i.transpose_wa[7:0]
@28
(0)dct_tests_04.dtt_iv_8x8_i.transpose_wa[7:0]
(1)dct_tests_04.dtt_iv_8x8_i.transpose_wa[7:0]
(2)dct_tests_04.dtt_iv_8x8_i.transpose_wa[7:0]
(3)dct_tests_04.dtt_iv_8x8_i.transpose_wa[7:0]
(4)dct_tests_04.dtt_iv_8x8_i.transpose_wa[7:0]
(5)dct_tests_04.dtt_iv_8x8_i.transpose_wa[7:0]
(6)dct_tests_04.dtt_iv_8x8_i.transpose_wa[7:0]
(7)dct_tests_04.dtt_iv_8x8_i.transpose_wa[7:0]
@1401200
-group_end
@c08022
dct_tests_04.dtt_iv_8x8_i.transpose_wa[7:0]
@28
(0)dct_tests_04.dtt_iv_8x8_i.transpose_wa[7:0]
(1)dct_tests_04.dtt_iv_8x8_i.transpose_wa[7:0]
(2)dct_tests_04.dtt_iv_8x8_i.transpose_wa[7:0]
(3)dct_tests_04.dtt_iv_8x8_i.transpose_wa[7:0]
(4)dct_tests_04.dtt_iv_8x8_i.transpose_wa[7:0]
(5)dct_tests_04.dtt_iv_8x8_i.transpose_wa[7:0]
(6)dct_tests_04.dtt_iv_8x8_i.transpose_wa[7:0]
(7)dct_tests_04.dtt_iv_8x8_i.transpose_wa[7:0]
@1401200
-group_end
@28
(0)dct_tests_04.dtt_iv_8x8_i.transpose_we[1:0]
dct_tests_04.dtt_iv_8x8_i.pre_dsth
@8022
dct_tests_04.dtt_iv_8x8_i.transpose_cntr[6:0]
@22
dct_tests_04.dtt_iv_8x8_i.transpose_ra[7:0]
@28
dct_tests_04.dtt_iv_8x8_i.dctv_start_0_r
dct_tests_04.dtt_iv_8x8_i.dctv_start_1_r
@800028
dct_tests_04.dtt_iv_8x8_i.pre2_dstv[1:0]
@28
(0)dct_tests_04.dtt_iv_8x8_i.pre2_dstv[1:0]
(1)dct_tests_04.dtt_iv_8x8_i.pre2_dstv[1:0]
@1001200
-group_end
@c00028
[color] 2
dct_tests_04.dtt_iv_8x8_i.dctv_out_we[1:0]
@28
(0)dct_tests_04.dtt_iv_8x8_i.dctv_out_we[1:0]
(1)dct_tests_04.dtt_iv_8x8_i.dctv_out_we[1:0]
@1401200
-group_end
@28
dct_tests_04.dtt_iv_8x8_i.pre_dstv
@200
-alt
@28
dct_tests_04.dtt_iv_8x8_i.dstv
dct_tests_04.dtt_iv_8x8_i.out_sel
dct_tests_04.dtt_iv_8x8_i.out_run
@22
dct_tests_04.dtt_iv_8x8_i.out_cntr[6:0]
@28
dct_tests_04.dtt_iv_8x8_i.out_sel
@c00022
dct_tests_04.dtt_iv_8x8_i.out_wa[3:0]
@28
(0)dct_tests_04.dtt_iv_8x8_i.out_wa[3:0]
(1)dct_tests_04.dtt_iv_8x8_i.out_wa[3:0]
(2)dct_tests_04.dtt_iv_8x8_i.out_wa[3:0]
(3)dct_tests_04.dtt_iv_8x8_i.out_wa[3:0]
@1401200
-group_end
@28
dct_tests_04.dtt_iv_8x8_i.out_we
dct_tests_04.dtt_iv_8x8_i.sub16
dct_tests_04.dtt_iv_8x8_i.inc16
dct_tests_04.dtt_iv_8x8_i.start_out
@200
-top
@22
dct_tests_04.out_ram_wa[4:0]
@28
dct_tests_04.out_ram_cntr
dct_tests_04.out_ram_wah
@22
dct_tests_04.out_wa[3:0]
@28
dct_tests_04.out_we
dct_tests_04.out_ram_ren
dct_tests_04.out_ram_regen
@22
dct_tests_04.out_ram_ra[5:0]
@28
dct_tests_04.out_pre_first
dct_tests_04.out_ram_dv
@1401200
-debug
@22
dct_tests_04.dtt_iv_8x8_i.mode_out[1:0]
@28
dct_tests_04.dtt_iv_8x8_i.pre_busy
@c00200
-direct_internal
@28
dct_tests_04.dtt_iv_8x8_i.dcth_en0
dct_tests_04.dtt_iv_8x8_i.dcth_en1
dct_tests_04.dtt_iv_8x8_i.dcth_start_0_r
dct_tests_04.dtt_iv_8x8_i.dcth_start_1_r
@22
dct_tests_04.dtt_iv_8x8_i.mode[1:0]
dct_tests_04.dtt_iv_8x8_i.mode_h[1:0]
dct_tests_04.dtt_iv_8x8_i.mode_h_late[1:0]
dct_tests_04.dtt_iv_8x8_i.mode_v[1:0]
dct_tests_04.dtt_iv_8x8_i.mode_out[1:0]
@28
dct_tests_04.dtt_iv_8x8_i.dctv_start_0_w
@22
dct_tests_04.dtt_iv_8x8_i.dctv_start_1_w
@800028
dct_tests_04.dtt_iv_8x8_i.pre2_dsth[1:0]
@28
(0)dct_tests_04.dtt_iv_8x8_i.pre2_dsth[1:0]
(1)dct_tests_04.dtt_iv_8x8_i.pre2_dsth[1:0]
@1001200
-group_end
@200
-
@800028
dct_tests_04.dtt_iv_8x8_i.pre2_dstv[1:0]
@28
(0)dct_tests_04.dtt_iv_8x8_i.pre2_dstv[1:0]
(1)dct_tests_04.dtt_iv_8x8_i.pre2_dstv[1:0]
@800200
-g3
@28
dct_tests_04.dtt_iv_8x8_i.dct_iv8_1d_pass2_0_i.start
dct_tests_04.dtt_iv_8x8_i.dct_iv8_1d_pass2_0_i.dst_in
dct_tests_04.dtt_iv_8x8_i.dct_iv8_1d_pass2_0_i.dst_out
@1000200
-g3
@28
dct_tests_04.dtt_iv_8x8_i.dct_iv8_1d_pass2_1_i.start
dct_tests_04.dtt_iv_8x8_i.dct_iv8_1d_pass2_1_i.dst_in
dct_tests_04.dtt_iv_8x8_i.dct_iv8_1d_pass2_1_i.dst_out
@200
-
@1001200
-group_end
@1401200
-direct_internal
@1000200
-dtt_iv8x8_direct
@800200
-dtt_iv8x8_inv
@29
dct_tests_04.dtt_iv_8x8r_i.clk
@28
dct_tests_04.dtt_iv_8x8r_i.start
dct_tests_04.dtt_iv_8x8r_i.mode[1:0]
dct_tests_04.dtt_iv_8x8r_i.mode_out[1:0]
@800200
-inv_internals
@200
-
@1000200
-inv_internals
@200
-
@1000200
-dtt_iv8x8_inv
@200
-dbg
[pattern_trace] 1
[pattern_trace] 0
This diff is collapsed.
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from __future__ import print_function
from __future__ import division
# Copyright (C) 2017, Elphel.inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
'''
Calculate ROM for MCLT fold indices:
A0..A2 - sample column in folded 8x8 tile
A3..A5 - sample row in folded 8x8 tile
A6..A7 - variant, folding to the same 8x8 sample
D0..D4 - pixel column in 16x16 tile
D5..D7 - pixel row in 16x16 tile
D8 - negate for mode 0 (CC)
D9 - negate for mode 1 (SC)
D10 - negate for mode 2 (CS)
D11 - negate for mode 3 (SS)
'''
__author__ = "Andrey Filippov"
__copyright__ = "Copyright 2017, Elphel, Inc."
__license__ = "GPL"
__version__ = "3.0+"
__maintainer__ = "Andrey Filippov"
__email__ = "andrey@elphel.com"
__status__ = "Development"
import sys
import math
import os
import datetime
mclt_wnd_rom_path= '../includes/mclt_fold_rom.vh'
def create_with_parity (init_data, # numeric data (may be less than full array
num_bits, # number of bits in item, valid: 1,2,4,8,9,16,18,32,36,64,72
full_bram): # true if ramb36, false - ramb18
d = num_bits
num_bits8 = 1;
while d > 1:
d >>= 1
num_bits8 <<= 1
bsize = (0x4000,0x8000)[full_bram]
bdata = [0 for i in range(bsize)]
sb = 0
for item in init_data:
for bt in range (num_bits8):
bdata[sb+bt] = (item >> bt) & 1;
sb += num_bits8
data = []
for i in range (len(bdata)//256):
d = 0;
for b in range(255, -1,-1):
d = (d<<1) + bdata[256*i+b]
data.append(d)
data_p = []
num_bits_p = num_bits8 >> 3
sb = 0
print ("num_bits=",num_bits)
print ("num_bits8=",num_bits8)
print ("num_bits_p=",num_bits_p)
if num_bits_p:
pbsize = bsize >> 3
pbdata = [0 for i in range(pbsize)]
for item in init_data:
for bt in range (num_bits_p):
pbdata[sb+bt] = (item >> (bt+num_bits8)) & 1;
sb += num_bits_p
for i in range (len(pbdata)//256):
d = 0;
for b in range(255, -1,-1):
d = (d<<1) + pbdata[256*i+b]
data_p.append(d)
return {'data':data,'data_p':data_p}
def print_params(data,
out_file_name,
comment=""): # text to add to the file header
with open(out_file_name,"w") as out_file:
print ("// Created with "+sys.argv[0], file=out_file)
if comment:
print (comment, file=out_file)
for i, v in enumerate(data['data']):
if v:
print (", .INIT_%02X (256'h%064X)"%(i,v), file=out_file)
# if (include_parity):
for i, v in enumerate(data['data_p']):
if v:
print (", .INITP_%02X (256'h%064X)"%(i,v), file=out_file)
def get_fold_indices(x, n = 8):
n1 = n >> 1
# ind = [[0,0,0,0,0,0],[0,0,0,0,0,0]]# new int[2][6];
ind = [[0,0,0,0],[0,0,0,0]]# new int[2][6];
if x < n1:
ind[0][0] = n + n1 - x - 1 #// C: -cR, S: +cR
ind[0][1] = n1 + x
ind[0][2] = -1
ind[0][3] = 1
# ind[0][4] = n1 - x -1
# ind[0][5] = -1 #// c - window derivative over shift is negative
ind[1][0] = n + n1 + x#; // C: -d, S: -d
ind[1][1] = n1 - x - 1
ind[1][2] = -1
ind[1][3] = -1
# ind[1][4] = n1 + x;
# ind[1][5] = -1# // d - window derivative over shift is negative
else:
x-=n1;
ind[0][0] = x# // C: +a, S: +a
ind[0][1] = x
ind[0][2] = 1
ind[0][3] = 1
# ind[0][4] = n - x - 1
# ind[0][5] = 1# // a - window derivative over shift is positive
ind[1][0] = n - x - 1# // C: -bR, S: +bR
ind[1][1] = n - x - 1
ind[1][2] = -1
ind[1][3] = 1
# ind[1][4] = x
# ind[1][5] = 1# // b - window derivative over shift is positive
return ind
def create_fold(n = 8): # n - DCT and window size
# fold_index = (n*n) * [4*[0]] # new int[n*n][4];
fold_index = []
for _ in range(n*n):
fold_index.append([0,0,0,0])
# fold_k = new double[4][n*n][4];
# fold_signs = 4 * [(n*n) * [4*[0]]]
# fold_signs = 4 * [(n*n) * [4*[0]]]
fold_signs = []
for _ in range(4):
a = []
for _a in range(n*n):
a.append([0,0,0,0])
fold_signs.append(a)
print("fold_signs=",fold_signs)
vert_ind = [0,0] # new int[2];
vert_k = [[0,0],[0,0]] #new double[2][2];
hor_ind = [0,0] # new int[2];
hor_k = [[0,0],[0,0]] #new double[2][2];
#int [][] fi;
n2 = 2 * n;
for i in range(n): # (int i = 0; i < n; i++ ){
fi = get_fold_indices(i,n)
vert_ind[0] = fi[0][0];
vert_ind[1] = fi[1][0];
vert_k[0][0] = fi[0][2]# * hwindow[fi[0][1]]; // use cosine sign
vert_k[0][1] = fi[1][2]# * hwindow[fi[1][1]]; // use cosine sign
vert_k[1][0] = fi[0][3]# * hwindow[fi[0][1]]; // use sine sign
vert_k[1][1] = fi[1][3]# * hwindow[fi[1][1]]; // use sine sign
for j in range(n): # (int j = 0; j < n; j++ ){
fi = get_fold_indices(j,n)
hor_ind[0] = fi[0][0];
hor_ind[1] = fi[1][0];
hor_k[0][0] = fi[0][2]# * hwindow[fi[0][1]]; // use cosine sign
hor_k[0][1] = fi[1][2]# * hwindow[fi[1][1]]; // use cosine sign
hor_k[1][0] = fi[0][3]# * hwindow[fi[0][1]]; // use sine sign
hor_k[1][1] = fi[1][3]# * hwindow[fi[1][1]]; // use sine sign
indx = n * i + j
for k in range(4): #(int k = 0; k<4;k++) {
fold_index[indx][k] = n2 * vert_ind[(k>>1) & 1] + hor_ind[k & 1]
for mode in range(4): # (int mode = 0; mode<4; mode++){
for k in range(4): #(int k = 0; k<4;k++) {
fold_signs[mode][indx][k]= vert_k[(mode>>1) &1][(k>>1) & 1] * hor_k[mode &1][k & 1]
#fold_k[mode][indx][k] = vert_k[(mode>>1) &1][(k>>1) & 1] * hor_k[mode &1][k & 1];
# for (int i = 0; i < n; i++ ){
# fi = get_fold_indices(i,n);
# System.out.println(i+"->"+String.format("?[%2d %2d %2d %2d] [%2d %2d %2d %2d] %f %f",
# fi[0][0],fi[0][1],fi[0][2],fi[0][3],
# fi[1][0],fi[1][1],fi[1][2],fi[1][3], hwindow[fi[0][1]], hwindow[fi[1][1]]));
# }
print("fold_index=",fold_index)
print("fold_signs=",fold_signs)
for i in range(n * n): #(int i = 0; i < n*n; i++){
print("%3x: %6x %6x %6x %6x"%(i,fold_index[i][0],fold_index[i][1],fold_index[i][2],fold_index[i][3]))
print(" : %2d %2d %2d %2d"%(fold_signs[0][i][0], fold_signs[0][i][1], fold_signs[0][i][2], fold_signs[0][i][3]))
print(" : %2d %2d %2d %2d"%(fold_signs[1][i][0], fold_signs[1][i][1], fold_signs[1][i][2], fold_signs[1][i][3]))
print(" : %2d %2d %2d %2d"%(fold_signs[2][i][0], fold_signs[2][i][1], fold_signs[2][i][2], fold_signs[2][i][3]))
print(" : %2d %2d %2d %2d"%(fold_signs[3][i][0], fold_signs[3][i][1], fold_signs[3][i][2], fold_signs[3][i][3]))
fold = (4*n*n)*[0]
for var in range(4):
for i in range(n * n):
fold[var * 64 + i] = (fold_index[i][var]
+ (((0,1)[fold_signs[0][i][var] < 0]) << 8) +
+ (((0,1)[fold_signs[1][i][var] < 0]) << 9) +
+ (((0,1)[fold_signs[2][i][var] < 0]) << 10) +
+ (((0,1)[fold_signs[3][i][var] < 0]) << 11))
return fold
'''
Calculate ROM for MCLT fold indices:
A0..A2 - sample column in folded 8x8 tile
A3..A5 - sample row in folded 8x8 tile
A6..A7 - variant, folding to the same 8x8 sample
D0..D4 - pixel column in 16x16 tile
D5..D7 - pixel row in 16x16 tile
D8 - negate for mode 0 (CC)
D9 - negate for mode 1 (SC)
D10 - negate for mode 2 (CS)
D11 - negate for mode 3 (SS)
'''
print_params(
create_with_parity(create_fold (), 18, False),
os.path.abspath(os.path.join(os.path.dirname(__file__), mclt_wnd_rom_path)),
"// MCLT 16x16 -> 8x8 fold indices")
print ("MCLT 16x16 -> 8x8 fold indices data is written to %s"%(os.path.abspath(os.path.join(os.path.dirname(__file__), mclt_wnd_rom_path))))
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from __future__ import print_function
from __future__ import division
# Copyright (C) 2017, Elphel.inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
'''
Signed subpixel shifts in the range [-0.5,0.5) are converted to sign and [0,0.5] and both limits are fit to the same slot as
the shift -0.5 : cos((i+0.5)/16*pi), -sin((i+0.5)/16*pi) for i=0..7 is symmetrical around the center (odd for sine, even - cosine)
ROM input MSB - 0- cos, 1 - sin, 3 LSB s - index (0..7). Signs for cos and sin are passed to DSPs
shift i sin ROM[9] ROM A[8:3] ROM A[2:0] sign cos sign sin
1000000 (-0.5) nnn 0 1 0 ~nnn 0 1
nnn 1 1 0 nnn 0 1
1xxxxxx (<0) nnn s s -xxxxxx nnn 0 1
0000000 (==0) nnn 0 0 0 0 0 0
nnn 1 0 0 1 0 0
0xxxxxx (>0) nnn s s xxxxxx nnn 0 0
'''
__author__ = "Andrey Filippov"
__copyright__ = "Copyright 2017, Elphel, Inc."
__license__ = "GPL"
__version__ = "3.0+"
__maintainer__ = "Andrey Filippov"
__email__ = "andrey@elphel.com"
__status__ = "Development"
import sys
import math
import os
import datetime
mclt_wnd_rom_path= '../includes/mclt_rotator_rom.vh'
def create_with_parity (init_data, # numeric data (may be less than full array
num_bits, # number of bits in item, valid: 1,2,4,8,9,16,18,32,36,64,72
full_bram): # true if ramb36, false - ramb18
d = num_bits
num_bits8 = 1;
while d > 1:
d >>= 1
num_bits8 <<= 1
bsize = (0x4000,0x8000)[full_bram]
bdata = [0 for i in range(bsize)]
sb = 0
for item in init_data:
# print(item)
for bt in range (num_bits8):
bdata[sb+bt] = (item >> bt) & 1;
sb += num_bits8
data = []
for i in range (len(bdata)//256):
d = 0;
for b in range(255, -1,-1):
d = (d<<1) + bdata[256*i+b]
data.append(d)
data_p = []
num_bits_p = num_bits8 >> 3
sb = 0
print ("num_bits=",num_bits)
print ("num_bits8=",num_bits8)
print ("num_bits_p=",num_bits_p)
if num_bits_p:
pbsize = bsize >> 3
pbdata = [0 for i in range(pbsize)]
for item in init_data:
for bt in range (num_bits_p):
pbdata[sb+bt] = (item >> (bt+num_bits8)) & 1;
sb += num_bits_p
for i in range (len(pbdata)//256):
d = 0;
for b in range(255, -1,-1):
d = (d<<1) + pbdata[256*i+b]
data_p.append(d)
return {'data':data,'data_p':data_p}
def print_params(data,
out_file_name,
comment=""): # text to add to the file header
with open(out_file_name,"w") as out_file:
print ("// Created with "+sys.argv[0], file=out_file)
if comment:
print (comment, file=out_file)
for i, v in enumerate(data['data']):
if v:
print (", .INIT_%02X (256'h%064X)"%(i,v), file=out_file)
# if (include_parity):
for i, v in enumerate(data['data_p']):
if v:
print (", .INITP_%02X (256'h%064X)"%(i,v), file=out_file)
def create_rotator(addr=10): # n - DCT and window size
rom = []
maxv=(1 << 17) - 1
sin_a = 1 << (addr-1) # 512
shft_offs = 3
for _ in range(1 << addr):
rom.append(0)
for shft in range(1 <<(addr-4)):
ashift = 1.0 * shft/(1 <<(addr-3))
if shft == 0:
ashift = 0.5
for i in range(8):
a = (i+0.5) * math.pi * ashift / 8
rom[ i + (shft << shft_offs) + sin_a] = int(round(maxv*math.sin(a)))
if shft > 0:
rom[ i + (shft << shft_offs) + 0 * sin_a] = int(round(maxv*math.cos(a)))
elif i == 0:
rom[ i + (shft << shft_offs) + 0 * sin_a] = maxv
elif i == 1