rxRaw = readmatrix("iladata_rx.csv"); rx = [rxRaw(:, 4)+1i*rxRaw(:, 5),rxRaw(:, 6)+1i*rxRaw(:, 7),... rxRaw(:, 8)+1i*rxRaw(:, 9),rxRaw(:,10)+1i*rxRaw(:,11)]; wx_16b = [-17479 + 27717i; 31421 - 3885i; 31472 + 3727i; -17615 - 27560i]; s = wx_16b'*rx.'; % plot(real(s)) streamRaw = readmatrix("iladata_weight.csv"); accor_stream_bit_num = (4*4*2+2)*32; accor_stream_valid = streamRaw(:,5); accor_stream_data = streamRaw(:,6); weight_stream_data = streamRaw(:,7); if (find(accor_stream_valid==1,1) == 1) accor_stream_data_index = find(accor_stream_valid==1,2); else accor_stream_data_index = find(accor_stream_valid==1,1); end accor_stream_data_str = num2str(reshape(accor_stream_data((1:accor_stream_bit_num)+... accor_stream_data_index-1),32,[])'); accor_stream_data_one_hop = zeros(1,32); for i=1:32 tmp = bin2dec(erase(convertCharsToStrings(accor_stream_data_str(i+2,:))," ")); if (tmp >= 2^31-1) accor_stream_data_one_hop(i) = tmp - 2^32; else accor_stream_data_one_hop(i) = tmp; end end weight_stream_data_index = 1; flag = 1; while (flag) weight_stream_data_str = num2str(weight_stream_data((1:32)+weight_stream_data_index-1)'); tmp = bin2dec(erase(convertCharsToStrings(weight_stream_data_str)," ")); if (tmp == hex2dec("7E7E7E7E")) flag = 0; else weight_stream_data_index = weight_stream_data_index + 1; end end