fixed an alignment problem in an sse function. fixed some unused vector functions

master
Ismael Gomez 8 years ago
parent 1a9580da30
commit 783d26b40a

@ -41,7 +41,7 @@
#include "dci_sz_table.h" #include "dci_sz_table.h"
int harq_pid_len = 3; #define HARQ_PID_LEN 3
/* Unpacks a DCI message and configures the DL grant object /* Unpacks a DCI message and configures the DL grant object
*/ */
@ -240,7 +240,7 @@ uint32_t dci_format0_sizeof_(uint32_t nof_prb) {
uint32_t dci_format1A_sizeof(uint32_t nof_prb) { uint32_t dci_format1A_sizeof(uint32_t nof_prb) {
uint32_t n; uint32_t n;
n = 1 + 1 + riv_nbits(nof_prb) + 5 + harq_pid_len + 1 + 2 + 2; n = 1 + 1 + riv_nbits(nof_prb) + 5 + HARQ_PID_LEN + 1 + 2 + 2;
while (n < dci_format0_sizeof_(nof_prb)) { while (n < dci_format0_sizeof_(nof_prb)) {
n++; n++;
} }
@ -260,7 +260,7 @@ uint32_t dci_format0_sizeof(uint32_t nof_prb) {
uint32_t dci_format1_sizeof(uint32_t nof_prb) { uint32_t dci_format1_sizeof(uint32_t nof_prb) {
uint32_t n = (uint32_t) ceilf((float) nof_prb / srslte_ra_type0_P(nof_prb)) + 5 + harq_pid_len + 1 + 2 uint32_t n = (uint32_t) ceilf((float) nof_prb / srslte_ra_type0_P(nof_prb)) + 5 + HARQ_PID_LEN + 1 + 2
+ 2; + 2;
if (nof_prb > 10) { if (nof_prb > 10) {
n++; n++;
@ -316,7 +316,7 @@ uint32_t precoding_bits_f2(uint32_t nof_ports) {
} }
uint32_t dci_format2_sizeof(uint32_t nof_prb, uint32_t nof_ports) { uint32_t dci_format2_sizeof(uint32_t nof_prb, uint32_t nof_ports) {
uint32_t n = (uint32_t) ceilf((float) nof_prb / srslte_ra_type0_P(nof_prb))+2+harq_pid_len+1+2*(5+1+2)+precoding_bits_f2(nof_ports); uint32_t n = (uint32_t) ceilf((float) nof_prb / srslte_ra_type0_P(nof_prb))+2+HARQ_PID_LEN+1+2*(5+1+2)+precoding_bits_f2(nof_ports);
if (nof_prb > 10) { if (nof_prb > 10) {
n++; n++;
} }
@ -336,7 +336,7 @@ uint32_t precoding_bits_f2a(uint32_t nof_ports) {
} }
uint32_t dci_format2A_sizeof(uint32_t nof_prb, uint32_t nof_ports) { uint32_t dci_format2A_sizeof(uint32_t nof_prb, uint32_t nof_ports) {
uint32_t n = (uint32_t) ceilf((float) nof_prb / srslte_ra_type0_P(nof_prb))+2+harq_pid_len+1+2*(5+1+2)+precoding_bits_f2a(nof_ports); uint32_t n = (uint32_t) ceilf((float) nof_prb / srslte_ra_type0_P(nof_prb))+2+HARQ_PID_LEN+1+2*(5+1+2)+precoding_bits_f2a(nof_ports);
if (nof_prb > 10) { if (nof_prb > 10) {
n++; n++;
} }
@ -348,7 +348,7 @@ uint32_t dci_format2A_sizeof(uint32_t nof_prb, uint32_t nof_ports) {
} }
uint32_t dci_format2B_sizeof(uint32_t nof_prb, uint32_t nof_ports) { uint32_t dci_format2B_sizeof(uint32_t nof_prb, uint32_t nof_ports) {
uint32_t n = (uint32_t) ceilf((float) nof_prb / srslte_ra_type0_P(nof_prb))+2+harq_pid_len+1+2*(5+1+2); uint32_t n = (uint32_t) ceilf((float) nof_prb / srslte_ra_type0_P(nof_prb))+2+HARQ_PID_LEN+1+2*(5+1+2);
if (nof_prb > 10) { if (nof_prb > 10) {
n++; n++;
} }
@ -556,7 +556,7 @@ int dci_format1_pack(srslte_ra_dl_dci_t *data, srslte_dci_msg_t *msg, uint32_t n
srslte_bit_unpack(data->mcs_idx, &y, 5); srslte_bit_unpack(data->mcs_idx, &y, 5);
/* harq process number */ /* harq process number */
srslte_bit_unpack(data->harq_process, &y, harq_pid_len); srslte_bit_unpack(data->harq_process, &y, HARQ_PID_LEN);
*y++ = data->ndi; *y++ = data->ndi;
@ -615,7 +615,7 @@ int dci_format1_unpack(srslte_dci_msg_t *msg, srslte_ra_dl_dci_t *data, uint32_t
data->mcs_idx = srslte_bit_pack(&y, 5); data->mcs_idx = srslte_bit_pack(&y, 5);
/* harq process number */ /* harq process number */
data->harq_process = srslte_bit_pack(&y, harq_pid_len); data->harq_process = srslte_bit_pack(&y, HARQ_PID_LEN);
data->ndi = *y++ ? true : false; data->ndi = *y++ ? true : false;
// rv version // rv version
@ -688,7 +688,7 @@ int dci_format1As_pack(srslte_ra_dl_dci_t *data, srslte_dci_msg_t *msg, uint32_t
// in format1A, MCS = TBS according to 7.1.7.2 of 36.213 // in format1A, MCS = TBS according to 7.1.7.2 of 36.213
srslte_bit_unpack(data->mcs_idx, &y, 5); srslte_bit_unpack(data->mcs_idx, &y, 5);
srslte_bit_unpack(data->harq_process, &y, harq_pid_len); srslte_bit_unpack(data->harq_process, &y, HARQ_PID_LEN);
if (crc_is_crnti) { if (crc_is_crnti) {
if (nof_prb >= 50 && data->type2_alloc.mode == SRSLTE_RA_TYPE2_DIST) { if (nof_prb >= 50 && data->type2_alloc.mode == SRSLTE_RA_TYPE2_DIST) {
@ -789,7 +789,7 @@ int dci_format1As_unpack(srslte_dci_msg_t *msg, srslte_ra_dl_dci_t *data, uint32
// unpack MCS // unpack MCS
data->mcs_idx = srslte_bit_pack(&y, 5); data->mcs_idx = srslte_bit_pack(&y, 5);
data->harq_process = srslte_bit_pack(&y, harq_pid_len); data->harq_process = srslte_bit_pack(&y, HARQ_PID_LEN);
if (!crc_is_crnti) { if (!crc_is_crnti) {
if (nof_prb >= 50 && data->type2_alloc.mode == SRSLTE_RA_TYPE2_DIST) { if (nof_prb >= 50 && data->type2_alloc.mode == SRSLTE_RA_TYPE2_DIST) {
@ -850,7 +850,7 @@ int dci_format1B_unpack(srslte_dci_msg_t *msg, srslte_ra_dl_dci_t *data, uint32_
// unpack MCS, Harq pid and ndi // unpack MCS, Harq pid and ndi
data->mcs_idx = srslte_bit_pack(&y, 5); data->mcs_idx = srslte_bit_pack(&y, 5);
data->harq_process = srslte_bit_pack(&y, harq_pid_len); data->harq_process = srslte_bit_pack(&y, HARQ_PID_LEN);
data->ndi = *y++ ? true : false; data->ndi = *y++ ? true : false;
data->rv_idx = srslte_bit_pack(&y, 2); data->rv_idx = srslte_bit_pack(&y, 2);
@ -993,7 +993,7 @@ int dci_format1D_unpack(srslte_dci_msg_t *msg, srslte_ra_dl_dci_t *data, uint32_
// unpack MCS, Harq pid and ndi // unpack MCS, Harq pid and ndi
data->mcs_idx = srslte_bit_pack(&y, 5); data->mcs_idx = srslte_bit_pack(&y, 5);
data->harq_process = srslte_bit_pack(&y, harq_pid_len); data->harq_process = srslte_bit_pack(&y, HARQ_PID_LEN);
data->ndi = *y++ ? true : false; data->ndi = *y++ ? true : false;
data->rv_idx = srslte_bit_pack(&y, 2); data->rv_idx = srslte_bit_pack(&y, 2);
@ -1043,7 +1043,7 @@ int dci_format2AB_pack(srslte_ra_dl_dci_t *data, srslte_dci_msg_t *msg, uint32_t
y+=2; y+=2;
/* harq process number */ /* harq process number */
srslte_bit_unpack(data->harq_process, &y, harq_pid_len); srslte_bit_unpack(data->harq_process, &y, HARQ_PID_LEN);
// Transpor block to codeword swap flag // Transpor block to codeword swap flag
if (msg->format == SRSLTE_DCI_FORMAT2B) { if (msg->format == SRSLTE_DCI_FORMAT2B) {
@ -1114,7 +1114,7 @@ int dci_format2AB_unpack(srslte_dci_msg_t *msg, srslte_ra_dl_dci_t *data, uint32
y+=2; y+=2;
/* harq process number */ /* harq process number */
data->harq_process = srslte_bit_pack(&y, harq_pid_len); data->harq_process = srslte_bit_pack(&y, HARQ_PID_LEN);
// Transpor block to codeword swap flag // Transpor block to codeword swap flag
if (msg->format == SRSLTE_DCI_FORMAT2B) { if (msg->format == SRSLTE_DCI_FORMAT2B) {

@ -376,6 +376,7 @@ int rf_uhd_open_multi(char *args, void **h, uint32_t nof_rx_antennas)
if (strstr(args, "clock=external")) { if (strstr(args, "clock=external")) {
uhd_usrp_set_clock_source(handler->usrp, "external", 0); uhd_usrp_set_clock_source(handler->usrp, "external", 0);
} else if (strstr(args, "clock=gpsdo")) { } else if (strstr(args, "clock=gpsdo")) {
printf("Using GPSDO clock\n");
uhd_usrp_set_clock_source(handler->usrp, "gpsdo", 0); uhd_usrp_set_clock_source(handler->usrp, "gpsdo", 0);
} }

@ -153,28 +153,28 @@ void srslte_vec_sum_bbb(uint8_t *x, uint8_t *y, uint8_t *z, uint32_t len) {
void srslte_vec_sc_add_fff(float *x, float h, float *z, uint32_t len) { void srslte_vec_sc_add_fff(float *x, float h, float *z, uint32_t len) {
int i; int i;
for (i=0;i<len;i++) { for (i=0;i<len;i++) {
z[i] += h; z[i] = x[i]+h;
} }
} }
void srslte_vec_sc_add_cfc(cf_t *x, float h, cf_t *z, uint32_t len) { void srslte_vec_sc_add_cfc(cf_t *x, float h, cf_t *z, uint32_t len) {
int i; int i;
for (i=0;i<len;i++) { for (i=0;i<len;i++) {
z[i] += h; z[i] = x[i]+ h;
} }
} }
void srslte_vec_sc_add_ccc(cf_t *x, cf_t h, cf_t *z, uint32_t len) { void srslte_vec_sc_add_ccc(cf_t *x, cf_t h, cf_t *z, uint32_t len) {
int i; int i;
for (i=0;i<len;i++) { for (i=0;i<len;i++) {
z[i] += h; z[i] = x[i]+ h;
} }
} }
void srslte_vec_sc_add_sss(int16_t *x, int16_t h, int16_t *z, uint32_t len) { void srslte_vec_sc_add_sss(int16_t *x, int16_t h, int16_t *z, uint32_t len) {
int i; int i;
for (i=0;i<len;i++) { for (i=0;i<len;i++) {
z[i] += h; z[i] = x[i]+ h;
} }
} }

@ -58,7 +58,7 @@ int srslte_vec_dot_prod_sss_simd(short *x, short *y, uint32_t len)
for(;number < points; number++){ for(;number < points; number++){
xVal = _mm_load_si128(xPtr); xVal = _mm_load_si128(xPtr);
yVal = _mm_load_si128(yPtr); yVal = _mm_loadu_si128(yPtr);
zVal = _mm_mullo_epi16(xVal, yVal); zVal = _mm_mullo_epi16(xVal, yVal);

Loading…
Cancel
Save