diff options
author | mhostetter <mhostetter@users.noreply.github.com> | 2017-03-19 13:16:54 -0400 |
---|---|---|
committer | Matt Hostetter <matthostetter@gmail.com> | 2017-03-27 15:31:11 -0400 |
commit | e2df7af0512232eb1692d043b6db5f5e7d7f23a1 (patch) | |
tree | 49474f4fd31b11949f5f20eba28705fd1b5a8f71 /gr-blocks/grc | |
parent | 80f1bc7840f633822a1032c4ad32ed251742c376 (diff) |
blocks: Add exponentiate const int block
The Exponentiate Const Int block takes an integer power of the input complex stream. The exponent parameter must be at least 1. There is also a callback function so the exponent can be changed at runtime.
Diffstat (limited to 'gr-blocks/grc')
-rw-r--r-- | gr-blocks/grc/blocks_block_tree.xml | 1 | ||||
-rw-r--r-- | gr-blocks/grc/blocks_exponentiate_const_cci.xml | 45 |
2 files changed, 46 insertions, 0 deletions
diff --git a/gr-blocks/grc/blocks_block_tree.xml b/gr-blocks/grc/blocks_block_tree.xml index cb9ad639c6..d0bb252a47 100644 --- a/gr-blocks/grc/blocks_block_tree.xml +++ b/gr-blocks/grc/blocks_block_tree.xml @@ -93,6 +93,7 @@ <block>blocks_add_xx</block> <block>blocks_add_const_vxx</block> <block>blocks_divide_xx</block> + <block>blocks_exponentiate_const_cci</block> <block>blocks_multiply_xx</block> <block>blocks_multiply_const_xx</block> <block>blocks_multiply_const_vxx</block> diff --git a/gr-blocks/grc/blocks_exponentiate_const_cci.xml b/gr-blocks/grc/blocks_exponentiate_const_cci.xml new file mode 100644 index 0000000000..3c9e9b9625 --- /dev/null +++ b/gr-blocks/grc/blocks_exponentiate_const_cci.xml @@ -0,0 +1,45 @@ +<?xml version="1.0"?> +<block> + <name>Exponentiate Const Int</name> + <key>blocks_exponentiate_const_cci</key> + <import>from gnuradio import blocks</import> + <make>blocks.exponentiate_const_cci($exponent, $vlen)</make> + <callback>set_exponent($exponent)</callback> + + <param> + <name>Num Ports</name> + <key>num_ports</key> + <value>1</value> + <type>int</type> + </param> + <param> + <name>Vec Length</name> + <key>vlen</key> + <value>1</value> + <type>int</type> + </param> + <param> + <name>Exponent</name> + <key>exponent</key> + <value>1</value> + <type>int</type> + </param> + + <check>$num_ports > 0</check> + <check>$vlen > 0</check> + <check>$exponent > 0</check> + + <sink> + <name>in</name> + <type>complex</type> + <vlen>$vlen</vlen> + <nports>$num_ports</nports> + </sink> + + <source> + <name>out</name> + <type>complex</type> + <vlen>$vlen</vlen> + <nports>$num_ports</nports> + </source> +</block> |