Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP Channel Estimation #8

Merged
merged 35 commits into from
Jun 2, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
8235f53
implement argument parsing for IQ stream
marenz2569 Jul 2, 2023
a513161
move current decoder to bit_stream_decoder
marenz2569 Jul 2, 2023
9ef1196
implement reading IQ and hard decision symbol mapper
marenz2569 Jul 2, 2023
5e91c93
uplink sequence burst detection
marenz2569 Jul 3, 2023
fe70e99
implement first version of synchronization of bursts. very unperforma…
marenz2569 Jul 3, 2023
a99c463
add parsing stub for supplementary llc pdu
marenz2569 Jul 4, 2023
109e26c
fix upper mac parsing logic. add lower mac parsing for Normal Uplink …
marenz2569 Jul 4, 2023
ce6949a
use std::function to abstract and delay processing of upper mac in up…
marenz2569 Jul 4, 2023
c64bdfd
implement StreamingOrderedOutputThreadPoolExecutor
marenz2569 Jul 5, 2023
00a8bd6
remove duplicate code
marenz2569 Jul 5, 2023
63cc74e
add example for all different tetra RCPC punctering schemes
marenz2569 Jul 9, 2023
3853c6b
Use different viterbi decoder
marenz2569 Jul 9, 2023
4a7b1e9
add test for viterbi decoder
marenz2569 Jul 10, 2023
ad2eade
remove old code
marenz2569 Jul 10, 2023
c87e0d8
fix memory accumalation
marenz2569 Jul 11, 2023
0760983
update to newer version of viterbi decoder library. use sse4.1
marenz2569 Jul 11, 2023
a8ec51c
streaming thread pool executor wait_lok instead of lock and less threads
marenz2569 Aug 11, 2023
ebf0998
clang-format. add pthread names
marenz2569 Aug 12, 2023
cb239fa
update flake.lock to 23.05
marenz2569 Aug 12, 2023
38e9308
implement LLC basic link pdus with fcs
marenz2569 Aug 12, 2023
31946c5
implement a crude way to stop program on CTRL-C or EOF
marenz2569 Jan 23, 2024
feba058
optimize conv for detection
marenz2569 Jan 24, 2024
5c9bed1
improve performance by a bit
marenz2569 Jan 25, 2024
2057a1b
add more performance improvements
marenz2569 Jan 27, 2024
722a1fa
Refactor lower mac coding
marenz2569 Jan 27, 2024
53830b8
precompute descrambling table
marenz2569 Jan 28, 2024
643fd8b
fix bug in thread pool executor
marenz2569 Jan 28, 2024
83f80cc
move to raw pointers in performance critical regions
marenz2569 Jan 29, 2024
2d34a8e
l2/lower_mac: use fixed size buffer for descrambler result
marenz2569 Jan 29, 2024
ec9e2ef
l2/lower_mac: use fixed size buffer for reed muller 3014 result
marenz2569 Jan 29, 2024
10f9181
l2/lower_mac: use fixed size buffer for deinterleaver result
marenz2569 Jan 29, 2024
80a9b32
utils/bit_vector: do less copying and more unsafe pointer handling. s…
marenz2569 Jan 30, 2024
e85e832
update debug print
marenz2569 Feb 4, 2024
633aa81
update debug print
marenz2569 Feb 4, 2024
1389d55
fix descrambling precomputation
marenz2569 Feb 4, 2024
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
5 changes: 5 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,11 @@ add_executable(tetra
src/utils/bit_vector.cpp
src/utils/viter_bi_codec.cpp)

add_executable(tetra-puncturing
src/examples/tetra_puncturing.cpp)

target_compile_options(tetra PUBLIC -std=c++17 -Wall -Wno-unused-variable)
target_compile_options(tetra-puncturing PUBLIC -std=c++17 -Wall -Wno-unused-variable)

include_directories(src)

Expand All @@ -38,3 +42,4 @@ include_directories(${CMAKE_SOURCE_DIR}/include)
target_link_libraries(tetra ZLIB::ZLIB fmt::fmt nlohmann_json::nlohmann_json)

install(TARGETS tetra DESTINATION bin)
install(TARGETS tetra-puncturing DESTINATION bin)
51 changes: 51 additions & 0 deletions src/examples/tetra_puncturing.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
#include <functional>
#include <iostream>
#include <vector>

auto puncture(std::size_t num_bits, std::vector<int> P, std::function<int(int)> i_from_j) -> std::vector<int> {
auto t = P.size() - 1;

auto period = 8;

std::vector<int> res(num_bits * 4, 0);

for (auto j = 1; j <= res.size(); j++) {
auto i = i_from_j(j);
auto k = period * ((i - 1) / t) + P[i - t * ((i - 1) / t)];
if (k - 1 < res.size())
res[k - 1] = j;
}

return res;
}

auto print(std::vector<int> const& res) -> void {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pls keep it uniform const std::vector<>& or std::vector<> const&

for (auto i = 0; i < res.size();) {
auto j = i;
std::cout << " ";
for (; j < i + 16; j++) {
std::cout << res[j] << " ";
}
std::cout << std::endl;
i = j;
}
}

auto main(int argc, char** argv) -> int {
auto rate_2_3 = puncture(4, {0, 1, 2, 5}, [](int j) { return j; });
auto rate_1_3 = puncture(4, {0, 1, 2, 3, 5, 6, 7}, [](int j) { return j; });
auto rate_292_432 = puncture(11 * 4, {0, 1, 2, 5}, [](int j) { return j + (j - 1) / 65; });
auto rate_148_432 = puncture(3 * 4, {0, 1, 2, 3, 5, 6, 7}, [](int j) { return j + (j - 1) / 35; });

std::cout << "Rate 2/3:" << std::endl;
print(rate_2_3);

std::cout << "Rate 1/3:" << std::endl;
print(rate_1_3);

std::cout << "Rate 292/432:" << std::endl;
print(rate_292_432);

std::cout << "Rate 148/432:" << std::endl;
print(rate_148_432);
}