From 4e636b2b4bb29d5224aeff4ae79af121020338f1 Mon Sep 17 00:00:00 2001
From: Josh Blum
Date: Fri, 2 Jul 2010 18:30:31 -0700
Subject: uhd mimo: created mimo source and sink block for gr-uhd
---
gr-uhd/grc/Makefile.am | 2 +
gr-uhd/grc/uhd_mimo_sink.xml | 99 ++++++++++++++++++++++++++++++++++++++++++
gr-uhd/grc/uhd_mimo_source.xml | 99 ++++++++++++++++++++++++++++++++++++++++++
3 files changed, 200 insertions(+)
create mode 100644 gr-uhd/grc/uhd_mimo_sink.xml
create mode 100644 gr-uhd/grc/uhd_mimo_source.xml
(limited to 'gr-uhd/grc')
diff --git a/gr-uhd/grc/Makefile.am b/gr-uhd/grc/Makefile.am
index 61eb32770..cf3f77080 100644
--- a/gr-uhd/grc/Makefile.am
+++ b/gr-uhd/grc/Makefile.am
@@ -24,5 +24,7 @@ include $(top_srcdir)/Makefile.common
grcblocksdir = $(grc_blocksdir)
dist_grcblocks_DATA = \
+ uhd_mimo_source.xml \
+ uhd_mimo_sink.xml \
uhd_simple_source.xml \
uhd_simple_sink.xml
diff --git a/gr-uhd/grc/uhd_mimo_sink.xml b/gr-uhd/grc/uhd_mimo_sink.xml
new file mode 100644
index 000000000..faafbfd2f
--- /dev/null
+++ b/gr-uhd/grc/uhd_mimo_sink.xml
@@ -0,0 +1,99 @@
+
+
+
+ UHD MIMO Sink
+ uhd_mimo_sink
+ UHD
+ from gnuradio import uhd
+ uhd.mimo_sink($nchan, $args, uhd.io_type_t.$type.type)
+self.$(id).set_samp_rate_all($samp_rate)
+map(lambda x: self.$(id).set_center_freq(*x), enumerate($center_freqs))
+map(lambda x: self.$(id).set_gain(*x), enumerate($gains))
+#if $ants()
+map(lambda x: self.$(id).set_antenna(*x), enumerate($ants))
+#end if
+ set_samp_rate($samp_rate)
+
+ Input Type
+ type
+ enum
+
+
+
+
+ Num Channels
+ nchan
+ 2
+ int
+
+
+ Args
+ args
+ addr=192.168.10.2 192.168.20.2
+ string
+
+
+ Samp Rate (Sps)
+ samp_rate
+ samp_rate
+ real
+
+
+ Center Freqs (Hz)
+ center_freqs
+ 0, 0
+ real_vector
+
+
+ Gains (dB)
+ gains
+ 0, 0
+ real_vector
+
+
+ Antennas
+ ants
+ ['RX2', 'RX2']
+ raw
+ #if not $ants() then 'part' else 'none'#
+
+
+ out
+ $type
+ $type.vlen
+ $nchan
+
+
+The UHD Sink Block:
+
+Args:
+Args is a delimited string used to locate UHD devices on your system. \
+If left blank, the first UHD device found will be used. \
+Used args to specify a specfic device. \
+USRP2 Example: addr=192.168.10.2
+
+Sample rate:
+The sample rate is the number of samples per second input by this block. \
+The UHD device driver will try its best to match the requested sample rate. \
+If the requested rate is not possible, the UHD block will print an error at runtime.
+
+Antenna:
+For subdevices/daughterboards with only one antenna, this may be left blank. \
+Otherwise, the user should specify one of the possible antenna choices. \
+See the daughterboard application notes for the possible antenna choices.
+
+
diff --git a/gr-uhd/grc/uhd_mimo_source.xml b/gr-uhd/grc/uhd_mimo_source.xml
new file mode 100644
index 000000000..1cffa62cc
--- /dev/null
+++ b/gr-uhd/grc/uhd_mimo_source.xml
@@ -0,0 +1,99 @@
+
+
+
+ UHD MIMO Source
+ uhd_mimo_source
+ UHD
+ from gnuradio import uhd
+ uhd.mimo_source($nchan, $args, uhd.io_type_t.$type.type)
+self.$(id).set_samp_rate_all($samp_rate)
+map(lambda x: self.$(id).set_center_freq(*x), enumerate($center_freqs))
+map(lambda x: self.$(id).set_gain(*x), enumerate($gains))
+#if $ants()
+map(lambda x: self.$(id).set_antenna(*x), enumerate($ants))
+#end if
+ set_samp_rate($samp_rate)
+
+ Output Type
+ type
+ enum
+
+
+
+
+ Num Channels
+ nchan
+ 2
+ int
+
+
+ Args
+ args
+ addr=192.168.10.2 192.168.20.2
+ string
+
+
+ Samp Rate (Sps)
+ samp_rate
+ samp_rate
+ real
+
+
+ Center Freqs (Hz)
+ center_freqs
+ 0, 0
+ real_vector
+
+
+ Gains (dB)
+ gains
+ 0, 0
+ real_vector
+
+
+ Antennas
+ ants
+ ['RX2', 'RX2']
+ raw
+ #if not $ants() then 'part' else 'none'#
+
+
+
+The UHD Source Block:
+
+Args:
+Args is a delimited string used to locate UHD devices on your system. \
+If left blank, the first UHD device found will be used. \
+Used args to specify a specfic device. \
+USRP2 Example: addr=192.168.10.2
+
+Sample rate:
+The sample rate is the number of samples per second output by this block. \
+The UHD device driver will try its best to match the requested sample rate. \
+If the requested rate is not possible, the UHD block will print an error at runtime.
+
+Antenna:
+For subdevices/daughterboards with only one antenna, this may be left blank. \
+Otherwise, the user should specify one of the possible antenna choices. \
+See the daughterboard application notes for the possible antenna choices.
+
+
--
cgit
From c6e8a20c39357dc12bf28030a1bb0c36596403b9 Mon Sep 17 00:00:00 2001
From: Josh Blum
Date: Tue, 6 Jul 2010 17:05:38 -0700
Subject: uhd: added callbacks in the mimo grc blocks
---
gr-uhd/grc/uhd_mimo_sink.xml | 3 +++
gr-uhd/grc/uhd_mimo_source.xml | 3 +++
2 files changed, 6 insertions(+)
(limited to 'gr-uhd/grc')
diff --git a/gr-uhd/grc/uhd_mimo_sink.xml b/gr-uhd/grc/uhd_mimo_sink.xml
index faafbfd2f..00d7f678f 100644
--- a/gr-uhd/grc/uhd_mimo_sink.xml
+++ b/gr-uhd/grc/uhd_mimo_sink.xml
@@ -17,6 +17,9 @@ map(lambda x: self.$(id).set_gain(*x), enumerate($gains))
map(lambda x: self.$(id).set_antenna(*x), enumerate($ants))
#end if
set_samp_rate($samp_rate)
+ map(lambda x: self.$(id).set_center_freq(*x), enumerate($center_freqs))
+ map(lambda x: self.$(id).set_gain(*x), enumerate($gains))
+ map(lambda x: self.$(id).set_antenna(*x), enumerate($ants))
Input Type
type
diff --git a/gr-uhd/grc/uhd_mimo_source.xml b/gr-uhd/grc/uhd_mimo_source.xml
index 1cffa62cc..98081bff0 100644
--- a/gr-uhd/grc/uhd_mimo_source.xml
+++ b/gr-uhd/grc/uhd_mimo_source.xml
@@ -17,6 +17,9 @@ map(lambda x: self.$(id).set_gain(*x), enumerate($gains))
map(lambda x: self.$(id).set_antenna(*x), enumerate($ants))
#end if
set_samp_rate($samp_rate)
+ map(lambda x: self.$(id).set_center_freq(*x), enumerate($center_freqs))
+ map(lambda x: self.$(id).set_gain(*x), enumerate($gains))
+ map(lambda x: self.$(id).set_antenna(*x), enumerate($ants))
Output Type
type
--
cgit