mirror of
https://github.com/aicodix/modem.git
synced 2026-04-27 14:30:34 +00:00
added 16 bit CRC
This commit is contained in:
parent
675ee7b024
commit
b8fb5e7dd6
3 changed files with 9 additions and 8 deletions
|
|
@ -273,11 +273,11 @@ struct Encoder : public Common
|
|||
schmidl_cox();
|
||||
for (int i = 0; i < data_bits; ++i)
|
||||
mesg[i] = nrz(CODE::get_le_bit(data, i));
|
||||
crc0.reset();
|
||||
crc1.reset();
|
||||
for (int i = 0; i < data_bytes; ++i)
|
||||
crc0(data[i]);
|
||||
crc1(data[i]);
|
||||
for (int i = 0; i < 32; ++i)
|
||||
mesg[i+data_bits] = nrz((crc0()>>i)&1);
|
||||
mesg[i+data_bits] = nrz((crc1()>>i)&1);
|
||||
polar_encoder(code, mesg, frozen_bits, code_order);
|
||||
shuffle(perm, code, code_order);
|
||||
CODE::MLS seq1(mls1_poly);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue