Commit 878baf36 authored by Ben Wojtowicz's avatar Ben Wojtowicz

Version 0.6.0: Fixed bugs in liblte_phy and added a new I/Q generation gnuradio application

parent 864f3c97
......@@ -28,3 +28,7 @@ v00.05.03 Added more DL transmit functionality, rearranged liblte_phy to
v00.05.04 Fixed bugs in liblte_phy.cc in turbo_decode, rate_unmatch_turbo,
pdsch_channel_encode, and pdcch_channel_encode. Added number of
bits used to SIB1 pack in liblte_rrc.cc.
v00.06.00 Enabled fftw input, output, and plan from phy_struct in liblte_phy.
Added BER tolerance to CFI decoding. Added a new gnuradio app
for generating an I/Q file with PSS, SSS, CRS, PBCH, PDCCH, and
PDSCH.
# Copyright 2012 Ben Wojtowicz
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
include $(top_srcdir)/Makefile.common
INCLUDES = \
-Ihdr/ \
-I$(top_srcdir)/liblte/hdr/ \
-I$(top_srcdir)/cmn_hdr/
LTE_fdd_dl_fg_la_swig_sources = \
src/LTE_fdd_dl_fg_samp_buf.cc
LTE_fdd_dl_fg_la_swig_ldflags = \
-L$(top_srcdir)/liblte/lib/ \
-llte \
-lfftw3
TOP_SWIG_IFILES = \
src/LTE_fdd_dl_fg.i
LTE_fdd_dl_fg_pythondir_category = \
gnuradio
include $(top_srcdir)/Makefile.swig
BUILT_SOURCES = $(swig_built_sources)
no_dist_files = $(swig_built_sources)
This diff is collapsed.
/*******************************************************************************
Copyright 2012 Ben Wojtowicz
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*******************************************************************************
File: LTE_fdd_dl_fg_samp_buf.h
Description: Contains all the definitions for the LTE FDD DL File Generator
sample buffer block.
Revision History
---------- ------------- --------------------------------------------
06/15/2012 Ben Wojtowicz Created file.
*******************************************************************************/
#ifndef __LTE_FDD_DL_FG_SAMP_BUF_H__
#define __LTE_FDD_DL_FG_SAMP_BUF_H__
/*******************************************************************************
INCLUDES
*******************************************************************************/
#include "gr_sync_block.h"
#include "liblte_phy.h"
#include "liblte_rrc.h"
/*******************************************************************************
DEFINES
*******************************************************************************/
#define LTE_FDD_DL_FG_SAMP_BUF_SIZE (307200)
/*******************************************************************************
FORWARD DECLARATIONS
*******************************************************************************/
class LTE_fdd_dl_fg_samp_buf;
/*******************************************************************************
TYPEDEFS
*******************************************************************************/
typedef boost::shared_ptr<LTE_fdd_dl_fg_samp_buf> LTE_fdd_dl_fg_samp_buf_sptr;
/*******************************************************************************
CLASS DECLARATIONS
*******************************************************************************/
LTE_fdd_dl_fg_samp_buf_sptr LTE_fdd_dl_fg_make_samp_buf(uint32 _N_frames,
uint32 _N_ant,
uint32 _N_id_cell,
float _bandwidth,
char *_mcc,
char *_mnc);
class LTE_fdd_dl_fg_samp_buf : public gr_sync_block
{
public:
~LTE_fdd_dl_fg_samp_buf();
int32 work(int32 ninput_items,
gr_vector_const_void_star &input_items,
gr_vector_void_star &output_items);
private:
friend LTE_fdd_dl_fg_samp_buf_sptr LTE_fdd_dl_fg_make_samp_buf(uint32 _N_frames,
uint32 _N_ant,
uint32 _N_id_cell,
float _bandwidth,
char *_mcc,
char *_mnc);
LTE_fdd_dl_fg_samp_buf(uint32 _N_frames,
uint32 _N_ant,
uint32 _N_id_cell,
float _bandwidth,
char *_mcc,
char *_mnc);
// LTE library
LIBLTE_PHY_STRUCT *phy_struct;
LIBLTE_RRC_MSG_STRUCT rrc_msg;
// Sample buffer
float *i_buf;
float *q_buf;
uint32 samp_buf_idx;
bool samples_ready;
// LTE parameters
LIBLTE_RRC_MIB_STRUCT mib;
LIBLTE_RRC_SYS_INFO_BLOCK_TYPE_1_STRUCT sib1;
LIBLTE_PHY_PCFICH_STRUCT pcfich;
LIBLTE_PHY_PHICH_STRUCT phich;
LIBLTE_PHY_PDCCH_STRUCT pdcch;
float phich_res;
float bandwidth;
uint32 sfn;
uint32 N_frames;
uint32 N_id_cell;
uint32 N_id_1;
uint32 N_id_2;
uint32 N_rb_dl;
uint32 FFT_pad_size;
uint8 N_ant;
};
#endif /* __LTE_FDD_DL_FG_SAMP_BUF_H__ */
#!/usr/bin/env python
from gnuradio import gr
from gnuradio.eng_option import eng_option
from optparse import OptionParser
import LTE_fdd_dl_fg
import sys
class LTE_fdd_dl_file_gen (gr.top_block):
def __init__(self):
gr.top_block.__init__(self)
usage = "usage: %prog [options] file N_frames N_ant N_id_cell bandwidth mcc mnc"
parser=OptionParser(option_class=eng_option, usage=usage)
# Add options here
(options, args) = parser.parse_args()
if len(args) != 7:
parser.print_help()
sys.exit(1)
output_filename = args[0]
N_frames = args[1]
N_ant = args[2]
N_id_cell = args[3]
bandwidth = args[4]
mcc = args[5]
mnc = args[6]
# Build flow graph
self.samp_buf = LTE_fdd_dl_fg.samp_buf(int(N_frames), int(N_ant), int(N_id_cell), float(bandwidth), mcc, mnc)
self.fsink = gr.file_sink(gr.sizeof_char, output_filename)
self.connect(self.samp_buf, self.fsink)
if __name__ == '__main__':
tb = LTE_fdd_dl_file_gen()
try:
tb.run()
except KeyboardInterrupt:
pass
/* -*- c++ -*- */
%include "gnuradio.i" // the common stuff
%{
#include "LTE_fdd_dl_fg_samp_buf.h"
%}
// ----------------------------------------------------------------
/*
* First arg is the package prefix.
* Second arg is the name of the class minus the prefix.
*
* This does some behind-the-scenes magic so we can
* access LTE_fdd_dl_fg_samp_buf from python as LTE_fdd_dl_fg.samp_buf
*/
GR_SWIG_BLOCK_MAGIC(LTE_fdd_dl_fg,samp_buf);
LTE_fdd_dl_fg_samp_buf_sptr LTE_fdd_dl_fg_make_samp_buf(unsigned int _N_frames,
unsigned int _N_ant,
unsigned int _N_id_cell,
float _bandwidth,
char *_mcc,
char *_mnc);
class LTE_fdd_dl_fg_samp_buf : public gr_block
{
private:
LTE_fdd_dl_fg_samp_buf(uint32 _N_frames,
uint32 _N_ant,
uint32 _N_id_cell,
float _bandwidth,
char *_mcc,
char *_mnc);
};
This diff is collapsed.
......@@ -27,8 +27,8 @@ include $(top_srcdir)/Makefile.common
EXTRA_DIST = bootstrap configure config.h.in \
Makefile.swig Makefile.swig.gen.t
SUBDIRS = liblte LTE_fdd_dl_file_scan
DIST_SUBDIRS = liblte LTE_fdd_dl_file_scan
SUBDIRS = liblte LTE_fdd_dl_file_scan LTE_fdd_dl_file_gen
DIST_SUBDIRS = liblte LTE_fdd_dl_file_scan LTE_fdd_dl_file_gen
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA =
......@@ -20,7 +20,7 @@ dnl the Free Software Foundation, Inc., 51 Franklin Street,
dnl Boston, MA 02110-1301, USA.
dnl
AC_INIT(openlte,0.5.4)
AC_INIT(openlte,0.6.0)
AC_PREREQ(2.57)
AC_CONFIG_AUX_DIR([.])
......@@ -65,6 +65,7 @@ AC_CONFIG_FILES([\
config/Makefile \
liblte/Makefile \
LTE_fdd_dl_file_scan/Makefile \
LTE_fdd_dl_file_gen/Makefile \
])
AC_OUTPUT
......@@ -29,6 +29,8 @@
05/28/2012 Ben Wojtowicz Rearranged to match spec order, added
initial transmit functionality, and fixed
a bug related to PDCCH sizes.
06/11/2012 Ben Wojtowicz Enabled fftw input, output, and plan in
phy_struct.
*******************************************************************************/
......@@ -234,11 +236,11 @@ typedef struct{
float timing_corr_freq_err[15360];
float timing_abs_corr[15360];
// // Samples to Symbols & Symbols to Samples
// fftw_complex *in;
// fftw_complex *out;
// fftw_plan samps_to_symbs_plan;
// fftw_plan symbs_to_samps_plan;
// Samples to Symbols & Symbols to Samples
fftw_complex *s2s_in;
fftw_complex *s2s_out;
fftw_plan symbs_to_samps_plan;
fftw_plan samps_to_symbs_plan;
// Viterbi decode
float vd_path_metric[128][2048];
......
This diff is collapsed.
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