diff options
author | andreas128 <Andreas> | 2017-01-22 00:51:47 +0000 |
---|---|---|
committer | andreas128 <Andreas> | 2017-01-22 00:51:47 +0000 |
commit | a88e67cb485d6b4b7bc21aa3c9dedbab37190cb9 (patch) | |
tree | 2158dc19cd17b72b7a96a602f59bdfb5951cd814 /gr-dpd | |
parent | 62d6affd9fd9c5d45305cd5880c16696c0744044 (diff) | |
download | ODR-StaticPrecorrection-a88e67cb485d6b4b7bc21aa3c9dedbab37190cb9.tar.gz ODR-StaticPrecorrection-a88e67cb485d6b4b7bc21aa3c9dedbab37190cb9.tar.bz2 ODR-StaticPrecorrection-a88e67cb485d6b4b7bc21aa3c9dedbab37190cb9.zip |
am-am am-pm diagram in syncmeasurement.ipynb
Diffstat (limited to 'gr-dpd')
-rw-r--r-- | gr-dpd/grc/CMakeLists.txt | 4 | ||||
-rw-r--r-- | gr-dpd/grc/dpd_lut.xml | 72 | ||||
-rw-r--r-- | gr-dpd/include/dpd/CMakeLists.txt | 4 | ||||
-rw-r--r-- | gr-dpd/include/dpd/lut.h | 66 | ||||
-rw-r--r-- | gr-dpd/python/CMakeLists.txt | 2 | ||||
-rwxr-xr-x | gr-dpd/python/qa_lut.py | 41 | ||||
-rw-r--r-- | gr-dpd/swig/dpd_swig.i | 6 |
7 files changed, 193 insertions, 2 deletions
diff --git a/gr-dpd/grc/CMakeLists.txt b/gr-dpd/grc/CMakeLists.txt index a8e0497..3c4feb1 100644 --- a/gr-dpd/grc/CMakeLists.txt +++ b/gr-dpd/grc/CMakeLists.txt @@ -18,5 +18,7 @@ # Boston, MA 02110-1301, USA. install(FILES - dpd_memless_poly.xml DESTINATION share/gnuradio/grc/blocks + dpd_memless_poly.xml + dpd_lut.xml + dpd_clut.xml DESTINATION share/gnuradio/grc/blocks ) diff --git a/gr-dpd/grc/dpd_lut.xml b/gr-dpd/grc/dpd_lut.xml new file mode 100644 index 0000000..6af793e --- /dev/null +++ b/gr-dpd/grc/dpd_lut.xml @@ -0,0 +1,72 @@ +<?xml version="1.0"?> +<block> + <name>lut</name> + <key>dpd_lut</key> + <category>dpd</category> + <import>import dpd</import> + <make>dpd.lut($a1, $a2, $a3, $a4, $a5, $a6, $a7, $a8)</make> + <callback>set_a1($a1)</callback> + <callback>set_a2($a2)</callback> + <callback>set_a3($a3)</callback> + <callback>set_a4($a4)</callback> + <callback>set_a5($a5)</callback> + <callback>set_a6($a6)</callback> + <callback>set_a7($a7)</callback> + <callback>set_a8($a8)</callback> + <param> + <name>a1</name> + <key>a1</key> + <value>0</value> + <type>real</type> + </param> + <param> + <name>a2</name> + <key>a2</key> + <value>0</value> + <type>real</type> + </param> + <param> + <name>a3</name> + <key>a3</key> + <value>0</value> + <type>real</type> + </param> + <param> + <name>a4</name> + <key>a4</key> + <value>0</value> + <type>real</type> + </param> + <param> + <name>a5</name> + <key>a5</key> + <value>0</value> + <type>real</type> + </param> + <param> + <name>a6</name> + <key>a6</key> + <value>0</value> + <type>real</type> + </param> + <param> + <name>a7</name> + <key>a7</key> + <value>0</value> + <type>real</type> + </param> + <param> + <name>a8</name> + <key>a8</key> + <value>0</value> + <type>real</type> + </param> + <sink> + <name>in</name> + <type>complex</type> + </sink> + <source> + <name>out</name> + <type>complex</type> + </source> +</block> diff --git a/gr-dpd/include/dpd/CMakeLists.txt b/gr-dpd/include/dpd/CMakeLists.txt index 700317c..6598918 100644 --- a/gr-dpd/include/dpd/CMakeLists.txt +++ b/gr-dpd/include/dpd/CMakeLists.txt @@ -22,5 +22,7 @@ ######################################################################## install(FILES api.h - memless_poly.h DESTINATION include/dpd + memless_poly.h + lut.h + clut.h DESTINATION include/dpd ) diff --git a/gr-dpd/include/dpd/lut.h b/gr-dpd/include/dpd/lut.h new file mode 100644 index 0000000..7bf568a --- /dev/null +++ b/gr-dpd/include/dpd/lut.h @@ -0,0 +1,66 @@ +/* -*- c++ -*- */ +/* + * Copyright 2017 <+YOU OR YOUR COMPANY+>. + * + * This is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3, or (at your option) + * any later version. + * + * This software 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 General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this software; see the file COPYING. If not, write to + * the Free Software Foundation, Inc., 51 Franklin Street, + * Boston, MA 02110-1301, USA. + */ + + +#ifndef INCLUDED_DPD_LUT_H +#define INCLUDED_DPD_LUT_H + +#include <dpd/api.h> +#include <gnuradio/block.h> + +namespace gr { + namespace dpd { + + /*! + * \brief <+description of block+> + * \ingroup dpd + * + */ + class DPD_API lut : virtual public gr::block + { + public: + typedef boost::shared_ptr<lut> sptr; + + /*! + * \brief Return a shared_ptr to a new instance of dpd::lut. + * + * To avoid accidental use of raw pointers, dpd::lut's + * constructor is in a private implementation + * class. dpd::lut::make is the public interface for + * creating new instances. + */ + static sptr make(float a1, float a2, float a3, float a4, float a5, float a6, float a7, float a8); + + virtual void set_a1(float sens) = 0; + virtual void set_a2(float sens) = 0; + virtual void set_a3(float sens) = 0; + virtual void set_a4(float sens) = 0; + virtual void set_a5(float sens) = 0; + virtual void set_a6(float sens) = 0; + virtual void set_a7(float sens) = 0; + virtual void set_a8(float sens) = 0; + + }; + + } // namespace dpd +} // namespace gr + +#endif /* INCLUDED_DPD_LUT_H */ + diff --git a/gr-dpd/python/CMakeLists.txt b/gr-dpd/python/CMakeLists.txt index e876217..afb0f59 100644 --- a/gr-dpd/python/CMakeLists.txt +++ b/gr-dpd/python/CMakeLists.txt @@ -42,3 +42,5 @@ include(GrTest) set(GR_TEST_TARGET_DEPS gnuradio-dpd) set(GR_TEST_PYTHON_DIRS ${CMAKE_BINARY_DIR}/swig) GR_ADD_TEST(qa_memless_poly ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/qa_memless_poly.py) +GR_ADD_TEST(qa_lut ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/qa_lut.py) +GR_ADD_TEST(qa_clut ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/qa_clut.py) diff --git a/gr-dpd/python/qa_lut.py b/gr-dpd/python/qa_lut.py new file mode 100755 index 0000000..d1cf636 --- /dev/null +++ b/gr-dpd/python/qa_lut.py @@ -0,0 +1,41 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- +# +# Copyright 2017 <+YOU OR YOUR COMPANY+>. +# +# This is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3, or (at your option) +# any later version. +# +# This software 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 General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this software; see the file COPYING. If not, write to +# the Free Software Foundation, Inc., 51 Franklin Street, +# Boston, MA 02110-1301, USA. +# + +from gnuradio import gr, gr_unittest +from gnuradio import blocks +import dpd_swig as dpd + +class qa_lut (gr_unittest.TestCase): + + def setUp (self): + self.tb = gr.top_block () + + def tearDown (self): + self.tb = None + + def test_001_t (self): + # set up fg + self.tb.run () + # check data + + +if __name__ == '__main__': + gr_unittest.run(qa_lut, "qa_lut.xml") diff --git a/gr-dpd/swig/dpd_swig.i b/gr-dpd/swig/dpd_swig.i index 18f93ab..5636efe 100644 --- a/gr-dpd/swig/dpd_swig.i +++ b/gr-dpd/swig/dpd_swig.i @@ -9,8 +9,14 @@ %{ #include "dpd/memless_poly.h" +#include "dpd/lut.h" +#include "dpd/clut.h" %} %include "dpd/memless_poly.h" GR_SWIG_BLOCK_MAGIC2(dpd, memless_poly); +%include "dpd/lut.h" +GR_SWIG_BLOCK_MAGIC2(dpd, lut); +%include "dpd/clut.h" +GR_SWIG_BLOCK_MAGIC2(dpd, clut); |