Minor changes

Fix UE sequence generation

minor change
master
Xavier Arteaga 5 years ago committed by Andre Puschmann
parent 94f62b54ad
commit d94078d543

@ -1004,9 +1004,8 @@ int main(int argc, char** argv)
plot_real_t p_sync, pce;
plot_scatter_t pscatequal, pscatequal_pdcch, pscatequal_pmch;
float tmp_plot[110 * 15 * 2048];
float tmp_plot2[110 * 15 * 2048];
float tmp_plot3[110 * 15 * 2048];
static float tmp_plot[110 * 15 * 2048];
static float tmp_plot2[110 * 15 * 2048];
void* plot_thread_run(void* arg)
{
@ -1062,7 +1061,9 @@ void* plot_thread_run(void* arg)
}
}
int sz = srslte_symbol_sz(ue_dl.cell.nof_prb);
srslte_vec_f_zero(tmp_plot2, sz);
if (sz > 0) {
srslte_vec_f_zero(tmp_plot2, sz);
}
int g = (sz - 12 * ue_dl.cell.nof_prb) / 2;
for (i = 0; i < 12 * ue_dl.cell.nof_prb; i++) {
tmp_plot2[g + i] = srslte_convert_amplitude_to_dB(cabsf(ue_dl.chest_res.ce[0][0][i]));

@ -19,17 +19,13 @@
*
*/
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <strings.h>
#include <time.h>
#include <unistd.h>
#include "srslte/phy/utils/random.h"
#include "srslte/srslte.h"
#include <sys/time.h>
#include <time.h>
uint32_t long_cb = 0;
@ -57,8 +53,8 @@ void parse_args(int argc, char** argv)
}
}
uint8_t input_bytes[6144 / 8];
uint8_t input_bits[6144];
uint8_t input_bytes[6144 / 8 + 3];
uint8_t input_bits[6144 + 24];
uint8_t parity[3 * 6144 + 12];
uint8_t parity_bits[3 * 6144 + 12];
uint8_t output_bits[3 * 6144 + 12];
@ -66,7 +62,7 @@ uint8_t output_bits2[3 * 6144 + 12];
int main(int argc, char** argv)
{
srslte_random_t random_gen = srslte_random_init(0);
parse_args(argc, argv);
srslte_tcod_t tcod;
@ -82,7 +78,7 @@ int main(int argc, char** argv)
long_cb = srslte_cbsegm_cbsize(len);
printf("Checking long_cb=%d\n", long_cb);
for (int i = 0; i < long_cb / 8; i++) {
input_bytes[i] = rand() % 256;
input_bytes[i] = srslte_random_uniform_int_dist(random_gen, 0, 256);
}
srslte_bit_unpack_vector(input_bytes, input_bits, long_cb);
@ -127,6 +123,7 @@ int main(int argc, char** argv)
}
srslte_tcod_free(&tcod);
srslte_random_free(random_gen);
printf("Done\n");
exit(0);
}

@ -34,7 +34,7 @@ typedef union {
__m64 v;
} decision_t;
union branchtab27 {
static union branchtab27 {
unsigned char c[32];
__m256i v;
} Branchtab37_sse2[3];

@ -29,7 +29,7 @@ typedef union {
__m64 v[1];
} decision_t;
union branchtab27 {
static union branchtab27 {
unsigned char c[32];
__m128i v[2];
} Branchtab37_sse2[3];

@ -281,6 +281,8 @@ int main(int argc, char** argv)
srslte_chest_ul_res_set_identity(&chest_res);
cfg.enable_64qam = enable_64_qam;
uint64_t decode_us = 0;
uint64_t decode_bits = 0;
for (int n = 0; n < subframe; n++) {
ret = SRSLTE_SUCCESS;
@ -385,8 +387,11 @@ int main(int argc, char** argv)
cfg.grant.tb.tbs,
(float)cfg.grant.tb.tbs / 1000,
(float)cfg.grant.tb.tbs / t[0].tv_usec);
decode_us += t[0].tv_usec;
decode_bits += cfg.grant.tb.tbs;
}
printf("Decoded Rate: %f Mbps\n", (double)decode_bits / (double)decode_us);
quit:
srslte_chest_ul_res_free(&chest_res);
srslte_pusch_free(&pusch_tx);

@ -218,7 +218,7 @@ int work_ue(srslte_ue_dl_t* ue_dl,
ue_dl_cfg->cfg.pdsch.p_b = (transmission_mode > SRSLTE_TM1) ? 1 : 0; // 0 dB
ue_dl_cfg->cfg.pdsch.rnti = dci_dl->rnti;
ue_dl_cfg->cfg.pdsch.csi_enable = false;
ue_dl_cfg->cfg.pdsch.meas_evm_en = true;
ue_dl_cfg->cfg.pdsch.meas_evm_en = false;
if (srslte_verbose >= SRSLTE_VERBOSE_INFO) {
char str[512];

@ -183,7 +183,7 @@ void cc_worker::set_tti(uint32_t tti_)
int cc_worker::add_rnti(uint16_t rnti, bool is_pcell, bool is_temporal)
{
if (!is_temporal && !ue_db.count(rnti)) {
if (not is_temporal) {
if (srslte_enb_dl_add_rnti(&enb_dl, rnti)) {
return -1;
}
@ -359,9 +359,11 @@ int cc_worker::decode_pusch(stack_interface_phy_lte::ul_sched_grant_t* grants, u
ue_db[rnti]->metrics_ul(grants[i].dci.tb.mcs_idx, 0, snr_db, pusch_res.avg_iterations_block);
// Logging
char str[512];
srslte_pusch_rx_info(&ul_cfg.pusch, &pusch_res, &enb_ul.chest_res, str, 512);
Info("PUSCH: cc=%d, %s\n", cc_idx, str);
if (log_h->get_level() >= srslte::LOG_LEVEL_INFO) {
char str[512];
srslte_pusch_rx_info(&ul_cfg.pusch, &pusch_res, &enb_ul.chest_res, str, sizeof(str));
log_h->info("PUSCH: cc=%d, %s\n", cc_idx, str);
}
}
}
}
@ -465,7 +467,7 @@ int cc_worker::encode_pdcch_dl(stack_interface_phy_lte::dl_sched_grant_t* grants
// Logging
char str[512];
srslte_dci_dl_info(&grants[i].dci, str, 512);
Info("PDCCH: cc=%d, %s, tti_tx_dl=%d\n", cc_idx, str, tti_tx_dl);
log_h->info("PDCCH: cc=%d, %s, tti_tx_dl=%d\n", cc_idx, str, tti_tx_dl);
}
}
}

Loading…
Cancel
Save