Commit bd5fb565 authored by Andrey Filippov's avatar Andrey Filippov

version c8, trying to fix 'premature end...' in JPEG data

parent cf5bee66
[*] [*]
[*] GTKWave Analyzer v3.3.66 (w)1999-2015 BSI [*] GTKWave Analyzer v3.3.66 (w)1999-2015 BSI
[*] Mon Nov 7 00:04:33 2016 [*] Thu Nov 10 19:05:29 2016
[*] [*]
[dumpfile] "/home/eyesis/git/x393-neon/simulation/x393_dut-20161106163115099.fst" [dumpfile] "/home/eyesis/git/x393-neon/simulation/x393_dut-20161110114854506.fst"
[dumpfile_mtime] "Mon Nov 7 00:03:53 2016" [dumpfile_mtime] "Thu Nov 10 19:05:03 2016"
[dumpfile_size] 125174737 [dumpfile_size] 49333165
[savefile] "/home/eyesis/git/x393-neon/cocotb/x393_cocotb_03.sav" [savefile] "/home/eyesis/git/x393-neon/cocotb/x393_cocotb_03.sav"
[timestart] 0 [timestart] 114383480
[size] 1814 1171 [size] 1814 1171
[pos] 0 0 [pos] 0 0
*-25.890059 103100000 -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 *-14.266726 114449010 -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] x393_dut. [treeopen] x393_dut.
[treeopen] x393_dut.simul_sensor12bits_2_i. [treeopen] x393_dut.simul_sensor12bits_2_i.
[treeopen] x393_dut.simul_sensor12bits_3_i. [treeopen] x393_dut.simul_sensor12bits_3_i.
[treeopen] x393_dut.simul_sensor12bits_i. [treeopen] x393_dut.simul_sensor12bits_i.
[treeopen] x393_dut.x393_i. [treeopen] x393_dut.x393_i.
[treeopen] x393_dut.x393_i.compressor393_i.cmprs_channel_block[0]. [treeopen] x393_dut.x393_i.compressor393_i.
[treeopen] x393_dut.x393_i.compressor393_i.cmprs_channel_block[0].jp_channel_i. [treeopen] x393_dut.x393_i.compressor393_i.cmprs_channel_block[0].jp_channel_i.
[treeopen] x393_dut.x393_i.compressor393_i.cmprs_channel_block[0].jp_channel_i.huffman_stuffer_meta_i. [treeopen] x393_dut.x393_i.compressor393_i.cmprs_channel_block[0].jp_channel_i.huffman_stuffer_meta_i.
[treeopen] x393_dut.x393_i.compressor393_i.cmprs_channel_block[0].jp_channel_i.huffman_stuffer_meta_i.bit_stuffer_metadata_i. [treeopen] x393_dut.x393_i.compressor393_i.cmprs_channel_block[0].jp_channel_i.huffman_stuffer_meta_i.bit_stuffer_metadata_i.
[treeopen] x393_dut.x393_i.compressor393_i.cmprs_channel_block[3].
[treeopen] x393_dut.x393_i.compressor393_i.cmprs_channel_block[3].jp_channel_i.
[treeopen] x393_dut.x393_i.compressor393_i.cmprs_channel_block[3].jp_channel_i.huffman_stuffer_meta_i.
[treeopen] x393_dut.x393_i.compressor393_i.cmprs_channel_block[3].jp_channel_i.huffman_stuffer_meta_i.bit_stuffer_27_32_i.
[treeopen] x393_dut.x393_i.event_logger_i.i_imu_exttime. [treeopen] x393_dut.x393_i.event_logger_i.i_imu_exttime.
[treeopen] x393_dut.x393_i.event_logger_i.i_imu_exttime.timestamp_fifo_chn0_i. [treeopen] x393_dut.x393_i.event_logger_i.i_imu_exttime.timestamp_fifo_chn0_i.
[treeopen] x393_dut.x393_i.event_logger_i.i_imu_spi. [treeopen] x393_dut.x393_i.event_logger_i.i_imu_spi.
...@@ -28,7 +32,6 @@ ...@@ -28,7 +32,6 @@
[treeopen] x393_dut.x393_i.frame_sequencer_block[0]. [treeopen] x393_dut.x393_i.frame_sequencer_block[0].
[treeopen] x393_dut.x393_i.frame_sequencer_block[0].cmd_frame_sequencer_i. [treeopen] x393_dut.x393_i.frame_sequencer_block[0].cmd_frame_sequencer_i.
[treeopen] x393_dut.x393_i.mult_saxi_wr_i.mult_saxi_wr_pointers_i. [treeopen] x393_dut.x393_i.mult_saxi_wr_i.mult_saxi_wr_pointers_i.
[treeopen] x393_dut.x393_i.sensors393_i.
[treeopen] x393_dut.x393_i.sensors393_i.sensor_channel_block[0]. [treeopen] x393_dut.x393_i.sensors393_i.sensor_channel_block[0].
[treeopen] x393_dut.x393_i.sensors393_i.sensor_channel_block[0].sensor_channel_i. [treeopen] x393_dut.x393_i.sensors393_i.sensor_channel_block[0].sensor_channel_i.
[treeopen] x393_dut.x393_i.sensors393_i.sensor_channel_block[0].sensor_channel_i.sens_sync_i. [treeopen] x393_dut.x393_i.sensors393_i.sensor_channel_block[0].sensor_channel_i.sens_sync_i.
...@@ -44,9 +47,8 @@ ...@@ -44,9 +47,8 @@
[treeopen] x393_dut.x393_i.sensors393_i.sensor_channel_block[3].sensor_channel_i. [treeopen] x393_dut.x393_i.sensors393_i.sensor_channel_block[3].sensor_channel_i.
[treeopen] x393_dut.x393_i.sensors393_i.sensor_channel_block[3].sensor_channel_i.sens_parallel12_i. [treeopen] x393_dut.x393_i.sensors393_i.sensor_channel_block[3].sensor_channel_i.sens_parallel12_i.
[treeopen] x393_dut.x393_i.sensors393_i.sensor_channel_block[3].sensor_channel_i.sens_sync_i. [treeopen] x393_dut.x393_i.sensors393_i.sensor_channel_block[3].sensor_channel_i.sens_sync_i.
[treeopen] x393_dut.x393_i.timing393_i.
[treeopen] x393_dut.x393_i.timing393_i.camsync393_i. [treeopen] x393_dut.x393_i.timing393_i.camsync393_i.
[sst_width] 440 [sst_width] 294
[signals_width] 319 [signals_width] 319
[sst_expanded] 1 [sst_expanded] 1
[sst_vpaned_height] 486 [sst_vpaned_height] 486
...@@ -1942,7 +1944,7 @@ x393_dut.x393_i.frame_sequencer_block[0].cmd_frame_sequencer_i.frame_sync ...@@ -1942,7 +1944,7 @@ x393_dut.x393_i.frame_sequencer_block[0].cmd_frame_sequencer_i.frame_sync
x393_dut.x393_i.frame_sequencer_block[0].cmd_frame_sequencer_i.frame_no[3:0] x393_dut.x393_i.frame_sequencer_block[0].cmd_frame_sequencer_i.frame_no[3:0]
@1000200 @1000200
-cmd_frame_seq0 -cmd_frame_seq0
@800200 @c00200
-i2c_seq_0 -i2c_seq_0
@28 @28
x393_dut.x393_i.sensors393_i.sensor_channel_block[0].sensor_channel_i.sensor_i2c_io_i.sensor_i2c_i.frame_sync x393_dut.x393_i.sensors393_i.sensor_channel_block[0].sensor_channel_i.sensor_i2c_io_i.sensor_i2c_i.frame_sync
...@@ -1963,9 +1965,9 @@ x393_dut.x393_i.sensors393_i.sensor_channel_block[0].sensor_channel_i.sensor_i2c ...@@ -1963,9 +1965,9 @@ x393_dut.x393_i.sensors393_i.sensor_channel_block[0].sensor_channel_i.sensor_i2c
@28 @28
x393_dut.x393_i.sensors393_i.sensor_channel_block[0].sensor_channel_i.sensor_i2c_io_i.sensor_i2c_i.eof_mclk x393_dut.x393_i.sensors393_i.sensor_channel_block[0].sensor_channel_i.sensor_i2c_io_i.sensor_i2c_i.eof_mclk
x393_dut.x393_i.sensors393_i.sensor_channel_block[0].sensor_channel_i.sensor_i2c_io_i.sensor_i2c_i.use_eof x393_dut.x393_i.sensors393_i.sensor_channel_block[0].sensor_channel_i.sensor_i2c_io_i.sensor_i2c_i.use_eof
@1000200 @1401200
-i2c_seq_0 -i2c_seq_0
@800200 @c00200
-sensor_channel0 -sensor_channel0
@28 @28
x393_dut.x393_i.sensors393_i.sensor_channel_block[0].sensor_channel_i.sof_out_mclk x393_dut.x393_i.sensors393_i.sensor_channel_block[0].sensor_channel_i.sof_out_mclk
...@@ -1986,9 +1988,11 @@ x393_dut.x393_i.sensors393_i.sensor_channel_block[0].sensor_channel_i.sens_sync_ ...@@ -1986,9 +1988,11 @@ x393_dut.x393_i.sensors393_i.sensor_channel_block[0].sensor_channel_i.sens_sync_
- -
@1000200 @1000200
-sesns_sync -sesns_sync
@1401200
-sensor_channel0 -sensor_channel0
@1000200
-sequencers_0 -sequencers_0
@800200 @c00200
-sensor_channel_a -sensor_channel_a
@28 @28
x393_dut.simul_sensor12bits_2_i.MRST x393_dut.simul_sensor12bits_2_i.MRST
...@@ -2014,7 +2018,6 @@ x393_dut.simul_sensor12bits_3_i.VACT ...@@ -2014,7 +2018,6 @@ x393_dut.simul_sensor12bits_3_i.VACT
x393_dut.x393_i.sensors393_i.sensor_channel_block[2].sensor_channel_i.en_mclk x393_dut.x393_i.sensors393_i.sensor_channel_block[2].sensor_channel_i.en_mclk
x393_dut.x393_i.sensors393_i.sensor_channel_block[2].sensor_channel_i.en_pclk x393_dut.x393_i.sensors393_i.sensor_channel_block[2].sensor_channel_i.en_pclk
x393_dut.x393_i.sensors393_i.sensor_channel_block[2].sensor_channel_i.sof_out_mclk x393_dut.x393_i.sensors393_i.sensor_channel_block[2].sensor_channel_i.sof_out_mclk
@29
x393_dut.x393_i.sensors393_i.sensor_channel_block[2].sensor_channel_i.eof_mclk x393_dut.x393_i.sensors393_i.sensor_channel_block[2].sensor_channel_i.eof_mclk
@22 @22
x393_dut.x393_i.sensors393_i.sensor_channel_block[2].sensor_channel_i.frame_num_seq[3:0] x393_dut.x393_i.sensors393_i.sensor_channel_block[2].sensor_channel_i.frame_num_seq[3:0]
...@@ -2024,15 +2027,80 @@ x393_dut.x393_i.sensors393_i.sensor_channel_block[2].sensor_channel_i.frame_num_ ...@@ -2024,15 +2027,80 @@ x393_dut.x393_i.sensors393_i.sensor_channel_block[2].sensor_channel_i.frame_num_
- -
@1000200 @1000200
-sens_sync2 -sens_sync2
@1401200
-sensor_channel_a -sensor_channel_a
@800022 @c00022
x393_dut.x393_i.sof_out_mclk[3:0] x393_dut.x393_i.sof_out_mclk[3:0]
@28 @28
(0)x393_dut.x393_i.sof_out_mclk[3:0] (0)x393_dut.x393_i.sof_out_mclk[3:0]
(1)x393_dut.x393_i.sof_out_mclk[3:0] (1)x393_dut.x393_i.sof_out_mclk[3:0]
(2)x393_dut.x393_i.sof_out_mclk[3:0] (2)x393_dut.x393_i.sof_out_mclk[3:0]
(3)x393_dut.x393_i.sof_out_mclk[3:0] (3)x393_dut.x393_i.sof_out_mclk[3:0]
@1401200
-group_end
@800200
-jpeg3
@22
x393_dut.x393_i.compressor393_i.cmprs_channel_block[3].jp_channel_i.huffman_stuffer_meta_i.data_out[31:0]
@28
x393_dut.x393_i.compressor393_i.cmprs_channel_block[3].jp_channel_i.huffman_stuffer_meta_i.data_out_valid
@22
x393_dut.x393_i.compressor393_i.cmprs_channel_block[3].jp_channel_i.huffman_stuffer_meta_i.escape_do32[31:0]
@28
x393_dut.x393_i.compressor393_i.cmprs_channel_block[3].jp_channel_i.huffman_stuffer_meta_i.escape_bytes[1:0]
x393_dut.x393_i.compressor393_i.cmprs_channel_block[3].jp_channel_i.huffman_stuffer_meta_i.escape_dv
@22
x393_dut.x393_i.compressor393_i.cmprs_channel_block[3].jp_channel_i.huffman_stuffer_meta_i.stuffer_do32[31:0]
@28
x393_dut.x393_i.compressor393_i.cmprs_channel_block[3].jp_channel_i.huffman_stuffer_meta_i.stuffer_bytes[1:0]
x393_dut.x393_i.compressor393_i.cmprs_channel_block[3].jp_channel_i.huffman_stuffer_meta_i.stuffer_dv
@800200
-bit_stuffer_27_32
@28
x393_dut.x393_i.compressor393_i.cmprs_channel_block[3].jp_channel_i.huffman_stuffer_meta_i.bit_stuffer_27_32_i.xclk
x393_dut.x393_i.compressor393_i.cmprs_channel_block[3].jp_channel_i.huffman_stuffer_meta_i.bit_stuffer_27_32_i.flush_in
@800028
x393_dut.x393_i.compressor393_i.cmprs_channel_block[3].jp_channel_i.huffman_stuffer_meta_i.bit_stuffer_27_32_i.flush_stage[2:0]
@28
(0)x393_dut.x393_i.compressor393_i.cmprs_channel_block[3].jp_channel_i.huffman_stuffer_meta_i.bit_stuffer_27_32_i.flush_stage[2:0]
(1)x393_dut.x393_i.compressor393_i.cmprs_channel_block[3].jp_channel_i.huffman_stuffer_meta_i.bit_stuffer_27_32_i.flush_stage[2:0]
(2)x393_dut.x393_i.compressor393_i.cmprs_channel_block[3].jp_channel_i.huffman_stuffer_meta_i.bit_stuffer_27_32_i.flush_stage[2:0]
x393_dut.x393_i.compressor393_i.cmprs_channel_block[3].jp_channel_i.huffman_stuffer_meta_i.bit_stuffer_27_32_i.flush_out
@1001200
-group_end
@28
x393_dut.x393_i.compressor393_i.cmprs_channel_block[3].jp_channel_i.huffman_stuffer_meta_i.bit_stuffer_27_32_i.ds
@22
x393_dut.x393_i.compressor393_i.cmprs_channel_block[3].jp_channel_i.huffman_stuffer_meta_i.bit_stuffer_27_32_i.dlen[4:0]
x393_dut.x393_i.compressor393_i.cmprs_channel_block[3].jp_channel_i.huffman_stuffer_meta_i.bit_stuffer_27_32_i.din[26:0]
x393_dut.x393_i.compressor393_i.cmprs_channel_block[3].jp_channel_i.huffman_stuffer_meta_i.bit_stuffer_27_32_i.d_out[31:0]
@28
x393_dut.x393_i.compressor393_i.cmprs_channel_block[3].jp_channel_i.huffman_stuffer_meta_i.bit_stuffer_27_32_i.bytes_out[1:0]
x393_dut.x393_i.compressor393_i.cmprs_channel_block[3].jp_channel_i.huffman_stuffer_meta_i.bit_stuffer_27_32_i.dv
@22
x393_dut.x393_i.compressor393_i.cmprs_channel_block[3].jp_channel_i.huffman_stuffer_meta_i.bit_stuffer_27_32_i.pre_bits_out_w[4:0]
@23
x393_dut.x393_i.compressor393_i.cmprs_channel_block[3].jp_channel_i.huffman_stuffer_meta_i.bit_stuffer_27_32_i.early_length[5:0]
@22
x393_dut.x393_i.compressor393_i.cmprs_channel_block[3].jp_channel_i.huffman_stuffer_meta_i.bit_stuffer_27_32_i.dlen1[5:0]
x393_dut.x393_i.compressor393_i.cmprs_channel_block[3].jp_channel_i.huffman_stuffer_meta_i.bit_stuffer_27_32_i.dlen2[5:0]
@800028
x393_dut.x393_i.compressor393_i.cmprs_channel_block[3].jp_channel_i.huffman_stuffer_meta_i.bit_stuffer_27_32_i.stage[1:0]
@28
(0)x393_dut.x393_i.compressor393_i.cmprs_channel_block[3].jp_channel_i.huffman_stuffer_meta_i.bit_stuffer_27_32_i.stage[1:0]
(1)x393_dut.x393_i.compressor393_i.cmprs_channel_block[3].jp_channel_i.huffman_stuffer_meta_i.bit_stuffer_27_32_i.stage[1:0]
@800028
x393_dut.x393_i.compressor393_i.cmprs_channel_block[3].jp_channel_i.huffman_stuffer_meta_i.bit_stuffer_27_32_i.ds_stage[1:0]
@28
(0)x393_dut.x393_i.compressor393_i.cmprs_channel_block[3].jp_channel_i.huffman_stuffer_meta_i.bit_stuffer_27_32_i.ds_stage[1:0]
(1)x393_dut.x393_i.compressor393_i.cmprs_channel_block[3].jp_channel_i.huffman_stuffer_meta_i.bit_stuffer_27_32_i.ds_stage[1:0]
@1001200 @1001200
-group_end -group_end
-group_end
@200
-
@1000200
-bit_stuffer_27_32
-jpeg3
[pattern_trace] 1 [pattern_trace] 1
[pattern_trace] 0 [pattern_trace] 0
...@@ -61,13 +61,14 @@ module bit_stuffer_27_32#( ...@@ -61,13 +61,14 @@ module bit_stuffer_27_32#(
reg [5:0] early_length; // number of bits in the last word (mod 32) reg [5:0] early_length; // number of bits in the last word (mod 32)
reg [5:0] dlen1; // use for the stage 2, MSB - carry out reg [5:0] dlen1; // use for the stage 2, MSB - carry out
reg [5:0] dlen2; // use for the stege 3 reg [5:0] dlen2; // use for the stage 3
reg [31:0] dmask2_rom; // data mask (sync with data2) - 1 use new data, 0 - use old data. Use small ROM? reg [31:0] dmask2_rom; // data mask (sync with data2) - 1 use new data, 0 - use old data. Use small ROM?
reg [1:0] stage; // delayed ds or flush reg [1:0] stage; // delayed ds or flush
reg [1:0] ds_stage; reg [1:0] ds_stage;
reg [2:0] flush_stage; reg [2:0] flush_stage;
wire [4:0] pre_bits_out_w = dlen2[4:0] + 5'h7; wire [4:0] pre_bits_out_w = dlen2[4:0] + 5'h7;
assign d_out = data3[DATA3_LEN-1 -: 32]; assign d_out = data3[DATA3_LEN-1 -: 32];
...@@ -87,14 +88,17 @@ module bit_stuffer_27_32#( ...@@ -87,14 +88,17 @@ module bit_stuffer_27_32#(
else if (ds) early_length <= early_length[4:0] + dlen; // early_length[5] is not used in calculations, it is just carry out else if (ds) early_length <= early_length[4:0] + dlen; // early_length[5] is not used in calculations, it is just carry out
if (rst) dlen1 <= 0; if (rst) dlen1 <= 0;
else if (ds) dlen1 <= early_length; // previous value // else if (ds) dlen1 <= early_length; // previous value
else if (ds || flush_in) dlen1 <= early_length; // previous value
if (rst) dlen2 <= 0; // if (rst) dlen2 <= 0;
if (rst || flush_stage[0]) dlen2 <= 0; // flush_stage[0] - equivalent of "if (flush_in) data1 <= 0;"
else if (stage[0]) dlen2 <= dlen1; // previous value (position) else if (stage[0]) dlen2 <= dlen1; // previous value (position)
// barrel shifter stage 1 (0/8/16/24) // barrel shifter stage 1 (0/8/16/24)
if (rst) data1 <= 'bx; if (rst) data1 <= 'bx;
// else if (flush_in) data1 <= 51'b0; // is it needed?
else if (ds) case (early_length[4:3]) else if (ds) case (early_length[4:3])
2'h0: data1 <= { din, 24'b0}; 2'h0: data1 <= { din, 24'b0};
2'h1: data1 <= { 8'b0,din, 16'b0}; 2'h1: data1 <= { 8'b0,din, 16'b0};
......
...@@ -35,7 +35,8 @@ ...@@ -35,7 +35,8 @@
* contains all the components and scripts required to completely simulate it * contains all the components and scripts required to completely simulate it
* with at least one of the Free Software programs. * with at least one of the Free Software programs.
*/ */
parameter FPGA_VERSION = 32'h039300c7; //parallel - disable SoF when channel disabled parameter FPGA_VERSION = 32'h039300c8; //parallel - trying to fix "premature..." -0.121/21, 80.2%
// parameter FPGA_VERSION = 32'h039300c7; //parallel - disable SoF when channel disabled: met, 80.32%
// parameter FPGA_VERSION = 32'h039300c6; //parallel - same -0.132 /31, 80.73% // parameter FPGA_VERSION = 32'h039300c6; //parallel - same -0.132 /31, 80.73%
// parameter FPGA_VERSION = 32'h039300c5; //parallel - made i2c ahead of system frame number for eof -0.027/12 , 82.08% // parameter FPGA_VERSION = 32'h039300c5; //parallel - made i2c ahead of system frame number for eof -0.027/12 , 82.08%
// parameter FPGA_VERSION = 32'h039300c4; //parallel - option to use EOF for i2c sequencer timing met, 79.66% // parameter FPGA_VERSION = 32'h039300c4; //parallel - option to use EOF for i2c sequencer timing met, 79.66%
......
No preview for this file type
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment