Checkpoint JPEG-LS hardening and logs

Bundle SCAN_ROWS=64 RTL updates, refreshed CharLS reference streams, and a tracked checkpoint log with regression and quick-synth results.

Includes FSM safe-state hardening, control-path cleanup, and the latest quick synthesis snapshot on xc7vx690tffg1761-2.
This commit is contained in:
2026-04-17 18:05:48 +08:00
parent 50539f4abb
commit 9ace25b62b
93 changed files with 1005 additions and 392 deletions

View File

@@ -54,6 +54,7 @@ $RepoRoot = (Resolve-Path ".").Path
$OutDir = Join-Path $RepoRoot ("tools\jls_compat\out\pattern_regression_cr" + $ConfiguredCompressionRatio)
$DepPath = Join-Path $RepoRoot "tools\jls_compat\.deps"
$SummaryCsv = Join-Path $OutDir "pattern_regression_summary.csv"
$ScanRows = 64
$QuestaBin = "C:\questasim64_2020.1\win64"
$VlogExe = Join-Path $QuestaBin "vlog.exe"
$VsimExe = Join-Path $QuestaBin "vsim.exe"
@@ -160,7 +161,7 @@ foreach ($PatternFile in $PatternFiles) {
$RtlJls = Join-Path $OutDir ($CaseName + ".rtljls")
$TranscriptLog = Join-Path $OutDir ($CaseName + ".vsim.log")
$CaseJson = Join-Path $OutDir ($CaseName + ".summary.json")
$ExpectedFrames = [int]($Height / 16)
$ExpectedFrames = [int]($Height / $ScanRows)
$VsimArgs = @(
"-c",
@@ -168,6 +169,7 @@ foreach ($PatternFile in $PatternFiles) {
"-gPIX_WIDTH=16",
("-gPIC_COL=" + $Width),
("-gPIC_ROW=" + $Height),
("-gSCAN_ROWS=" + $ScanRows),
("+IN_PGM=" + (To-PosixPath $SourcePgm)),
("+RATIO=" + $RtlRatioPort),
("+OUT=" + (To-PosixPath $RtlJls)),

View File

@@ -10,7 +10,7 @@ param(
[int] $Width = 6144,
[int] $Height = 256,
[int] $ImageCount = 10,
[int] $ScanRows = 16,
[int] $ScanRows = 64,
# PATTERN=9 rotates ten deterministic representative images.
[int] $Pattern = 9,

View File

@@ -95,11 +95,13 @@ foreach ($Bits in @(8, 10, 12, 14, 16)) {
$JlsPlusArg = "+OUT=tools/jls_compat/out/$Stem.jls"
$PatternPlusArg = "+PATTERN=$Pattern"
$WidthGeneric = "-gPIX_WIDTH=$Bits"
$HeightGeneric = "-gPIC_ROW=16"
$ScanRowsGeneric = "-gSCAN_ROWS=16"
Write-Pgm $PgmPath $Pattern $Bits 16 16
Invoke-CheckedCommand "run RTL top compatibility smoke: ${Bits}b $PatternName image" {
vsim -c tb_jpeg_ls_encoder_top_run_smoke $WidthGeneric $PatternPlusArg $JlsPlusArg -do "run -all; quit"
vsim -c tb_jpeg_ls_encoder_top_run_smoke $WidthGeneric $HeightGeneric $ScanRowsGeneric $PatternPlusArg $JlsPlusArg -do "run -all; quit"
}
Invoke-CheckedCommand "decode ${Bits}b $PatternName RTL output with CharLS and compare reference PGM" {
@@ -114,7 +116,7 @@ $CheckerPgmPath = Join-Path $OutDir "$CheckerStem.pgm"
Write-Pgm $CheckerPgmPath 2 8 16 16
Invoke-CheckedCommand "run RTL top compatibility smoke: 8b checker image" {
vsim -c tb_jpeg_ls_encoder_top_run_smoke -gPIX_WIDTH=8 +PATTERN=2 +OUT=tools/jls_compat/out/$CheckerStem.jls -do "run -all; quit"
vsim -c tb_jpeg_ls_encoder_top_run_smoke -gPIX_WIDTH=8 -gPIC_ROW=16 -gSCAN_ROWS=16 +PATTERN=2 +OUT=tools/jls_compat/out/$CheckerStem.jls -do "run -all; quit"
}
Invoke-CheckedCommand "decode 8b checker RTL output with CharLS and compare reference PGM" {
@@ -127,7 +129,7 @@ $MultiStripPgmPath = Join-Path $OutDir "$MultiStripStem.pgm"
Write-Pgm $MultiStripPgmPath 1 8 16 32
Invoke-CheckedCommand "run RTL top compatibility smoke: 8b ramp two-strip image" {
vsim -c tb_jpeg_ls_encoder_top_run_smoke -gPIX_WIDTH=8 -gPIC_ROW=32 +PATTERN=1 +OUT=tools/jls_compat/out/$MultiStripStem.jls -do "run -all; quit"
vsim -c tb_jpeg_ls_encoder_top_run_smoke -gPIX_WIDTH=8 -gPIC_ROW=32 -gSCAN_ROWS=16 +PATTERN=1 +OUT=tools/jls_compat/out/$MultiStripStem.jls -do "run -all; quit"
}
Invoke-CheckedCommand "decode 8b ramp two-strip RTL output with CharLS and compare reference PGM" {
@@ -140,7 +142,7 @@ $MultiImagePgmPath = Join-Path $OutDir "$MultiImageStem.pgm"
Write-Pgm $MultiImagePgmPath 0 8 16 32
Invoke-CheckedCommand "run RTL top compatibility smoke: 8b zero two-image stream" {
vsim -c tb_jpeg_ls_encoder_top_run_smoke -gPIX_WIDTH=8 -gIMAGE_COUNT=2 +PATTERN=0 +OUT=tools/jls_compat/out/$MultiImageStem.jls -do "run -all; quit"
vsim -c tb_jpeg_ls_encoder_top_run_smoke -gPIX_WIDTH=8 -gPIC_ROW=16 -gSCAN_ROWS=16 -gIMAGE_COUNT=2 +PATTERN=0 +OUT=tools/jls_compat/out/$MultiImageStem.jls -do "run -all; quit"
}
Invoke-CheckedCommand "decode 8b zero two-image RTL output with CharLS and compare stitched reference PGM" {
@@ -153,7 +155,7 @@ $NearStripPgmPath = Join-Path $OutDir "$NearStripStem.pgm"
Write-Pgm $NearStripPgmPath 1 8 16 32
Invoke-CheckedCommand "run RTL top compatibility smoke: 8b ramp two-strip ratio=2 image" {
vsim -c tb_jpeg_ls_encoder_top_run_smoke -gPIX_WIDTH=8 -gPIC_ROW=32 +PATTERN=1 +RATIO=2 +OUT=tools/jls_compat/out/$NearStripStem.jls -do "run -all; quit"
vsim -c tb_jpeg_ls_encoder_top_run_smoke -gPIX_WIDTH=8 -gPIC_ROW=32 -gSCAN_ROWS=16 +PATTERN=1 +RATIO=2 +OUT=tools/jls_compat/out/$NearStripStem.jls -do "run -all; quit"
}
Invoke-CheckedCommand "decode 8b ramp two-strip ratio=2 RTL output with CharLS and compare reference PGM within NEAR bound" {

View File

@@ -3,7 +3,7 @@
// Figure : N/A
// Table : N/A
// Pseudocode : Small all-zero image exercises run-mode strip closure
// Example : 16x16 zero image should produce SOI ... EOI and one original
// Example : 16x64 zero image should produce SOI ... EOI and one original
// image-start sideband byte.
//
// Non-empty top-level smoke. This is a tiny compatibility-oriented smoke for
@@ -31,8 +31,8 @@ module tb_jpeg_ls_encoder_top_run_smoke;
// PIX_WIDTH to cover the other required grayscale precisions.
parameter int PIX_WIDTH = 8;
parameter int PIC_COL = 16;
parameter int PIC_ROW = 16;
parameter int SCAN_ROWS = 16;
parameter int PIC_ROW = 64;
parameter int SCAN_ROWS = 64;
parameter int IMAGE_COUNT = 1;
parameter int TIMEOUT_PER_PIXEL = 512;
localparam int IFIFO_DATA_WIDTH = ((PIX_WIDTH + 7) / 8) * 9;