Expand JPEG-LS parameter helpers toward NEAR 255
This commit is contained in:
@@ -12,11 +12,11 @@
|
||||
module tb_jls_coding_params;
|
||||
|
||||
// NEAR stimulus shared by all parameterized instances.
|
||||
logic [5:0] near_8;
|
||||
logic [5:0] near_10;
|
||||
logic [5:0] near_12;
|
||||
logic [5:0] near_14;
|
||||
logic [5:0] near_16;
|
||||
logic [7:0] near_8;
|
||||
logic [7:0] near_10;
|
||||
logic [7:0] near_12;
|
||||
logic [7:0] near_14;
|
||||
logic [7:0] near_16;
|
||||
|
||||
// DUT outputs.
|
||||
logic [16:0] range_8;
|
||||
@@ -81,11 +81,11 @@ module tb_jls_coding_params;
|
||||
);
|
||||
|
||||
initial begin
|
||||
near_8 = 6'd0;
|
||||
near_10 = 6'd16;
|
||||
near_12 = 6'd31;
|
||||
near_14 = 6'd8;
|
||||
near_16 = 6'd0;
|
||||
near_8 = 8'd0;
|
||||
near_10 = 8'd16;
|
||||
near_12 = 8'd31;
|
||||
near_14 = 8'd8;
|
||||
near_16 = 8'd0;
|
||||
#1;
|
||||
|
||||
if (range_8 !== 17'd256 || qbpp_8 !== 5'd8 || limit_8 !== 7'd32) begin
|
||||
@@ -108,11 +108,11 @@ module tb_jls_coding_params;
|
||||
$fatal(1, "16-bit NEAR=0 coding params mismatch");
|
||||
end
|
||||
|
||||
near_8 = 6'd63;
|
||||
near_16 = 6'd31;
|
||||
near_8 = 8'd63;
|
||||
near_16 = 8'd31;
|
||||
#1;
|
||||
|
||||
if (range_8 !== 17'd6 || qbpp_8 !== 5'd3 || limit_8 !== 7'd32) begin
|
||||
if (range_8 !== 17'd4 || qbpp_8 !== 5'd2 || limit_8 !== 7'd32) begin
|
||||
$fatal(1, "8-bit defensive NEAR clamp mismatch");
|
||||
end
|
||||
|
||||
|
||||
@@ -12,12 +12,12 @@
|
||||
module tb_jls_preset_defaults;
|
||||
|
||||
// Test NEAR inputs.
|
||||
logic [5:0] near_8b_0;
|
||||
logic [5:0] near_8b_31;
|
||||
logic [5:0] near_10b_4;
|
||||
logic [5:0] near_12b_1;
|
||||
logic [5:0] near_14b_2;
|
||||
logic [5:0] near_16b_63;
|
||||
logic [7:0] near_8b_0;
|
||||
logic [7:0] near_8b_31;
|
||||
logic [7:0] near_10b_4;
|
||||
logic [7:0] near_12b_1;
|
||||
logic [7:0] near_14b_2;
|
||||
logic [7:0] near_16b_63;
|
||||
|
||||
// Preset outputs for each instance under test.
|
||||
logic [15:0] maxval_8b_0;
|
||||
@@ -118,12 +118,12 @@ module tb_jls_preset_defaults;
|
||||
);
|
||||
|
||||
initial begin
|
||||
near_8b_0 = 6'd0;
|
||||
near_8b_31 = 6'd31;
|
||||
near_10b_4 = 6'd4;
|
||||
near_12b_1 = 6'd1;
|
||||
near_14b_2 = 6'd2;
|
||||
near_16b_63 = 6'd63;
|
||||
near_8b_0 = 8'd0;
|
||||
near_8b_31 = 8'd31;
|
||||
near_10b_4 = 8'd4;
|
||||
near_12b_1 = 8'd1;
|
||||
near_14b_2 = 8'd2;
|
||||
near_16b_63 = 8'd63;
|
||||
|
||||
#1;
|
||||
|
||||
@@ -157,8 +157,8 @@ module tb_jls_preset_defaults;
|
||||
$fatal(1, "14-bit NEAR=2 defaults mismatch");
|
||||
end
|
||||
|
||||
if (maxval_16b_63 !== 16'hFFFF || t1_16b_63 !== 16'd111 ||
|
||||
t2_16b_63 !== 16'd222 || t3_16b_63 !== 16'd493 ||
|
||||
if (maxval_16b_63 !== 16'hFFFF || t1_16b_63 !== 16'd207 ||
|
||||
t2_16b_63 !== 16'd382 || t3_16b_63 !== 16'd717 ||
|
||||
reset_16b_63 !== 16'd64) begin
|
||||
$fatal(1, "16-bit NEAR clamp defaults mismatch");
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user