[prev in list] [next in list] [prev in thread] [next in thread] 

List:       usrp-users
Subject:    [USRP-users] RFNoC + GNU Radio: spp is set differently
From:       "Bachmaier, Luca" <luca.bachmaier () iis ! fraunhofer ! de>
Date:       2023-10-09 14:56:22
Message-ID: 75c7acf9196142a6a2c0fda19fe48938 () iis ! fraunhofer ! de
[Download RAW message or body]

Hi all,

I'm currently implementing a GNU Radio flowgraph that makes use of the RFNoC FFT \
block. After fixing a bug found out by Rob Kossler (mail in this mailing list from \
September 14) in the UHD repository, the original problem persists in GNU Radio: \
trying to use FFT lengths greater than 256 throws the error "samples per package must \
not be smaller than atomic item size".

When trying to look closer into the problem I noticed that the spp parameter is set \
differently when using the UHD python API directly (script rfnoc_rx_to_file) and when \
using GNU Radio. I added debug statements to the rfnoc_rx_streamer block that print \
the values of spp and ais.get() (atomic item size). When calling the rfnoc_rx_to_file \
script with a spp set to 1024 and an FFT length of 1024 I get the following output:

[INFO] [0/LogPwr#0] Setting default MTU forward policy.
Using radio 0, channel 0 Attempting to connect FFT:0 to 0/Radio#0:0...
Requesting RX Freq: 0 MHz... Actual RX Freq: 1 MHz...
Waiting for "lo_locked": ++++++++++ locked.
Requesting samples per packet of: 1024
Actual samples per packet = 1024
Using streamer args:

[DEBUG] spp = 18446744073709551615
[DEBUG] ais.get() = 1

[DEBUG] spp = 2000
[DEBUG] ais.get() = 1

[DEBUG] spp = 2000
[DEBUG] ais.get() = 1024

[DEBUG] spp = 1024
[DEBUG] ais.get() = 1024

Since here spp is not smaller than ais.get(), the flowgraph is able to run. When \
trying the same as a GNU Radio flowgraph, the output is the following:

[INFO] [0/LogPwr#0] Setting default MTU forward policy.

[DEBUG] spp = 18446744073709551615
[DEBUG] ais.get() = 1

[DEBUG] spp = 2000
[DEBUG] ais.get() = 1

[DEBUG] spp = 2000
[DEBUG] ais.get() = 2048

[DEBUG] spp = 0
[DEBUG] ais.get() = 2048

For some reason, spp is finally set to zero and ais.get() is set to 2048. I do not \
understand why, and I also don't get why the behavior is different for GNU Radio at \
all. Is it possible that GNU Radio uses its own version of UHD? Up until now I \
believed that GNU Radio simply uses the already installed UHD implementation over the \
UHD Python API. If this is not the case, how can I change this specific GNU Radio UHD \
version? I tried looking into the source code of gnuradio/gr-uhd/lib/rfnoc but I do \
not understand it unfortunately.

Regards
Luca


[Attachment #3 (text/html)]

<html xmlns:v="urn:schemas-microsoft-com:vml" \
xmlns:o="urn:schemas-microsoft-com:office:office" \
xmlns:w="urn:schemas-microsoft-com:office:word" \
xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" \
xmlns="http://www.w3.org/TR/REC-html40"> <head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
	{font-family:"Cambria Math";
	panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
	{font-family:Calibri;
	panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
	{margin:0cm;
	margin-bottom:.0001pt;
	font-size:11.0pt;
	font-family:"Calibri",sans-serif;
	mso-fareast-language:EN-US;}
a:link, span.MsoHyperlink
	{mso-style-priority:99;
	color:#0563C1;
	text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
	{mso-style-priority:99;
	color:#954F72;
	text-decoration:underline;}
span.E-MailFormatvorlage17
	{mso-style-type:personal-compose;
	font-family:"Calibri",sans-serif;
	color:windowtext;}
.MsoChpDefault
	{mso-style-type:export-only;
	mso-fareast-language:EN-US;}
@page WordSection1
	{size:612.0pt 792.0pt;
	margin:70.85pt 70.85pt 2.0cm 70.85pt;}
div.WordSection1
	{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="DE" link="#0563C1" vlink="#954F72">
<div class="WordSection1">
<p class="MsoNormal">Hi all,<o:p></o:p></p>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
<p class="MsoNormal"><span lang="EN-US">I&#8217;m currently implementing a GNU Radio \
flowgraph that makes use of the RFNoC FFT block. After fixing a bug found out by Rob \
Kossler (mail in this mailing list from September 14) in the UHD repository, the \
original problem  persists in GNU Radio: trying to use FFT lengths greater than 256 \
throws the error &#8220;samples per package must not be smaller than atomic item \
size&#8221;.<o:p></o:p></span></p> <p class="MsoNormal"><span \
lang="EN-US"><o:p>&nbsp;</o:p></span></p> <p class="MsoNormal"><span \
lang="EN-US">When trying to look closer into the problem I noticed that the spp \
parameter is set differently when using the UHD python API directly (script \
rfnoc_rx_to_file) and when using GNU Radio. I added debug statements to the  \
rfnoc_rx_streamer block that print the values of spp and ais.get() (atomic item \
size). When calling the rfnoc_rx_to_file script with a spp set to 1024 and an FFT \
length of 1024 I get the following output:<o:p></o:p></span></p> <p \
class="MsoNormal"><span lang="EN-US"><o:p>&nbsp;</o:p></span></p> <p \
class="MsoNormal" style="margin-left:35.4pt"><span lang="EN-US">[INFO] [0/LogPwr#0] \
Setting default MTU forward policy.<o:p></o:p></span></p> <p class="MsoNormal" \
style="margin-left:35.4pt"><span lang="EN-US">Using radio 0, channel 0 Attempting to \
connect FFT:0 to 0/Radio#0:0...<o:p></o:p></span></p> <p class="MsoNormal" \
style="margin-left:35.4pt"><span lang="EN-US">Requesting RX Freq: 0 MHz... Actual RX \
Freq: 1 MHz...<o:p></o:p></span></p> <p class="MsoNormal" \
style="margin-left:35.4pt"><span lang="EN-US">Waiting for &quot;lo_locked&quot;: \
&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43; locked.<o:p></o:p></span></p> <p \
class="MsoNormal" style="margin-left:35.4pt"><span lang="EN-US">Requesting samples \
per packet of: 1024<o:p></o:p></span></p> <p class="MsoNormal" \
style="margin-left:35.4pt"><span lang="EN-US">Actual samples per packet = \
1024<o:p></o:p></span></p> <p class="MsoNormal" style="margin-left:35.4pt"><span \
lang="EN-US">Using streamer args:<o:p></o:p></span></p> <p class="MsoNormal" \
style="margin-left:35.4pt"><span lang="EN-US"><o:p>&nbsp;</o:p></span></p> <p \
class="MsoNormal" style="margin-left:35.4pt"><span lang="EN-US">[DEBUG] spp = \
18446744073709551615<o:p></o:p></span></p> <p class="MsoNormal" \
style="margin-left:35.4pt"><span lang="EN-US">[DEBUG] ais.get() = \
1<o:p></o:p></span></p> <p class="MsoNormal" style="margin-left:35.4pt"><span \
lang="EN-US"><o:p>&nbsp;</o:p></span></p> <p class="MsoNormal" \
style="margin-left:35.4pt"><span lang="EN-US">[DEBUG] spp = \
2000<o:p></o:p></span></p> <p class="MsoNormal" style="margin-left:35.4pt"><span \
lang="EN-US">[DEBUG] ais.get() = 1<o:p></o:p></span></p> <p class="MsoNormal" \
style="margin-left:35.4pt"><span lang="EN-US"><o:p>&nbsp;</o:p></span></p> <p \
class="MsoNormal" style="margin-left:35.4pt"><span lang="EN-US">[DEBUG] spp = \
2000<o:p></o:p></span></p> <p class="MsoNormal" style="margin-left:35.4pt"><span \
lang="EN-US">[DEBUG] ais.get() = 1024<o:p></o:p></span></p> <p class="MsoNormal" \
style="margin-left:35.4pt"><span lang="EN-US"><o:p>&nbsp;</o:p></span></p> <p \
class="MsoNormal" style="margin-left:35.4pt"><span lang="EN-US">[DEBUG] spp = \
1024<o:p></o:p></span></p> <p class="MsoNormal" style="margin-left:35.4pt"><span \
lang="EN-US">[DEBUG] ais.get() = 1024<o:p></o:p></span></p> <p \
class="MsoNormal"><span lang="EN-US"><o:p>&nbsp;</o:p></span></p> <p \
class="MsoNormal"><span lang="EN-US">Since here spp is not smaller than ais.get(), \
the flowgraph is able to run. When trying the same as a GNU Radio flowgraph, the \
output is the following:<o:p></o:p></span></p> <p class="MsoNormal"><span \
lang="EN-US"><o:p>&nbsp;</o:p></span></p> <p class="MsoNormal" \
style="margin-left:35.4pt"><span lang="EN-US">[INFO] [0/LogPwr#0] Setting default MTU \
forward policy. <br>
<br>
[DEBUG] spp = 18446744073709551615<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:35.4pt"><span lang="EN-US">[DEBUG] ais.get() \
= 1<o:p></o:p></span></p> <p class="MsoNormal" style="margin-left:35.4pt"><span \
lang="EN-US"><o:p>&nbsp;</o:p></span></p> <p class="MsoNormal" \
style="margin-left:35.4pt"><span lang="EN-US">[DEBUG] spp = \
2000<o:p></o:p></span></p> <p class="MsoNormal" style="margin-left:35.4pt"><span \
lang="EN-US">[DEBUG] ais.get() = 1<o:p></o:p></span></p> <p class="MsoNormal" \
style="margin-left:35.4pt"><span lang="EN-US"><o:p>&nbsp;</o:p></span></p> <p \
class="MsoNormal" style="margin-left:35.4pt"><span lang="EN-US">[DEBUG] spp = \
2000<o:p></o:p></span></p> <p class="MsoNormal" style="margin-left:35.4pt"><span \
lang="EN-US">[DEBUG] ais.get() = 2048<o:p></o:p></span></p> <p class="MsoNormal" \
style="margin-left:35.4pt"><span lang="EN-US"><o:p>&nbsp;</o:p></span></p> <p \
class="MsoNormal" style="margin-left:35.4pt"><span lang="EN-US">[DEBUG] spp = \
0<o:p></o:p></span></p> <p class="MsoNormal" style="margin-left:35.4pt"><span \
lang="EN-US">[DEBUG] ais.get() = 2048<o:p></o:p></span></p> <p \
class="MsoNormal"><span lang="EN-US"><o:p>&nbsp;</o:p></span></p> <p \
class="MsoNormal"><span lang="EN-US">For some reason, spp is finally set to zero and \
ais.get() is set to 2048. I do not understand why, and I also don&#8217;t get why the \
behavior is different for GNU Radio at all. Is it possible that GNU Radio uses its \
own version  of UHD? Up until now I believed that GNU Radio simply uses the already \
installed UHD implementation over the UHD Python API. If this is not the case, how \
can I change this specific GNU Radio UHD version? I tried looking into the source \
code of gnuradio/gr-uhd/lib/rfnoc  but I do not understand it \
unfortunately.<o:p></o:p></span></p> <p class="MsoNormal"><span \
lang="EN-US"><o:p>&nbsp;</o:p></span></p> <p class="MsoNormal"><span \
lang="EN-US">Regards<o:p></o:p></span></p> <p class="MsoNormal"><span \
lang="EN-US">Luca<o:p></o:p></span></p> </div>
</body>
</html>



_______________________________________________
USRP-users mailing list -- usrp-users@lists.ettus.com
To unsubscribe send an email to usrp-users-leave@lists.ettus.com

--===============1283432092716347930==--

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic