Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
54 commits
Select commit Hold shift + click to select a range
3e9ced2
first pass at datac4, but has acquisition problems on MPP, even at hi…
drowe67 Dec 8, 2022
653d7a9
prototyped datac5 in Octave: 1700 bits/s 7dB MPP, which is too close …
drowe67 Dec 8, 2022
1718fe3
tried a rate 0.75 code but much poorer performance, so back to rate 0.6
drowe67 Dec 9, 2022
5299fb3
cleaned up ofdm_acquisition a little
drowe67 Dec 9, 2022
522bec2
added an input BPF to datac4 acquisition, sensible results at -5dB MP…
drowe67 Dec 9, 2022
3705dfe
fix ctest
drowe67 Dec 9, 2022
006c822
tweaks to support testing low rate FSK on MPP channels
drowe67 Dec 11, 2022
6eee22f
ability to change LDPC code for FSK
drowe67 Dec 11, 2022
83ea1e8
Merge branch 'master' into dr-datac4
drowe67 Dec 16, 2022
ae9c964
trying rate 1/3 code
drowe67 Apr 13, 2023
1fb0eba
trying rate 1/2 Wimax (1152,576) code
drowe67 Apr 13, 2023
f82b868
waveform used with rate 1/2 Wimax (1152,576)
drowe67 Apr 13, 2023
594eac8
first pass at datac13, shorter packet leads to decreased performance …
drowe67 Apr 13, 2023
0c81296
printing edge pilots correctly in print_config(), raised UW threshold…
drowe67 Apr 14, 2023
237ef59
datac13 prototyping spread_uw option, no clear advantage as yet. Adj…
drowe67 Apr 14, 2023
c5e1c2a
make H_256_512_4.mat compatible with ldpcut
drowe67 Apr 14, 2023
5314ec6
first pass at rate 1/3 datac17, PER=0.11 at -4dB
drowe67 Apr 15, 2023
a6f5a14
datac4 on spreadsheet works out UW and Np automagically
drowe67 Apr 15, 2023
e154f2a
trying datac4 with at (1472,448) code ... PER=0.16 at -4dB MPP
drowe67 Apr 15, 2023
4436af1
trying 4 carriers for datac4, worked better, PER=0.1 at -4dB
drowe67 Apr 15, 2023
40c8831
helper function and notes for setting UW thresholds
drowe67 Apr 15, 2023
bbf491e
zero stuffing: comments around use, and unittest at the ldpcut.m leve…
drowe67 Apr 20, 2023
b75e279
refactored ofdm_lib into smaller files
drowe67 Apr 20, 2023
20b9641
first pass at datac4 ofdm_mod Tx talking to Octave rx ok if we stuff …
drowe67 Apr 20, 2023
f369bef
changed Octave from zero stuffing -> 1's stuffing to match C code
drowe67 Apr 20, 2023
a006101
adjusting levels, wider filter input to make a nicer high SNR scatter…
drowe67 Apr 20, 2023
c183a44
subtle off by one error in nuwframes calculation
drowe67 Apr 20, 2023
1b14c7d
added datac13, ofdm_demod working for datac4 and datac13
drowe67 Apr 20, 2023
8ac9257
first pass datac4/datac14 ctests to help QA next stages of C port
drowe67 Apr 21, 2023
ac69d2e
moving mode specifc 1s stuffing out of ofdm_mod & ofdm_demod and into…
drowe67 Apr 21, 2023
4d090c7
hooks for mode-specific 1's stuffing
drowe67 Apr 21, 2023
08e6c63
bug fix for 2020
drowe67 Apr 21, 2023
4aa3250
first pass FreeDV API support for datac4 & datac13, and ctests so QA …
drowe67 Apr 21, 2023
a059989
Merge branch 'master' into dr-datac4
drowe67 Apr 21, 2023
89178a4
first pass at rx input BPF, but introducing some raw bit errors in da…
drowe67 Apr 21, 2023
c416cd4
datac13 had input BPF, also introducing bit errors
drowe67 Apr 21, 2023
e289fe1
wip Octave version of Jim's complex band pass filter
drowe67 Apr 25, 2023
d9eb3d7
Octave version on Jim's complex filter doing a reasonable job
drowe67 Apr 25, 2023
85da8e6
ofdm_demod --log & ofdm_demod_c.m working again
drowe67 Apr 25, 2023
9201ff1
use complex output of quisk_ccfFilter
drowe67 Apr 25, 2023
58db310
unit test program for src/filter.c complex BPF
drowe67 Apr 25, 2023
422f644
fixed issue with rx bpf introducing errors, we had to apply filter in…
drowe67 Apr 25, 2023
d6ba98a
moved complex BPF into ofdm_lib.m, so it can be used by ofdm_ldpc_rx …
drowe67 Apr 25, 2023
a993ca6
ofdm_acquisition tweaks to use with datac4 & datac13
drowe67 Apr 29, 2023
e7811cd
a few laps of ofdm_acquisition, 100 packet MPP -4dB ofdm_ldpc_rx test…
drowe67 Apr 29, 2023
7264290
C port of acquisition tuning
drowe67 Apr 29, 2023
ff5f86b
Octave: refactored complex BPF code so Tx and Rx can use same filter,…
drowe67 Apr 29, 2023
e9f3533
ported tx BPF and clipper settings to C, doing sensible things but ne…
drowe67 May 1, 2023
1089b6b
updated check of peak levels to include datac4 & datac13
drowe67 May 1, 2023
689fe36
some support for datac4 & datac13 on curves
drowe67 May 2, 2023
8cacde1
updated README_data.md, have put raw data section at top as it is in …
drowe67 May 2, 2023
6521773
Update README_data.md
drowe67 May 2, 2023
605edcc
Update README_data.md
drowe67 May 2, 2023
30f2a61
ctest for quisk filter
drowe67 May 3, 2023
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
95 changes: 90 additions & 5 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -355,10 +355,26 @@ endif()
")
set_tests_properties(test_fdmdv_48to8 PROPERTIES PASS_REGULAR_EXPRESSION "PASS")

