Merged with paul_graphics

master
ismagom 10 years ago
commit 3d0cc1a9ec

@ -160,7 +160,6 @@ INCLUDE_DIRECTORIES(${PROJECT_SOURCE_DIR}/common/include)
INCLUDE_DIRECTORIES(${PROJECT_SOURCE_DIR}/srslte/include/)
INCLUDE_DIRECTORIES(${PROJECT_SOURCE_DIR}/cuhd/include)
INCLUDE_DIRECTORIES(${PROJECT_SOURCE_DIR}/mex/include)
INCLUDE_DIRECTORIES(${PROJECT_SOURCE_DIR}/graphics/include)
########################################################################
# Add the subdirectories
@ -169,4 +168,3 @@ ADD_SUBDIRECTORY(common)
ADD_SUBDIRECTORY(cuhd)
ADD_SUBDIRECTORY(srslte)
add_subdirectory(mex)
ADD_SUBDIRECTORY(graphics)

@ -0,0 +1,40 @@
# - Try to find LIBSDRGUI
# Once done this will define
# LIBSDRGUI_FOUND - System has libsdrgui
# LIBSDRGUI_INCLUDE_DIRS - The libsdrgui include directories
# LIBSDRGUI_LIBRARIES - The libsdrgui library
find_package(PkgConfig)
pkg_check_modules(PC_LIBSDRGUI QUIET libsdrgui)
set(LIBSDRGUI_DEFINITIONS ${PC_LIBSDRGUI_CFLAGS_OTHER})
FIND_PATH(
LIBSDRGUI_INCLUDE_DIRS
NAMES libsdrgui/libsdrgui.h
HINTS ${PC_LIBSDRGUI_INCLUDEDIR}
${PC_LIBSDRGUI_INCLUDE_DIRS}
$ENV{LIBSDRGUI_DIR}/include
PATHS /usr/local/include
/usr/include
)
FIND_LIBRARY(
LIBSDRGUI_LIBRARIES
NAMES sdrgui
HINTS ${PC_LIBSDRGUI_LIBDIR}
${CMAKE_INSTALL_PREFIX}/lib
${CMAKE_INSTALL_PREFIX}/lib64
$ENV{LIBSDRGUI_DIR}/lib
PATHS /usr/local/lib
/usr/local/lib64
/usr/lib
/usr/lib64
)
message(STATUS "LIBSDRGUI LIBRARIES " ${LIBSDRGUI_LIBRARIES})
message(STATUS "LIBSDRGUI INCLUDE DIRS " ${LIBSDRGUI_INCLUDE_DIRS})
INCLUDE(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(LIBSDRGUI DEFAULT_MSG LIBSDRGUI_LIBRARIES LIBSDRGUI_INCLUDE_DIRS)
MARK_AS_ADVANCED(LIBSDRGUI_LIBRARIES LIBSDRGUI_INCLUDE_DIRS)

@ -58,4 +58,7 @@
#define SRSLTE_ERROR -1
#define SRSLTE_ERROR_INVALID_INPUTS -2
// cf_t definition
typedef _Complex float cf_t;
#endif // CONFIG_H

@ -40,7 +40,7 @@
#include "srslte/config.h"
typedef _Complex float cf_t;
SRSLTE_API bool mexutils_isScalar(const mxArray *ptr);

@ -39,7 +39,6 @@
/* Automatic Gain Control
*
*/
typedef _Complex float cf_t;
#define SRSLTE_AGC_DEFAULT_BW (5e-2)

@ -35,8 +35,6 @@
#include "srslte/config.h"
#include "srslte/common/phy_common.h"
typedef _Complex float cf_t;
// Number of references in a subframe: there are 2 symbols for port_id=0,1 x 2 slots x 2 refs per prb
#define SRSLTE_REFSIGNAL_NUM_SF(nof_prb, port_id) (((port_id)<2?8:4)*(nof_prb))
#define SRSLTE_REFSIGNAL_MAX_NUM_SF(nof_prb) SRSLTE_REFSIGNAL_NUM_SF(nof_prb, 0)

@ -41,8 +41,6 @@
#define SRSLTE_NOF_DELTA_SS 30
#define SRSLTE_NOF_CSHIFT 8
typedef _Complex float cf_t;
typedef struct SRSLTE_API {
uint32_t cyclic_shift;
uint32_t cyclic_shift_for_drms;

@ -34,8 +34,6 @@
#ifndef CH_AWGN_
#define CH_AWGN_
typedef _Complex float cf_t;
SRSLTE_API void srslte_ch_awgn_c(const cf_t* input,
cf_t* output,
float variance,

@ -121,8 +121,6 @@ typedef enum {SRSLTE_SRSLTE_CP_NORM, SRSLTE_SRSLTE_CP_EXT} srslte_cp_t;
#define SRSLTE_NOF_TC_CB_SIZES 188
typedef _Complex float cf_t;
typedef enum SRSLTE_API {
SRSLTE_PHICH_NORM = 0,
SRSLTE_PHICH_EXT

@ -67,8 +67,6 @@ typedef struct SRSLTE_API {
srslte_dft_mode_t mode; // Complex/Real
}srslte_dft_plan_t;
typedef _Complex float cf_t;
/* Create DFT plans */
SRSLTE_API int srslte_dft_plan(srslte_dft_plan_t *plan,

@ -33,8 +33,6 @@
#include "srslte/common/phy_common.h"
#include "srslte/dft/dft.h"
typedef _Complex float cf_t;
/* DFT-based Transform Precoding object */
typedef struct SRSLTE_API {

@ -37,8 +37,6 @@
#include "srslte/common/phy_common.h"
#include "srslte/dft/dft.h"
typedef _Complex float cf_t; /* this is only a shortcut */
/* This is common for both directions */
typedef struct SRSLTE_API{
srslte_dft_plan_t fft_plan;

@ -32,8 +32,6 @@
#include "srslte/config.h"
#include "srslte/common/phy_common.h"
typedef _Complex float cf_t;
/* Generates the vector of layer-mapped symbols "x" based on the vector of data symbols "d"
*/
SRSLTE_API int srslte_layermap_single(cf_t *d,

@ -31,8 +31,6 @@
#include "srslte/config.h"
#include "srslte/common/phy_common.h"
typedef _Complex float cf_t;
/** The precoder takes as input nlayers vectors "x" from the
* layer mapping and generates nports vectors "y" to be mapped onto
* resources on each of the antenna ports.

@ -35,8 +35,6 @@
#include "srslte/config.h"
#include "modem_table.h"
typedef _Complex float cf_t;
typedef struct SRSLTE_API {
srslte_mod_t mod; /* In this implementation, mapping table is hard-coded */
}srslte_demod_hard_t;

@ -35,8 +35,6 @@
#include "srslte/config.h"
#include "modem_table.h"
typedef _Complex float cf_t;
SRSLTE_API int srslte_mod_modulate(srslte_srslte_modem_table_t* table,
uint8_t *bits,
cf_t* symbols,

@ -37,7 +37,6 @@
#include "srslte/common/phy_common.h"
#include "srslte/config.h"
typedef _Complex float cf_t;
typedef struct SRSLTE_API {
uint32_t idx[2][6][32];
uint32_t min_idx[2][64][6]; /* NEW: for each constellation point zone (2, 4, 16, 64 for BPSK, QPSK, 16QAM, 64QAM) the 2x(1, 2, 4, and 6 closest constellation points) for each bit, respectively. */

@ -34,8 +34,6 @@
#include "srslte/common/phy_common.h"
#include "srslte/phch/ra.h"
typedef _Complex float cf_t;
/**
* DCI message generation according to the formats, as specified in
* 36.212 Section 5.3.3.1

@ -48,8 +48,6 @@
#define PBCH_RE_SRSLTE_SRSLTE_CP_NORM 240
#define PBCH_RE_SRSLTE_SRSLTE_CP_EXT 216
typedef _Complex float cf_t;
/* PBCH object */
typedef struct SRSLTE_API {
srslte_cell_t cell;

@ -40,8 +40,6 @@
#define PCFICH_CFI_LEN 32
#define PCFICH_RE PCFICH_CFI_LEN/2
typedef _Complex float cf_t;
/* PCFICH object */
typedef struct SRSLTE_API {
srslte_cell_t cell;

@ -42,7 +42,7 @@
#include "srslte/phch/dci.h"
#include "srslte/phch/regs.h"
typedef _Complex float cf_t;
typedef enum SRSLTE_API {

@ -43,7 +43,7 @@
#define SRSLTE_PDSCH_MAX_TDEC_ITERS 5
typedef _Complex float cf_t;
/* PDSCH object */
typedef struct SRSLTE_API {

@ -38,7 +38,7 @@
#include "srslte/scrambling/scrambling.h"
#include "regs.h"
typedef _Complex float cf_t;
#define SRSLTE_PHICH_NORM_NSEQUENCES 8
#define SRSLTE_PHICH_EXT_NSEQUENCES 4

@ -35,7 +35,7 @@
#include "srslte/config.h"
#include "srslte/dft/dft.h"
typedef _Complex float cf_t;
/** Generation and detection of RACH signals for uplink.
* Currently only supports preamble formats 0-3.

@ -41,8 +41,6 @@
#include "srslte/phch/harq.h"
#include "srslte/dft/dft_precoding.h"
typedef _Complex float cf_t;
#define SRSLTE_PUCCH_N_SEQ 12 // Only Format 1, 1a and 1b supported
#define SRSLTE_PUCCH_MAX_BITS 2
#define SRSLTE_PUCCH_N_SF_MAX 4

@ -43,7 +43,7 @@
#define SRSLTE_PUSCH_MAX_TDEC_ITERS 5
typedef _Complex float cf_t;
typedef struct {

@ -42,8 +42,6 @@
#define REGS_RE_X_REG 4
typedef _Complex float cf_t;
typedef struct SRSLTE_API {
uint32_t k[4];
uint32_t k0;

@ -26,12 +26,10 @@
*/
#ifndef DECIM_H
#define DECIM_H_
#define DECIM_H
#include "srslte/config.h"
typedef _Complex float cf_t;
SRSLTE_API void srslte_decim_c(cf_t *input,
cf_t *output,

@ -32,8 +32,6 @@
#include "srslte/config.h"
typedef _Complex float cf_t;
/************* STATIC LINEAR INTERPOLATION FUNCTIONS */

@ -33,8 +33,6 @@
#include "srslte/config.h"
typedef _Complex float cf_t;
#define SRSLTE_RESAMPLE_ARB_N 32 // Polyphase filter rows
#define SRSLTE_RESAMPLE_ARB_M 8 // Polyphase filter columns

@ -33,8 +33,6 @@
#include "srslte/common/sequence.h"
#include "srslte/common/phy_common.h"
typedef _Complex float cf_t;
/* Scrambling has no state */
SRSLTE_API void srslte_scrambling_b(srslte_sequence_t *s,
uint8_t *data);

@ -34,8 +34,6 @@
#include "srslte/config.h"
#include "srslte/utils/cexptab.h"
typedef _Complex float cf_t;
/** If the frequency is changed more than the tolerance, a new table is generated */
#define SRSLTE_CFO_TOLERANCE 0.00001

@ -36,8 +36,6 @@
#include "srslte/common/phy_common.h"
#include "srslte/utils/convolution.h"
typedef _Complex float cf_t; /* this is only a shortcut */
#define CONVOLUTION_FFT
#define SRSLTE_PSS_LEN 62

@ -36,8 +36,6 @@
#include "srslte/common/phy_common.h"
#include "srslte/dft/dft.h"
typedef _Complex float cf_t; /* this is only a shortcut */
#define SRSLTE_SSS_N 31
#define SRSLTE_SSS_LEN 2*SRSLTE_SSS_N

@ -33,8 +33,6 @@
#include <stdint.h>
#include "srslte/config.h"
typedef _Complex float cf_t;
typedef struct SRSLTE_API {
uint32_t size;
cf_t *tab;

@ -32,8 +32,6 @@
#include "srslte/config.h"
#include "srslte/dft/dft.h"
typedef _Complex float cf_t;
typedef struct SRSLTE_API {
cf_t *input_fft;
cf_t *filter_fft;

@ -37,8 +37,6 @@ extern "C" {
#include <stdint.h>
#include "srslte/config.h"
typedef _Complex float cf_t;
#define SRSLTE_MAX(a,b) ((a)>(b)?(a):(b))
#define SRSLTE_MIN(a,b) ((a)<(b)?(a):(b))

@ -38,6 +38,8 @@ ELSE(${DISABLE_VOLK})
FIND_PACKAGE(Volk)
ENDIF(${DISABLE_VOLK})
FIND_PACKAGE(LIBSDRGUI)
########################################################################
# Recurse subdirectories and compile all source files into the same lib
########################################################################

@ -11,7 +11,7 @@
/* Determine parity of argument: 1 = odd, 0 = even */
#ifdef __i386__
static inline uint32_t parityb(uint8_t x){
__asm__ __volatile__ ("test %1,%1;setpo %0" : "=qhm" (x) : "qh" (x));
__asm__ __volatile__ ("test %1,%1;setpo %0" : "=q" (x) : "q" (x));
return x;
}
#else

@ -39,7 +39,7 @@
#include "turbodecoder_test.h"
typedef _Complex float cf_t;
uint32_t frame_length = 1000, nof_frames = 100;
float ebno_db = 100.0;

@ -37,7 +37,7 @@
#include "viterbi_test.h"
typedef _Complex float cf_t;
int frame_length = 1000, nof_frames = 128;
float ebno_db = 100.0;

@ -42,7 +42,7 @@
#define QAM64_THRESHOLD_3 6/sqrt(42)
typedef _Complex float cf_t;
// There are 3 implemenations: 1 - based on zones; 2 - using volk, 3 - straightforward C
#define LLR_SRSLTE_DEMOD_SOFT_ALG_APPROX_IMPLEMENTATION 1

@ -25,8 +25,7 @@
*
*/
typedef _Complex float cf_t;
#include "srslte/config.h"
void prb_cp_ref(cf_t **input, cf_t **output, int offset, int nof_refs,
int nof_intervals, bool advance_input);

@ -9,7 +9,7 @@
#include "srslte/phch/prach.h"
#define MAX_LEN 70176
typedef _Complex float cf_t;
uint32_t N_ifft_ul = 128;
uint32_t preamble_format = 0;

@ -9,7 +9,7 @@
#include "srslte/phch/prach.h"
#define MAX_LEN 70176
typedef _Complex float cf_t;
uint32_t N_ifft_ul = 128;
uint32_t preamble_format = 0;

@ -8,7 +8,7 @@
#include "srslte/srslte.h"
#include "srslte/resampling/resample_arb.h"
typedef _Complex float cf_t;
int main(int argc, char **argv) {
int N=10000000;

@ -8,7 +8,7 @@
#include "srslte/srslte.h"
#include "srslte/resampling/resample_arb.h"
typedef _Complex float cf_t;
int main(int argc, char **argv) {
int N = 100; // Number of sinwave samples

@ -24,16 +24,15 @@
########################################################################
LIST(FIND OPTIONAL_LIBS cuhd CUHD_FIND)
LIST(FIND OPTIONAL_LIBS graphics GRAPHICS_FIND)
IF(${CUHD_FIND} GREATER -1)
ADD_EXECUTABLE(pss_usrp pss_usrp.c)
TARGET_LINK_LIBRARIES(pss_usrp lte_phy cuhd)
IF(${GRAPHICS_FIND} EQUAL -1)
SET_TARGET_PROPERTIES(pss_usrp PROPERTIES COMPILE_DEFINITIONS "DISABLE_GRAPHICS")
ELSE(${GRAPHICS_FIND} EQUAL -1)
IF(LIBSDRGUI_FOUND)
target_link_libraries(pss_usrp graphics)
ENDIF(${GRAPHICS_FIND} EQUAL -1)
ELSE(LIBSDRGUI_FOUND)
SET_TARGET_PROPERTIES(pss_usrp PROPERTIES COMPILE_DEFINITIONS "DISABLE_GRAPHICS")
ENDIF(LIBSDRGUI_FOUND)
ENDIF(${CUHD_FIND} GREATER -1)

@ -335,7 +335,7 @@ extern cf_t *tmp2;
#ifndef DISABLE_GRAPHICS
#include "srslte/graphics/plot.h"
#include "libsdrgui/libsdrgui.h"
plot_real_t pssout;
//plot_complex_t pce;

@ -8,7 +8,7 @@
#include "srslte/dft/dft.h"
typedef _Complex float cf_t;
int N = 256;
bool forward = true;

Loading…
Cancel
Save