Embedded LC BPTC Progress

This commit is contained in:
Cort Buffington 2016-10-19 16:07:02 -05:00
parent f7f0f4a132
commit 7715a032ab

11
bptc.py
View File

@ -163,9 +163,16 @@ def encode_emblc(_lc, _csum5):
for hindex,hbit in zip(xrange(index+11,index+16), hamming.enc_16114(_binlc[index:index+11])):
_binlc.insert(hindex,hbit)
# TO DO NEXT:
# ADD PARITY BIT CALUCATIONS AND INTERLEAVE, RETURN A TUPLE OR LIBRARY OR EACH SEGMENT OF THE LC
print(_binlc, len(_binlc))
for index in xrange(0,16):
_binlc.insert(index+112, _binlc[index+0] ^ _binlc[index+16] ^ _binlc[index+32] ^ _binlc[index+48] ^ _binlc[index+64] ^ _binlc[index+80] ^ _binlc[index+96])
print(_binlc, len(_binlc))
# TO DO NEXT:
# INTERLEAVE, RETURN A TUPLE OR LIBRARY OR EACH SEGMENT OF THE LC
# EACH SEGMENT IS 4 COLUMNS, TOP TO BOTTOM, LEFT TO RIGHT (PAGE 124 ETSI)
#------------------------------------------------------------------------------
# Used to execute the module directly to run built-in tests