# Basic sanity check of Quisk complex band pass filter. Note complex filtering cosw(wn) gives
# just the +ve freq exp(jwn) so output power is 0.5 input power
add_test(NAME test_quisk_filter
COMMAND sh -c "cd ${CMAKE_CURRENT_SOURCE_DIR}/octave;
${CMAKE_CURRENT_BINARY_DIR}/misc/mksine in.raw 1500 1;
cat in.raw | ${CMAKE_CURRENT_BINARY_DIR}/unittest/tquisk_filter |
sox -t .s16 -r 8000 -c 1 - -t .s16 out.raw vol 2;
cd ${CMAKE_CURRENT_SOURCE_DIR}/octave;
DISPLAY=\"\" echo \"diff_fft_mag('in.raw','out.raw'); quit;\" | octave-cli -qf
")
set_tests_properties(test_quisk_filter PROPERTIES PASS_REGULAR_EXPRESSION "PASS")

add_test(NAME test_CML_ldpcut
COMMAND sh -c "cd ${CMAKE_CURRENT_SOURCE_DIR}/octave; SHORT_VERSION_FOR_CTEST=1 octave-cli -qf ldpcut.m")
COMMAND sh -c "cd ${CMAKE_CURRENT_SOURCE_DIR}/octave; CTEST_SINGLE=1 octave-cli -qf ldpcut.m")
set_tests_properties(test_CML_ldpcut PROPERTIES PASS_REGULAR_EXPRESSION "Nerr: 0")

add_test(NAME test_CML_ldpcut_one_stuffing
COMMAND sh -c "cd ${CMAKE_CURRENT_SOURCE_DIR}/octave; CTEST_ONE_STUFFING=1 octave-cli -qf ldpcut.m")
set_tests_properties(test_CML_ldpcut_one_stuffing PROPERTIES PASS_REGULAR_EXPRESSION "Ferrs: 0")

# Golay (23,11) unit tests
add_test(NAME test_golay23 COMMAND sh -c "${CMAKE_CURRENT_BINARY_DIR}/unittest/golay23")
add_test(NAME test_golay23_runtime_tables COMMAND sh -c "${CMAKE_CURRENT_BINARY_DIR}/unittest/golay23_runtime_tables")
Expand Down Expand Up @@ -407,6 +423,10 @@ endif()
DISPLAY=\"\" octave-cli -qf fdmdv_ut.m")
set_tests_properties(test_FDMDV_modem_octave_c PROPERTIES PASS_REGULAR_EXPRESSION "errors......: 0")

# -------------------------------------------------------------------------
# COHPSK Modem
# -------------------------------------------------------------------------

add_test(NAME test_COHPSK_modem_octave_port
COMMAND sh -c "$<TARGET_FILE:tcohpsk> && DISPLAY=\"\" octave-cli --no-gui -qf ${CMAKE_CURRENT_SOURCE_DIR}/octave/tcohpsk.m"
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/octave)
Expand Down Expand Up @@ -470,7 +490,7 @@ endif()

add_test(NAME test_OFDM_modem_octave_burst_acq
COMMAND sh -c "cd ${CMAKE_CURRENT_SOURCE_DIR}/octave;
echo \"ofdm_acquisition; quit\" | DISPLAY=\"\" octave-cli")
echo \"ctest=1; ofdm_acquisition; quit\" | DISPLAY=\"\" octave-cli")
set_tests_properties(test_OFDM_modem_octave_burst_acq PROPERTIES PASS_REGULAR_EXPRESSION "P.acq. = 1.00")

add_test(NAME test_OFDM_modem_octave_datac0_postamble
Expand Down Expand Up @@ -584,8 +604,9 @@ endif()
# -------------------------------------------------------------------------

# To integrate a new mode/waveform we prototype in Octave, get the core OFDM modem
# running in C, then the FreeDV API. Here we test Octave and the C versions of the
# OFDM modem working together, to help prevent any bit rot between them
# running in C (ofdm_mod & ofdm_demod), then the FreeDV API (frredv_tx & freedv_rx).
# Here we test Octave and the C versions of the OFDM modem working together, to help
# prevent any bit rot between them

# DATAC0 burst mode Octave Tx, C Rx
add_test(NAME test_OFDM_modem_datac0_octave_burst
Expand Down Expand Up @@ -630,7 +651,36 @@ endif()
./ch - - --No -17 |
./ofdm_demod --mode datac0 --out /dev/null --testframes --ldpc --verbose 2 --packetsperburst 1")

# -------------------------------------------------------------------------
# DATAC4 C Tx, Octave Rx, burst mode
add_test(NAME test_OFDM_modem_datac4_octave
COMMAND sh -c "cd ${CMAKE_CURRENT_BINARY_DIR};
./src/ofdm_mod --mode datac4 --in /dev/zero --testframes 1 --verbose 1 --ldpc --bursts 5 > test.raw;
cd ${CMAKE_CURRENT_SOURCE_DIR}/octave;
DISPLAY=\"\" octave-cli -qf --eval 'ofdm_ldpc_rx(\"${CMAKE_CURRENT_BINARY_DIR}/test.raw\",\"datac4\",\"packetsperburst\",1)'")
set_tests_properties(test_OFDM_modem_datac3_octave PROPERTIES PASS_REGULAR_EXPRESSION "Coded PER: 0.0000 Pckts: 5")

# DATAC13 Octave Tx, C Rx, burst mode
add_test(NAME test_OFDM_modem_datac13_octave
COMMAND sh -c "cd ${CMAKE_CURRENT_SOURCE_DIR}/octave;
DISPLAY=\"\" octave-cli -qf --eval 'ofdm_ldpc_tx(\"${CMAKE_CURRENT_BINARY_DIR}/src/test.raw\",\"datac13\",1,3,\"awgn\",\"bursts\",5)';
cd ${CMAKE_CURRENT_BINARY_DIR}/src;
cat test.raw | ./ofdm_demod --mode datac13 --out /dev/null --testframes --ldpc --verbose 2 --packetsperburst 1")

# DATAC4 C Tx, C Rx, burst mode
add_test(NAME test_OFDM_modem_datac4_ldpc_burst
COMMAND sh -c "cd ${CMAKE_CURRENT_BINARY_DIR}/src;
./ofdm_mod --mode datac4 --in /dev/zero --testframes 1 --verbose 1 --ldpc --bursts 10 |
./ch - - --No -17 |
./ofdm_demod --mode datac4 --out /dev/null --testframes --ldpc --verbose 2 --packetsperburst 1")

# DATAC13 C Tx, C Rx, burst mode
add_test(NAME test_OFDM_modem_datac13_ldpc_burst
COMMAND sh -c "cd ${CMAKE_CURRENT_BINARY_DIR}/src;
./ofdm_mod --mode datac13 --in /dev/zero --testframes 1 --verbose 1 --ldpc --bursts 10 |
./ch - - --No -17 |
./ofdm_demod --mode datac13 --out /dev/null --testframes --ldpc --verbose 2 --packetsperburst 1")

# -------------------------------------------------------------------------
# LDPC
# -------------------------------------------------------------------------

Expand Down Expand Up @@ -1007,6 +1057,24 @@ if (NOT APPLE)
./freedv_data_raw_tx --testframes 10 DATAC1 /dev/zero /dev/null")
set_tests_properties(test_memory_leak_FreeDV_DATAC1_tx PROPERTIES PASS_REGULAR_EXPRESSION "ERROR SUMMARY: 0 errors")

add_test(NAME test_memory_leak_FreeDV_DATAC3_tx
COMMAND sh -c "cd ${CMAKE_CURRENT_BINARY_DIR}/src;
valgrind --leak-check=full --show-leak-kinds=all --track-origins=yes \
./freedv_data_raw_tx --testframes 10 DATAC3 /dev/zero /dev/null")
set_tests_properties(test_memory_leak_FreeDV_DATAC3_tx PROPERTIES PASS_REGULAR_EXPRESSION "ERROR SUMMARY: 0 errors")

add_test(NAME test_memory_leak_FreeDV_DATAC4_tx
COMMAND sh -c "cd ${CMAKE_CURRENT_BINARY_DIR}/src;
valgrind --leak-check=full --show-leak-kinds=all --track-origins=yes \
./freedv_data_raw_tx --testframes 10 DATAC4 /dev/zero /dev/null")
set_tests_properties(test_memory_leak_FreeDV_DATAC4_tx PROPERTIES PASS_REGULAR_EXPRESSION "ERROR SUMMARY: 0 errors")

add_test(NAME test_memory_leak_FreeDV_DATAC13_tx
COMMAND sh -c "cd ${CMAKE_CURRENT_BINARY_DIR}/src;
valgrind --leak-check=full --show-leak-kinds=all --track-origins=yes \
./freedv_data_raw_tx --testframes 10 DATAC13 /dev/zero /dev/null")
set_tests_properties(test_memory_leak_FreeDV_DATAC13_tx PROPERTIES PASS_REGULAR_EXPRESSION "ERROR SUMMARY: 0 errors")

add_test(NAME test_memory_leak_FreeDV_700E_tx
COMMAND sh -c "cd ${CMAKE_CURRENT_BINARY_DIR}/src;
valgrind --leak-check=full --show-leak-kinds=all --track-origins=yes \
Expand Down Expand Up @@ -1244,6 +1312,20 @@ endif(NOT APPLE)
./freedv_data_raw_rx DATAC3 - binaryOut.bin -v;
diff binaryIn.bin binaryOut.bin")

add_test(NAME test_freedv_data_raw_ofdm_datac4_burst_file
COMMAND sh -c "cd ${CMAKE_CURRENT_BINARY_DIR}/src;
head -c $((54*10)) </dev/urandom > binaryIn.bin;
./freedv_data_raw_tx DATAC4 binaryIn.bin - --bursts 10 |
./freedv_data_raw_rx DATAC4 - binaryOut.bin -v;
diff binaryIn.bin binaryOut.bin")

add_test(NAME test_freedv_data_raw_ofdm_datac13_burst_file
COMMAND sh -c "cd ${CMAKE_CURRENT_BINARY_DIR}/src;
head -c $((14*10)) </dev/urandom > binaryIn.bin;
./freedv_data_raw_tx DATAC13 binaryIn.bin - --bursts 10 |
./freedv_data_raw_rx DATAC13 - binaryOut.bin -v;
diff binaryIn.bin binaryOut.bin")

# FSK LDPC default 100 bit/s 2FSK, enough noise for several % raw BER to give
# FEC/acquisition a work out, bursts of 1 frame as that stresses acquisition
add_test(NAME test_freedv_data_raw_fsk_ldpc_100
Expand Down Expand Up @@ -1320,12 +1402,15 @@ endif(NOT APPLE)
# Set common properties for tests that need Octave/CML
set_tests_properties(
test_CML_ldpcut
test_CML_ldpcut_one_stuffing
test_OFDM_modem_octave_port
test_OFDM_modem_octave_port_Nc_31
test_OFDM_modem_octave_datac0_mpp_coded
test_OFDM_modem_datac0_octave_burst
test_OFDM_modem_datac1_octave
test_OFDM_modem_datac3_octave
test_OFDM_modem_datac4_octave
test_OFDM_modem_datac13_octave
test_fsk_lib_4fsk_ldpc
test_OFDM_modem_datac0_compression
PROPERTIES
Expand Down
Loading