Queries on Run Length Encoder


In the run length encoder core I do not understand one thing.

rss_cmp_idx which selects the color component to be processed, do not get any value as per the test file test_jpeg.py.

Also the first pixel in every 8x8 matrix must get differentially encoded …

but as per the waveform the prev_dc_reg variable which carries the differential data is always zero …

Am I missing something ?

This inquiry is for the JPEGEncoder GSoC project. The questions is about the behavior of the version 1 references behavior which is exercised in the test_jpegenc.py cosimulation.

The behavior in question is the RLE block (RLE_TOP.v or RLE.v in the Verilog version). The cosimulation does not set the values in question but generates an output in the cosimulation.

@josyb, @hgomersall, @nikolaos.kavvadias

@Vikram9866 there is a typo in CtrlSM.v that is causing the problems:

114: output wire [15:0] rle_sm_settings_x_cnt,
115: output wire [15:0] rle_sm_settings_y_cnt,
116: output wire [2:0]  rle_sm_settings_cmp_idx,
188:    assign rle_sm_setting_x_cnt    = Reg_x_cnt[4];
189:    assign rle_sm_setting_y_cnt    = Reg_y_cnt[4];
190:    assign rle_sm_setting_cmp_idx  = Reg_cmp_idx[4];

@vikram, @mkatsimpris do note, in the MyHLD design you will be able to things closer to the VHDL by using interfaces (objects) to reference many of these config values. The VHDL used records for the configuration settings, also the configuration interface will be generic and not tied to a specific memory-mapped bus type. The whole CtrlSM.v needs some consideration but that can be tackled a little later other than, as discussed previously, local flow control should be investigated versus the global control (the previous example given was simple ready-valid flow control).

I pushed the changes to the repo.

1 Like

@cfelton : I face one more problem.


The quantizer matrix must change accordingly to Luminance and Chrominance tables.
But its been set to default matrix all ones ( no quantization) as per the waves.

I think the problem is from the Signal OPB_ABus.

I believe in the test bench there is some problem in assigning values to OPB_ABus.

The Signal gets only 2 values 12 or 0 whereas it should get either 256 or 512 values in bus to select Chrominance or Luminance table.

@Vikram9866 here is the function that does the initialization.

In my simulation OPB_ABus is assigned more values than you are indicating, at least at the top-level.

1 Like

@cfelton . sorry I missed those values by mistake. Can you see quantization happening in your waveform ?

I mean is the quantization ram loading proper values ?

There is data out but it looks suspicious …