Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
122 commits
Select commit Hold shift + click to select a range
c4996a5
correction
FhGSpCo Jun 29, 2025
d5a49c7
feat(p56): extend speech voltmeter to support arbitrary bit depths
Apr 28, 2026
5aa41cb
chore(build): update CMake minimum version and clean up .gitignore
Apr 28, 2026
447610c
🔧 chore(build): enforce 32-bit build configuration
May 11, 2026
9a466a0
🔧 chore: add /build to .gitignore
May 11, 2026
6fd5d37
Add gain_chk tool with CMake, CTest and docs. Integrate gain_chk into…
TomV76 May 14, 2026
44a86e0
feat(sv56): enhance speech voltmeter for arbitrary bit depths
May 21, 2026
827065c
🧪 test(sv56): update test configurations and working directories
May 26, 2026
2cb97da
addition of SHQ/HP50 filters and EID AMR tool, used in 3GPP SA4
May 26, 2026
7efd9a5
Add WAV file I/O support to all audio-processing tools
May 26, 2026
f0bbdde
Add documentation for the gain_chk tool, detailing its functionality,…
TomV76 May 27, 2026
8e17715
Update gain_chk documentation and integrate it into the STL manual. A…
TomV76 May 27, 2026
00c9bba
Fix compilation errors on modern C compilers and CMake >= 3.28
May 27, 2026
9f3c399
is54/uvselp: fix segfault by adding ANSI C prototypes
May 28, 2026
360ec45
Fix ctest failures on macOS/Linux without changing tool behavior
May 28, 2026
dafb0df
🛠️ chore(cmake): update minimum version and remove 32-bit enforcement
May 28, 2026
9782426
feat(sv56): add variable bit-width support and new utilities
May 28, 2026
bf9eb76
Add GitHub Actions CI workflow, fix cf portability and basop output
May 28, 2026
5016f7b
Merge branch 'fix/ctest-portability' into STL_2026_itu_submission
May 28, 2026
f71219c
Merge branch 'fix/uvselp-knr-prototypes' into STL_2026_itu_submission
May 28, 2026
f52bb4b
Merge branch 'fix/add-ci' into STL_2026_itu_submission
May 28, 2026
8eea667
Merge branch 'feature/wav-io' into STL_2026_itu_submission
May 28, 2026
63d89d3
CI: upload LaTeX manual PDF as artifact
May 28, 2026
d35a760
Merge branch 'pr-178' into STL_2026_itu_submission
May 28, 2026
9650a51
Fix CTest line-ending mismatch on Unix/macOS
May 29, 2026
0676caf
Improve gain_chk documentation
May 29, 2026
1585264
Merge pull request #1 from ludomal/pr-179-fixes
TomV76 May 29, 2026
02734da
more issues in description of the operators
FhGSpCo May 29, 2026
0c7aa82
🔥 chore(sv56): remove test data files from .gitignore
May 29, 2026
353558a
feat(sv56): add reference and source files for 16, 24, and 32 bit audio
May 29, 2026
339fb3e
Merge branch 'pr-179' into STL_2026_itu_submission
May 30, 2026
d285494
Integrate gain_chk with wav_io and add shared text comparison utility
May 30, 2026
be8aaf3
Fix ctest failures on macOS/Linux without changing tool behavior
May 28, 2026
82f8a32
Merge branch 'fix/ctest-portability' into STL_2026_itu_submission
May 30, 2026
7f4946e
Fix WAV I/O: propagate sample rate, validate parameters, fix seeking
May 30, 2026
00f0596
Fix remaining fseek/stat issues in g722demo, signal-diff, calc-snr, m…
May 30, 2026
242b841
Add wav_io support to sine generator
May 30, 2026
77b2e1c
minor correction of filter main + addition of cmake testing
May 30, 2026
2781925
is54/uvselp: fix segfault by adding ANSI C prototypes
May 28, 2026
1b81938
Add GitHub Actions CI workflow
May 31, 2026
29f6e41
Fix compfile portability: replace POSIX read()/lseek() with fread()/f…
May 31, 2026
1c9678a
Fix signal-diff and oper portability: replace POSIX I/O with standard C
May 31, 2026
4159f13
Fix printf format warnings in test_precision.c
May 31, 2026
ee1462a
fix: W_neg grammar ("variables" -> "variable")
May 31, 2026
7b68ebf
Merge remote-tracking branch 'ludomal/feature/wav-io' into STL_2026_i…
May 31, 2026
0871a1e
Merge branch 'fix/add-ci' into STL_2026_itu_submission
May 31, 2026
45bfa1d
Merge branch 'fix/ctest-portability' into STL_2026_itu_submission
May 31, 2026
a27a422
Merge remote-tracking branch 'ludomal/fix/uvselp-knr-prototypes' into…
May 31, 2026
63ce07c
Merge remote-tracking branch 'ludomal/pr-178' into STL_2026_itu_submi…
May 31, 2026
6d7eb6a
Merge branch 'jr2804/feature/p56-bitdepth-extension' into STL_2026_it…
May 31, 2026
047c985
Remove stale uvselp verify tests and arm64 refs
May 31, 2026
45e4ce6
Revert test_precision.c fopen to 'w' mode (matches ctest-portability …
May 31, 2026
2da5825
Fix basop test_precision.c: use unsigned int for 32-bit hex output
May 31, 2026
1e9aa7d
Fix printf format warnings in test_precision.c
May 31, 2026
3a10410
CI: add 32-bit (gcc -m32) build and test job
May 31, 2026
4097362
CI: add i386 container and ARM32 QEMU build jobs
May 31, 2026
3c120b1
CI: fix i386 container (use QEMU) and 32-bit cmake config
May 31, 2026
01ee2fb
CI: install g++-multilib for 32-bit C++ linking
May 31, 2026
15edcc4
CI: use ubuntu:22.04 with --platform linux/386 for i386 job
May 31, 2026
fe7310d
CI: use debian:bullseye for i386 container (ubuntu lacks i386 manifests)
May 31, 2026
92a03bc
CI: suppress debconf noise and reduce install size in QEMU containers
May 31, 2026
73c8397
Remove wav-sv56 integration tests (sv56 no longer uses wav_io)
May 31, 2026
9ab2160
Remove wav-g726 tests for g726demo (expects A-law input, not PCM)
May 31, 2026
10770f3
Fix sb2 test: add dependency on sb1 (needs bytswpd.tst created first)
May 31, 2026
0d63e4b
CI: remove Release config from Windows build (use default Debug)
May 31, 2026
f1b2c9e
CI: revert Windows to Release config (Debug too slow)
May 31, 2026
2e2ef6b
Fix sb tests: add WORKING_DIRECTORY and proper dependency chain
May 31, 2026
8ecdda3
Fix sb tests: use absolute paths for Windows compatibility
May 31, 2026
9c582f4
Fix sb tests: write output to build dir (source tree may be read-only)
May 31, 2026
b2db4d4
additional updates to documentation
May 31, 2026
4e76389
Fix sb tests: use FIXTURES chain to enforce sequential execution
May 31, 2026
d760b3d
Fix sb tests: add RESOURCE_LOCK to prevent file access race on Windows
May 31, 2026
597dc44
Debug sb2: add sha256sum check before sb2 to verify file exists
May 31, 2026
5d72dd4
Fix sb -over: create temp file in same directory as input
May 31, 2026
9324aec
Fix sb -over: create temp file in same directory as input
May 31, 2026
2135108
CI: increase i386 container timeout to 45min (QEMU is slow)
May 31, 2026
8cf7517
CI: add -msse2 -mfpmath=sse to 32-bit builds (match 64-bit FP results)
May 31, 2026
341dd07
CI: fix quoting of 32-bit cmake flags
May 31, 2026
992d3c0
Fix sv56test verify: use CRLF-tolerant text comparison
May 31, 2026
1b80306
Fix sb tests: output to build dir, fixture chain, resource lock
May 31, 2026
f396042
CI: install python3 in QEMU containers (needed for wmc_tool tests)
May 31, 2026
11afdd4
Fix wmc_tool tests: expand globs explicitly for container compatibility
May 31, 2026
4936be7
Fix g726-vbr verify tests: use signal-diff with 1-LSB tolerance
May 31, 2026
d440915
Fix wmc_tool and g726-vbr tests for cross-platform compatibility
May 31, 2026
aed8a67
CI: skip wmc_tool glob tests in QEMU containers (shell expansion issue)
May 31, 2026
26a6db1
Debug: print wmc_tool test script arguments to diagnose container fai…
May 31, 2026
1c16a0d
CI: remove test exclusions from QEMU containers (run all tests)
May 31, 2026
ae18fd1
Add GitHub Actions CI with big-endian (s390x) testing
May 31, 2026
6b2354c
CI: switch s390x to cross-compile + QEMU emulator for tests
Jun 1, 2026
853c1b8
CI: use static linking for s390x to avoid missing dynamic linker
Jun 1, 2026
32ea343
Integrate dlyerr_2_errpat into src/eid/ (from PR #180)
Jun 2, 2026
c00ff7a
Integrate eid-amr into src/eid/ with softbit (from PR #188)
Jun 2, 2026
cda4d73
Add SHQ2/SHQ3 and HP50 filters to FIR module (from PR #188)
Jun 2, 2026
264a72c
Add EID-AMR section to STL manual (doc/manual/eid.tex)
Jun 2, 2026
588aa3f
Add EID-AMR section to STL manual (doc/manual/eid.tex)
Jun 2, 2026
066d322
Add dlyerr_2_errpat documentation (README + LaTeX manual)
Jun 2, 2026
5d1d5a7
Use softbit save_g192/save_byte for G.192 output in dlyerr_2_errpat
Jun 2, 2026
af16c0f
Fix documentation and build issues in FIR filter additions
Jun 2, 2026
1c2b8c2
Add comprehensive manual documentation for random tool
Jun 2, 2026
ad79bdc
CI: upload LaTeX manual PDF as artifact
May 31, 2026
a454ec9
doc(sv56): update manual for arbitrary bit depth support
May 27, 2026
8667c9b
Merge branch 'fix/add-ci' into STL_2026_itu_submission
Jun 2, 2026
2d3cb33
Merge branch 'fix/ctest-portability' into STL_2026_itu_submission
Jun 2, 2026
4a9c069
Merge branch 'sv56_integration' into STL_2026_itu_submission
Jun 2, 2026
929e116
Merge branch 'PR182' into STL_2026_itu_submission
Jun 2, 2026
124e785
Merge branch 'pr180' into STL_2026_itu_submission
Jun 2, 2026
ee57df8
Merge branch 'pr188' into STL_2026_itu_submission
Jun 2, 2026
9fea132
Fix LaTeX build: replace \text{} with \mathrm{} in unsup.tex
Jun 2, 2026
8e00889
Fix LaTeX build: replace \mod with \bmod in unsup.tex
Jun 2, 2026
482b945
Fix Windows CRLF test failure: use compare_files --ignore-eol for tex…
Jun 2, 2026
f706f6c
Merge branch 'pr180' into STL_2026_itu_submission
Jun 2, 2026
042e132
CI: restore s390x (big-endian) and i386 (32-bit) jobs
Jun 3, 2026
c3366df
CI: add python3 to i386 container (needed for wmc_tool tests)
Jun 3, 2026
2b95914
CI: restore 32-bit gcc (-m32) build job
Jun 3, 2026
00217b9
Merge branch 'dev' into pr188
ragotsa Jun 3, 2026
aa2c020
Merge pull request #1 from ludomal/pr188
ragotsa Jun 3, 2026
f34b9bd
Merge branch 'dev' into pr188_fir
ragotsa Jun 3, 2026
2c11ccb
Merge pull request #2 from ludomal/pr188_fir
ragotsa Jun 3, 2026
e82db9d
Revert "Proposed improvements to eid-amr"
ragotsa Jun 3, 2026
ca456f4
Merge pull request #3 from ragotsa/revert-1-pr188
ragotsa Jun 3, 2026
e85e021
accepted updates to EID
Jun 3, 2026
76b33b5
Merge branch 'pr188' into STL_2026_itu_submission
Jun 4, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Binary test data files - prevent CRLF corruption
src/unsup/test_data/cftest1.dat binary
144 changes: 144 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,144 @@
name: CI

on:
push:
branches: [dev, main, STL_2026_itu_submission]
pull_request:
branches: [dev, main]

jobs:
build-and-test:
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
compiler: gcc
cc: gcc
cxx: g++
- os: ubuntu-latest
compiler: gcc-32bit
cc: gcc
cxx: g++
cflags: "-m32"
- os: ubuntu-latest
compiler: clang
cc: clang
cxx: clang++
- os: macos-latest
compiler: clang
cc: clang
cxx: clang++
- os: windows-latest
compiler: msvc
cc: cl
cxx: cl

runs-on: ${{ matrix.os }}
name: ${{ matrix.os }} / ${{ matrix.compiler }}
timeout-minutes: 15

steps:
- run: git config --global core.autocrlf false
- uses: actions/checkout@v4

- name: Install 32-bit libraries
if: matrix.cflags == '-m32'
run: sudo apt-get update && sudo apt-get install -y gcc-multilib g++-multilib

- name: Configure (Unix)
if: runner.os != 'Windows'
run: cmake . ${{ matrix.cflags && format('-DCMAKE_C_FLAGS="-m32 -msse2 -mfpmath=sse" -DCMAKE_CXX_FLAGS="-m32 -msse2 -mfpmath=sse"') || '' }}
env:
CC: ${{ matrix.cc }}
CXX: ${{ matrix.cxx }}

- name: Configure (Windows)
if: runner.os == 'Windows'
run: |
# Exclude build directory from Windows Defender to avoid scan delays
powershell -Command "Add-MpPreference -ExclusionPath '${{ github.workspace }}'"
cmake .

- name: Build (Unix)
if: runner.os != 'Windows'
run: cmake --build .

- name: Build (Windows)
if: runner.os == 'Windows'
run: cmake --build . --config Release

- name: Test (Unix)
if: runner.os != 'Windows'
run: ctest --output-on-failure

- name: Test (Windows)
if: runner.os == 'Windows'
run: ctest --output-on-failure --build-config Release

manual:
runs-on: ubuntu-latest
name: LaTeX manual
steps:
- uses: actions/checkout@v4

- name: Install TeX Live
run: |
sudo apt-get update
sudo apt-get install -y texlive-latex-extra texlive-fonts-recommended latexmk

- name: Build manual
run: cd doc/manual && latexmk -pdf -halt-on-error STLmanual.tex < /dev/null

- name: Upload PDF
uses: actions/upload-artifact@v4
with:
name: STL-manual
path: doc/manual/STLmanual.pdf

build-s390x:
runs-on: ubuntu-latest
name: s390x (big-endian)
timeout-minutes: 30
steps:
- uses: actions/checkout@v4
- name: Install cross-compiler and QEMU
run: |
sudo apt-get update -q -y
sudo apt-get install -y gcc-s390x-linux-gnu g++-s390x-linux-gnu qemu-user-static
- name: Configure (cross-compile for s390x)
run: |
cmake -DCMAKE_C_COMPILER=s390x-linux-gnu-gcc \
-DCMAKE_CXX_COMPILER=s390x-linux-gnu-g++ \
-DCMAKE_SYSTEM_NAME=Linux \
-DCMAKE_SYSTEM_PROCESSOR=s390x \
-DCMAKE_CROSSCOMPILING_EMULATOR=/usr/bin/qemu-s390x-static \
-DCMAKE_EXE_LINKER_FLAGS="-static" \
.
- name: Build
run: cmake --build .
- name: Test
run: ctest --output-on-failure

build-i386-container:
runs-on: ubuntu-latest
name: i386 container
timeout-minutes: 45
steps:
- uses: actions/checkout@v4

- uses: docker/setup-qemu-action@v3
with:
platforms: linux/386

- name: Build and test in i386 container
run: |
docker run --rm --platform linux/386 \
-e DEBIAN_FRONTEND=noninteractive \
-v ${{ github.workspace }}:/src -w /src \
debian:bullseye bash -c "
apt-get update && apt-get install -y --no-install-recommends gcc g++ cmake make python3 &&
cmake . -DCMAKE_C_FLAGS='-msse2 -mfpmath=sse' -DCMAKE_CXX_FLAGS='-msse2 -mfpmath=sse' &&
cmake --build . &&
ctest --output-on-failure
"
7 changes: 5 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,6 @@ src/is54/test_data/voice.bec
src/is54/test_data/voice.hbs
!src/is54/test_data/voice.log
src/is54/test_data/voice.rek
src/sv56/test_data/voice.prc
src/sv56/test_data/voice.rms
src/unsup/test_data/astrip.blk
src/unsup/test_data/undo.txt
src/utl/test_data/voice.rnp
Expand Down Expand Up @@ -97,3 +95,8 @@ bld/
.vs/
*vcxproj*
*.sln*
.vscode/
/build
*.double
stderr.txt
stdout.txt
7 changes: 5 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
cmake_minimum_required(VERSION 3.1)
cmake_minimum_required(VERSION 3.10...3.31)
project(STL2023 VERSION 2023)
add_definitions( -DVERSION_STL="${CMAKE_PROJECT_NAME}" )

add_definitions( -DVERSION_STL="${CMAKE_PROJECT_NAME}" -DCMAKE_POLICY_VERSION_MINIMUM=3.5 )

set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)

Expand All @@ -21,9 +22,11 @@ add_subdirectory(src/basop/test_framework)
add_subdirectory(src/basop/flc)
add_subdirectory(src/bs1770demo)
add_subdirectory(src/eid)
add_subdirectory(src/eid-amr)
add_subdirectory(src/esdru)
add_subdirectory(src/fir)
add_subdirectory(src/freqresp)
add_subdirectory(src/gain_chk)
add_subdirectory(src/g711)
add_subdirectory(src/g711iplc)
add_subdirectory(src/g722)
Expand Down
20 changes: 20 additions & 0 deletions cmake/CompareTextFiles.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# cmake/CompareTextFiles.cmake
# Compare two text files, ignoring line-ending differences (CRLF vs LF).
#
# Usage (from a -P script):
# include(/path/to/CompareTextFiles.cmake)
# compare_text_files(GOT <file> EXPECTED <file> [LABEL <name>])

function(compare_text_files)
cmake_parse_arguments(_CTF "" "GOT;EXPECTED;LABEL" "" ${ARGN})

file(READ "${_CTF_GOT}" _got)
string(REPLACE "\r\n" "\n" _got "${_got}")

file(READ "${_CTF_EXPECTED}" _want)
string(REPLACE "\r\n" "\n" _want "${_want}")

if(NOT _got STREQUAL _want)
message(FATAL_ERROR "Text file mismatch: ${_CTF_LABEL}\n--- got ---\n${_got}\n--- expected ---\n${_want}")
endif()
endfunction()
2 changes: 1 addition & 1 deletion doc/manual/Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
BIBTEX = bibtex
PDFLATEX = pdflatex

PARTS = STLmanual.tex intro.tex g711.tex g711iplc.tex g726.tex g727.tex g728.tex g722.tex rpe.tex rate.tex eid.tex mnru.tex sv56.tex reverb.tex truncate.tex freqresp.tex stereoop.tex esdru.tex bs1770demo.tex basop.tex utl.tex wmc_tool.tex
PARTS = STLmanual.tex intro.tex g711.tex g711iplc.tex g726.tex g727.tex g728.tex g722.tex rpe.tex rate.tex eid.tex mnru.tex sv56.tex reverb.tex truncate.tex freqresp.tex stereoop.tex esdru.tex bs1770demo.tex gain_chk.tex basop.tex utl.tex wmc_tool.tex

STLmanual.pdf : $(PARTS) bibliography.bib
$(PDFLATEX) $(PARTS)
Expand Down
5 changes: 5 additions & 0 deletions doc/manual/STLmanual.tex
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,11 @@
%=============================================================================
\include{freqresp}

%=============================================================================
% chapter gain_chk: Gain amplification verification tool
%=============================================================================
\include{gain_chk}

%=============================================================================
% chapter stereoop: Stereo processing tool
%=============================================================================
Expand Down
50 changes: 25 additions & 25 deletions doc/manual/basop.tex
Original file line number Diff line number Diff line change
Expand Up @@ -1008,27 +1008,27 @@ \subsection{Variable definitions}
\subsection{Operators with complexity weight of 1}

%........................................................
\NewOperator{CL\_shr(CL\_var1, var2)}
\NewOperator{CL\_shr(CL\_var1, L\_var2)}

Arithmetically shifts right the real and imaginary parts of the 32-bit complex number CL\_var1 by var2 positions.\\
If var2 is negative, real and imaginary parts of CL\_var1 are shifted to the most significant bits by (-var2) positions with 32-bit saturation control.\\
If var2 is positive, real and imaginary parts of CL\_var1 are shifted to the least significant bits by (var2) positions with sign extension.\\
Arithmetically shifts right the real and imaginary parts of the 32-bit complex number CL\_var1 by L\_var2 positions.\\
If L\_var2 is negative, real and imaginary parts of CL\_var1 are shifted to the most significant bits by (-L\_var2) positions with 32-bit saturation control.\\
If L\_var2 is positive, real and imaginary parts of CL\_var1 are shifted to the least significant bits by (L\_var2) positions with sign extension.\\
The following code snippet describes the operations performed on real \& imaginary part of a complex number:

{\tt \rulex{5mm}CL\_result.re = L\_shr(CL\_var1.re, L\_shift\_val);\\
\rulex{5mm}CL\_result.im = L\_shr(CL\_var1.im, L\_shift\_val);\\
{\tt \rulex{5mm}CL\_result.re = L\_shr(CL\_var1.re, L\_var2);\\
\rulex{5mm}CL\_result.im = L\_shr(CL\_var1.im, L\_var2);\\
}

%........................................................
\NewOperator{CL\_shl(CL\_var1, var2)}
\NewOperator{CL\_shl(CL\_var1, L\_var2)}

Arithmetically shifts left the real and imaginary parts of the 32-bit complex number CL\_var1 by L\_shift\_val positions.\\
If var2 is negative, real and imaginary parts of CL\_var1 are shifted to the least significant bits by ( -var2 ) positions with sign extension.\\
If var2 is positive, real and imaginary parts of CL\_var1 are shifted to the most significant bits by (var2) positions with 32-bit saturation control.\\
Arithmetically shifts left the real and imaginary parts of the 32-bit complex number CL\_var1 by L\_var2 positions.\\
If L\_var2 is negative, real and imaginary parts of CL\_var1 are shifted to the least significant bits by ( -L\_var2 ) positions with sign extension.\\
If L\_var2 is positive, real and imaginary parts of CL\_var1 are shifted to the most significant bits by (L\_var2) positions with 32-bit saturation control.\\
The following code snippet describes the operations performed on real \& imaginary part of a complex number:

{\tt \rulex{5mm} CL\_result.re = L\_shl(CL\_var1.re, L\_shift\_val);\\
\rulex{5mm} CL\_result.im = L\_shl(CL\_var1.im, L\_shift\_val);
{\tt \rulex{5mm} CL\_result.re = L\_shl(CL\_var1.re, L\_var2);\\
\rulex{5mm} CL\_result.im = L\_shl(CL\_var1.im, L\_var2);
}

%........................................................
Expand Down Expand Up @@ -1503,7 +1503,7 @@ \subsection{Operators with complexity weight of 1}
Multiplies 16-bit var1 by 16-bit var2, sign extends to 64 bits; subtracts this 64 bit value from the 64 bit W\_acc without saturation control, and returns a 64 bit result.

%........................................................
\NewOperator{W\_mult\_16\_16(W\_acc, var1, var2)}
\NewOperator{W\_mult\_16\_16(var1, var2)}

\textbf{ This operator is SIMD and VLIW friendly}

Expand Down Expand Up @@ -1542,29 +1542,29 @@ \subsection{Operators with complexity weight of 1}
Deposits the 32-bit L\_var1 into the 32 MS bits of the 64-bit output. The 32 LS bits of the output are zeroed.

%........................................................
\NewOperator{W\_sat\_l(W\_v1)}
\NewOperator{W\_sat\_l(W\_var1)}

Saturates the 64-bit variable W\_v1 to 32-bit value and returns the lower 32 bits.\\
Saturates the 64-bit variable W\_var1 to 32-bit value and returns the lower 32 bits.\\
For example, a 64-bit wide accumulator is helpful in accumulating 16*16 multiplies without checking for saturation.
However, at the end of the multiply-and-accumulate loop, we need to return only the 32-bit value after checking for saturation.\\
If W\_v1 is in 33Q31 format, then the result returned will be saturated to 1Q31 format.
If W\_var1 is in 33Q31 format, then the result returned will be saturated to 1Q31 format.

%........................................................
\NewOperator{W\_sat\_m(W\_v1)}
\NewOperator{W\_sat\_m(W\_var1)}

Arithmetically shifts right the 64-bit variable W\_v1 by 16 bits; saturates the 64-bit value to 32-bit value and returns the lower 32 bits.\\
Arithmetically shifts right the 64-bit variable W\_var1 by 16 bits; saturates the 64-bit value to 32-bit value and returns the lower 32 bits.\\
For example, a 64-bit wide accumulator is helpful in accumulating 32\*16 multiplies without checking for saturation.
A 32\*16 multiply gives a 48-bit product; at the end of the multiply-and-accumulate loop, the result is in the lower 48 bits of the 64-bit accumulator.
Now an arithmetic right shift by 16 bits will drop the LSB 16 bits.
Now we should check for saturation and return the lower 32 bits.\\
If W\_var is in 17Q47 format, then the result returned will be saturated to 1Q31 format.
If W\_var1 is in 17Q47 format, then the result returned will be saturated to 1Q31 format.

%........................................................
\NewOperator{W\_shl\_sat\_l(W\_1, var1)}
\NewOperator{W\_shl\_sat\_l(W\_var1, L\_var2)}

Arithmetically shifts left the 64-bit W\_v1 by v1 positions with lower 32-bit saturation and returns the 32 LSB of 64-bit result.\\
If v1 is negative, the result is shifted to right by (-var1) positions and sign extended.
After shift operation, returns the 32 MSB of 64-bit result.
Arithmetically shifts left the 64-bit W\_var1 by L\_var2 positions with lower 32-bit saturation and returns the 32 LSB of 64-bit result.\\
If L\_var2 is negative, the result is shifted to right by (-L\_var2) positions and sign extended.
After shift operation, returns the 32 LSB of 64-bit result.

%........................................................
\NewOperator{W\_extract\_l(W\_var1)}
Expand Down Expand Up @@ -1611,7 +1611,7 @@ \subsection{Operators with complexity weight of 1}
%........................................................
\NewOperator{W\_neg(W\_var1)}

Negates a 64-bit variables W\_var1 with 64-bit saturation control.
Negates the 64-bit variable W\_var1 with 64-bit saturation control.
Set overflow flag. Returns 64-bit result.

%........................................................
Expand Down Expand Up @@ -1713,7 +1713,7 @@ \subsection{Operators}
Returns the 32 MSB of the 64-bit result after truncating of the lower 32 bits.
The operation is performed in fractional mode.

For example, if L\_var1 is in 1Q31 format and var2 is in 1Q31 format, then the product is produced in 1Q63 format which is then truncated, saturated, and returned in 1Q31 format.
For example, if L\_var1 is in 1Q31 format and L\_var2 is in 1Q31 format, then the product is produced in 1Q63 format which is then truncated, saturated, and returned in 1Q31 format.

The following code snippet describes the operations performed:

Expand Down
Loading
Loading