gr-projectCACHE is a GNU Radio module that combines, inter alia, novel caching strategies and polar codes for wireless communications. It uses its dedicated software library project_caching.
project_caching library:Definitons location:
DataDefinition.h :
cf_data, data_matrix, NODE, header_transmission, ...PC defined in PC.*FuncsFromMain.* :
colorRienumeration()Conversions.* :
conv_*() functions.PolarDec_b_impl.* itself:
update(), snr(), decode_header(), reinitialize()Terminology note:
PC_w.constructPC() construct Weak PC. Consists of 3 functions:
initPC(n,k,SNR). starts with setPC(n,k,SNR)constructGenMatrix() Construct Generator Matrix. uses kroneckerProduct()arrangeBits(). Based on Bhattacharyya parameter, need to look up.PC_s based on PC_w from step 1. Consists of 4 functions:
initPC(n,k,SNR). the same as the weaksetGenMatrix(PC_w.genMatrix) Copies Generator Matrix of PC_w.setRn(PC_w.Rn) Copies Permutation Vector of PC_w.setArrangedBits(PC_w.arragedBits) Copies arranged bits of PC_w.
Z array is just for computation, the actual arranged bits are in arragedBits[i] (TYPO included).work())
bool d_gen makes sure of that. In the following order:
generateData()conflictGraphGenerator()graspGraphColoring()colorRienumeration()int d_n_col > 0) we can start coding:
codingData()MaxBipartiteGraph()codingDataPolar()TX_PC_Pack() : Generate packets to be transmitted and stores them in d_transmission[]. Some notes:
d_transmission[] is a matrix and is NOT the output of the block. d_transmission1[] is the actual output vector and is made of vectors from d_transmission[]d_transmission1[] contains the Header, the Strong/Weak 2 information bytes and the payload.use cleanVar() & stop flowgraph.min(d_transmission1-d_offset,noutput_items)work() function again (loop all over) and skip step 1 since d_gen = false.Functions:
calculate_output_stream_length() return 0 ALWAYS ???update(): Updates d_y1 and d_y2 which are used in snr()
update(d_sSymb, in):
d_sSymb is actually input0 sizein[] is input0 (pointer)snr() computation :
LOGIC REMARK : returns first int argument ? and isn't affected to anything ? We don't care!
abs() commands since we compute powers with even parity (2 and 4)decode_header() :
conv_4QPSKsymb_to_int() and type conversions for each reading stepreinitialize() : Restore header and main variablesInitialization is the same as the Encoder, with more stuff:
d_id_user < d_n_users: readCacheInfo() ? Something about the last user ? (line 72)Runtime inside work():
Initialize some local variables
Get packet_num tags
Estimate SNR. Executed in every call of work(). The steps are :
update() then snr()Demodulate 8 QPSK symbols (ID of the Header) :
conv_8QPSKsymb_to_int() and compute Header ID d_id_spackd_case):
d_id_spack == d_id_expected, it means Rx packet was expected --> Successful transmission.
d_case = {1,2,3}d_id_spack != d_id_expected, it means Rx packet wasn't expected.
d_case = {0,4,5}INVESTIGATE STATE MACHINE
Check Remaining packets
Repeat
\
Content type
Image
Digest
Size
1.4 GB
Last updated
over 5 years ago
docker pull timina/coded_cache