Adding VCD liberaries to dlschsim
This commit is contained in:
committed by
Thomas Schlichter
parent
c984c71f52
commit
aec5ebcfff
@@ -2646,8 +2646,9 @@ add_executable(nr_dlschsim
|
|||||||
${OPENAIR1_DIR}/SIMULATION/NR_PHY/dlschsim.c
|
${OPENAIR1_DIR}/SIMULATION/NR_PHY/dlschsim.c
|
||||||
${OPENAIR_DIR}/common/utils/backtrace.c
|
${OPENAIR_DIR}/common/utils/backtrace.c
|
||||||
${OPENAIR_DIR}/common/utils/system.c
|
${OPENAIR_DIR}/common/utils/system.c
|
||||||
|
${UTIL_SRC}
|
||||||
${T_SOURCE})
|
${T_SOURCE})
|
||||||
target_link_libraries(nr_dlschsim -Wl,--start-group UTIL SIMU PHY_COMMON PHY_NR PHY_NR_UE SCHED_NR_LIB CONFIG_LIB MAC_NR_COMMON -Wl,--end-group m pthread ${ATLAS_LIBRARIES} ${T_LIB} dl)
|
target_link_libraries(nr_dlschsim -Wl,--start-group UTIL SIMU PHY_COMMON PHY_NR PHY_NR_UE SCHED_NR_LIB CONFIG_LIB MAC_NR_COMMON -Wl,--end-group m pthread ${ATLAS_LIBRARIES} ${T_LIB} ${ITTI_LIB} dl)
|
||||||
|
|
||||||
add_executable(nr_pbchsim
|
add_executable(nr_pbchsim
|
||||||
${OPENAIR1_DIR}/SIMULATION/NR_PHY/pbchsim.c
|
${OPENAIR1_DIR}/SIMULATION/NR_PHY/pbchsim.c
|
||||||
|
|||||||
@@ -28,6 +28,7 @@
|
|||||||
#include "common/ran_context.h"
|
#include "common/ran_context.h"
|
||||||
#include "common/config/config_userapi.h"
|
#include "common/config/config_userapi.h"
|
||||||
#include "common/utils/LOG/log.h"
|
#include "common/utils/LOG/log.h"
|
||||||
|
#include "common/utils/LOG/vcd_signal_dumper.h"
|
||||||
#include "PHY/defs_gNB.h"
|
#include "PHY/defs_gNB.h"
|
||||||
#include "PHY/defs_nr_common.h"
|
#include "PHY/defs_nr_common.h"
|
||||||
#include "PHY/defs_nr_UE.h"
|
#include "PHY/defs_nr_UE.h"
|
||||||
@@ -115,7 +116,7 @@ int main(int argc, char **argv)
|
|||||||
//logInit();
|
//logInit();
|
||||||
randominit(0);
|
randominit(0);
|
||||||
|
|
||||||
while ((c = getopt(argc, argv, "df:hpg:i:j:n:l:m:r:s:S:y:z:M:N:F:R:P:L:")) != -1) {
|
while ((c = getopt(argc, argv, "df:hpVg:i:j:n:l:m:r:s:S:y:z:M:N:F:R:P:L:")) != -1) {
|
||||||
switch (c) {
|
switch (c) {
|
||||||
/*case 'f':
|
/*case 'f':
|
||||||
write_output_file = 1;
|
write_output_file = 1;
|
||||||
@@ -188,6 +189,10 @@ int main(int argc, char **argv)
|
|||||||
#endif
|
#endif
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case 'V':
|
||||||
|
ouput_vcd = 1;
|
||||||
|
break;
|
||||||
|
|
||||||
case 'S':
|
case 'S':
|
||||||
snr1 = atof(optarg);
|
snr1 = atof(optarg);
|
||||||
snr1set = 1;
|
snr1set = 1;
|
||||||
@@ -286,6 +291,7 @@ int main(int argc, char **argv)
|
|||||||
printf("%s -h(elp) -p(extended_prefix) -N cell_id -f output_filename -F input_filename -g channel_model -n n_frames -t Delayspread -s snr0 -S snr1 -x transmission_mode -y TXant -z RXant -i Intefrence0 -j Interference1 -A interpolation_file -C(alibration offset dB) -N CellId\n", argv[0]);
|
printf("%s -h(elp) -p(extended_prefix) -N cell_id -f output_filename -F input_filename -g channel_model -n n_frames -t Delayspread -s snr0 -S snr1 -x transmission_mode -y TXant -z RXant -i Intefrence0 -j Interference1 -A interpolation_file -C(alibration offset dB) -N CellId\n", argv[0]);
|
||||||
printf("-h This message\n");
|
printf("-h This message\n");
|
||||||
printf("-p Use extended prefix mode\n");
|
printf("-p Use extended prefix mode\n");
|
||||||
|
printf("-V Enable VCD dumb functions\n");
|
||||||
//printf("-d Use TDD\n");
|
//printf("-d Use TDD\n");
|
||||||
printf("-n Number of frames to simulate\n");
|
printf("-n Number of frames to simulate\n");
|
||||||
printf("-s Starting SNR, runs from SNR0 to SNR0 + 5 dB. If n_frames is 1 then just SNR is simulated\n");
|
printf("-s Starting SNR, runs from SNR0 to SNR0 + 5 dB. If n_frames is 1 then just SNR is simulated\n");
|
||||||
@@ -317,6 +323,9 @@ int main(int argc, char **argv)
|
|||||||
if (snr1set == 0)
|
if (snr1set == 0)
|
||||||
snr1 = snr0 + 10;
|
snr1 = snr0 + 10;
|
||||||
|
|
||||||
|
if (ouput_vcd)
|
||||||
|
vcd_signal_dumper_init("/tmp/openair_dump_nr_dlschsim.vcd");
|
||||||
|
|
||||||
gNB2UE = new_channel_desc_scm(n_tx, n_rx, channel_model,
|
gNB2UE = new_channel_desc_scm(n_tx, n_rx, channel_model,
|
||||||
61.44e6, //N_RB2sampling_rate(N_RB_DL),
|
61.44e6, //N_RB2sampling_rate(N_RB_DL),
|
||||||
40e6, //N_RB2channel_bandwidth(N_RB_DL),
|
40e6, //N_RB2channel_bandwidth(N_RB_DL),
|
||||||
@@ -525,10 +534,15 @@ int main(int argc, char **argv)
|
|||||||
printf("\n");
|
printf("\n");
|
||||||
exit(-1);
|
exit(-1);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
vcd_signal_dumper_dump_function_by_name(VCD_SIGNAL_DUMPER_FUNCTIONS_DLSCH_DECODING0, VCD_FUNCTION_IN);
|
||||||
|
|
||||||
ret = nr_dlsch_decoding(UE, channel_output_fixed, &UE->frame_parms,
|
ret = nr_dlsch_decoding(UE, channel_output_fixed, &UE->frame_parms,
|
||||||
dlsch0_ue, dlsch0_ue->harq_processes[0], frame, nb_symb_sch,
|
dlsch0_ue, dlsch0_ue->harq_processes[0], frame, nb_symb_sch,
|
||||||
slot,harq_pid, is_crnti, llr8_flag);
|
slot,harq_pid, is_crnti, llr8_flag);
|
||||||
|
|
||||||
|
vcd_signal_dumper_dump_function_by_name(VCD_SIGNAL_DUMPER_FUNCTIONS_DLSCH_DECODING0, VCD_FUNCTION_OUT);
|
||||||
|
|
||||||
if (ret > dlsch0_ue->max_ldpc_iterations)
|
if (ret > dlsch0_ue->max_ldpc_iterations)
|
||||||
n_errors++;
|
n_errors++;
|
||||||
|
|
||||||
@@ -622,6 +636,9 @@ int main(int argc, char **argv)
|
|||||||
if (input_fd)
|
if (input_fd)
|
||||||
fclose(input_fd);
|
fclose(input_fd);
|
||||||
|
|
||||||
|
if (ouput_vcd)
|
||||||
|
vcd_signal_dumper_close();
|
||||||
|
|
||||||
return (n_errors);
|
return (n_errors);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user