diff options
author | Martin Braun <martin.braun@ettus.com> | 2014-05-04 13:51:35 +0200 |
---|---|---|
committer | Martin Braun <martin.braun@ettus.com> | 2014-07-07 12:21:49 +0200 |
commit | 84827e9d7b39f06b3fa33c5d8eba38fbd72a43ca (patch) | |
tree | b0f546491c7b6277f4964cbcf3db877044b34f22 /gr-blocks/grc | |
parent | 085c35a375468179929b690a0d7f037dc6ef23bf (diff) |
blocks: Added multiply_matrix_ff
This block maps inputs to outputs by matrix multiplication.
Also includes QA.
Diffstat (limited to 'gr-blocks/grc')
-rw-r--r-- | gr-blocks/grc/blocks_block_tree.xml | 1 | ||||
-rw-r--r-- | gr-blocks/grc/blocks_multiply_matrix_xx.xml | 63 |
2 files changed, 64 insertions, 0 deletions
diff --git a/gr-blocks/grc/blocks_block_tree.xml b/gr-blocks/grc/blocks_block_tree.xml index 7001d906ac..b8221d74c3 100644 --- a/gr-blocks/grc/blocks_block_tree.xml +++ b/gr-blocks/grc/blocks_block_tree.xml @@ -94,6 +94,7 @@ <block>blocks_multiply_xx</block> <block>blocks_multiply_const_vxx</block> <block>blocks_multiply_conjugate_cc</block> + <block>blocks_multiply_matrix_xx</block> <block>blocks_sub_xx</block> <block>blocks_conjugate_cc</block> <block>blocks_integrate_xx</block> diff --git a/gr-blocks/grc/blocks_multiply_matrix_xx.xml b/gr-blocks/grc/blocks_multiply_matrix_xx.xml new file mode 100644 index 0000000000..b0ba41df60 --- /dev/null +++ b/gr-blocks/grc/blocks_multiply_matrix_xx.xml @@ -0,0 +1,63 @@ +<?xml version="1.0"?> +<block> + <name>Multiply by Matrix</name> + <key>blocks_multiply_matrix_xx</key> + <import>from gnuradio import blocks</import> + <make>blocks.multiply_matrix_$(type.fcn)($A, $tag_propagation_policy)</make> + <callback>set_A($A)</callback> + <param> + <name>IO Type</name> + <key>type</key> + <type>enum</type> + <option> + <name>Float</name> + <key>float</key> + <opt>fcn:ff</opt> + </option> + </param> + <param> + <name>Matrix A</name> + <key>A</key> + <value>((1, 0), (0, 1))</value> + <type>raw</type> + </param> + <param> + <name>TPP</name> + <key>tag_propagation_policy</key> + <type>enum</type> + <option> + <name>All to All</name> + <key>gr.TPP_ALL_TO_ALL</key> + </option> + <option> + <name>One to One</name> + <key>gr.TPP_ONE_TO_ONE</key> + </option> + <option> + <name>No Propagation</name> + <key>gr.TPP_DONT</key> + </option> + <option> + <name>Matrix-Defined</name> + <key>999</key> + </option> + </param> + <check>len($A) > 0</check> + <check>len(${A}[0]) > 0</check> + <check>$tag_propagation_policy != gr.TPP_ONE_TO_ONE or (len($A) == len(${A}[0]))</check> + <sink> + <name>in</name> + <type>$type</type> + <nports>len(${A}[0])</nports> + </sink> + <sink> + <name>set_A</name> + <type>message</type> + <optional>1</optional> + </sink> + <source> + <name>out</name> + <type>$type</type> + <nports>len($A)</nports> + </source> +</block> |