Commit 1cdf7af3 authored by Florian Kaltenberger's avatar Florian Kaltenberger

moving the ldpci_decoder to CODING directory

some minor changes
parent 6529f900
......@@ -1037,6 +1037,7 @@ set(PHY_SRC
${OPENAIR1_DIR}/PHY/CODING/ccoding_byte_lte.c
${OPENAIR1_DIR}/PHY/CODING/3gpplte_sse.c
${OPENAIR1_DIR}/PHY/CODING/crc_byte.c
${OPENAIR1_DIR}/PHY/CODING/ldpc_decoder.c
${OPENAIR1_DIR}/PHY/CODING/3gpplte_turbo_decoder_sse_8bit.c
${OPENAIR1_DIR}/PHY/CODING/3gpplte_turbo_decoder_sse_16bit.c
${OPENAIR1_DIR}/PHY/CODING/3gpplte_turbo_decoder_avx2_16bit.c
......@@ -1932,7 +1933,7 @@ target_link_libraries (dlsim_tm4
)
add_executable(ldpctest ${OPENAIR1_DIR}/PHY/CODING/TESTBENCH/ldpctest.c)
target_link_libraries(ldpctest m SIMU ${ATLAS_LIBRARIES})
target_link_libraries(ldpctest m SIMU PHY ${ATLAS_LIBRARIES})
foreach(myExe dlsim dlsim_tm7 ulsim pbchsim scansim mbmssim pdcchsim pucchsim prachsim syncsim)
......
......@@ -27,7 +27,7 @@
#include "SIMULATION/TOOLS/defs.h"
#include "Gen_shift_value.h"
#include "test.h"
// 4-bit quantizer
char quantize4bit(double D,double x)
{
......@@ -95,7 +95,6 @@ int test_ldpc(short No_iteration,
double *modulated_input;
short *channel_output_fixed;
unsigned int i,trial=0;
unsigned char crc_type;
short *Gen_shift_values, *no_shift_values, *pointer_shift_values;
short BG,Zc,Kb,nrows,ncols;
......@@ -302,17 +301,16 @@ int main(int argc, char *argv[])
unsigned int errors,crc_misses;
unsigned int block_length=1280;
short No_iteration=25;
double rate=0.2;
short No_iteration=25;
double rate=0.2;
double SNR,SNR_lin;
unsigned char qbits;
time_stats_t time;
unsigned char NB_RB=25;
int num_pdcch_symbols = 1;
int subframe = 6;
int i=0;
int i=0;
opp_enabled=1;
cpu_freq_GHz = get_cpu_freq_GHz();
randominit(0);
//logInit();
......@@ -324,9 +322,9 @@ int i=0;
//printf("Quantization bits %d\n",qbits);
unsigned int decoded_errors[2]; // initiate the size of matrix equivalent to
// size of SNR
for (SNR=-3; SNR<-2.8; SNR+=.1) {
unsigned int decoded_errors[100]; // initiate the size of matrix equivalent to
// size of SNR
for (SNR=-3.5; SNR<-2.5; SNR+=.1) {
SNR_lin = pow(10,SNR/10);
......@@ -342,22 +340,26 @@ for (SNR=-3; SNR<-2.8; SNR+=.1) {
&crc_misses,
&iterations);
*/
decoded_errors[i]=test_ldpc(No_iteration,
start_meas(&time);
decoded_errors[i]=test_ldpc(No_iteration,
rate,
SNR_lin, // noise standard deviation
qbits,
block_length, // block length bytes
NTRIALS,
&errors,
&crc_misses);
i=i+1;
stop_meas(&time);
print_meas_now(&time, "", stdout);
printf("SNR %f, BLER %f (%d/%d)\n",SNR,(float)decoded_errors[i]/(float)NTRIALS,decoded_errors[i],NTRIALS);
i=i+1;
}
printf("%d\n",decoded_errors[0]);
printf("%d\n",decoded_errors[1]);
//printf("%d\n",errors[2]);
return(0);
}
......
......@@ -561,4 +561,5 @@ uint32_t crcbit (uint8_t * ,
int16_t reverseBits(int32_t ,int32_t);
void phy_viterbi_dot11(int8_t *,uint8_t *,uint16_t);
short *ldpc_decoder(short *msgChannel,short block_length,short No_iteration,double rate);
#endif
/*
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The OpenAirInterface Software Alliance licenses this file to You under
* the OAI Public License, Version 1.0 (the "License"); you may not use this file
* except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.openairinterface.org/?page_id=698
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*-------------------------------------------------------------------------------
* For more information about the OpenAirInterface (OAI) Software Alliance:
* contact@openairinterface.org
*
* Author: Kien le Trung trung-kien.le@eurecom.fr
*/
#include <stdlib.h>
#include <math.h>
#include <stdio.h>
#include <string.h>
short sign(short x) {
return (x > 0) - (x < 0);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment