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

List:       usrp-users
Subject:    Re: [USRP-users] Still unclear how to C&C RFNoC block externally
From:       Sugandha Gupta via USRP-users <usrp-users () lists ! ettus ! com>
Date:       2016-10-28 18:25:21
Message-ID: CAG_kd16tU53d=+uyB7t0+BMbix8DkKjANMJ_9NATkyMNUX9AoQ () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


Hey Jason

GNU Radio talks to the RFNoC blocks through the GRC bindings and the Noc
Script.
You can see a block from gr-ettus as an example :

GRC binding:
>> gr-ettus/grc/uhd_rfnoc_siggen.xml

This is where you include callbacks and connect the gr block to the
noc_script.

 self.$(id).set_arg("enable", $enable)
 <callback>set_arg("enable", $enable)</callback>

  <param>
    <name>Enable</name>
    <key>enable</key>
    <type>int</type>
    <option>
      <name>True</name>
      <key>1</key>
    </option>
   </param>

Siggen noc_script:

>> host/include/uhd/rfnoc/blocks/siggen.xml

   - Specify the address of the register as in the RFNoC Block

    <setreg>
      <name>ENABLE</name>
      <address>132</address>
    </setreg>
    <arg>


   - Specify the action and checks. Here SR_WRITE actually uses the
   settings bus (set_bus, set_addr, set_data) in the RFNoC framework to write
   to the register.

      <name>enable</name>
      <type>int</type>
      <value>0</value>
      <check>EQUAL($enable, 0) OR EQUAL($enable, 1)</check>
      <check_message>Enable is either 0 or 1.</check_message>
      <action>SR_WRITE("ENABLE", $enable)</action>
    </arg>


I hope this helps. This is a very high-level overview. I am not sure if you
wanted to go deeper than this.  More details are in:
https://kb.ettus.com/Getting_Started_with_RFNoC_Development#RFNoC_Framework

Thanks




On Fri, Oct 28, 2016 at 7:20 AM, Jason Matusiak via USRP-users <
usrp-users@lists.ettus.com> wrote:

> I attempted to work through this earlier, and never seemed to grasp it.
> The project was put on hold and now I am circling back to it.
>
> Some background: I have a block doing some cyclic prefix removal work, but
> it needs to know when the start of a frame is.  We already have a regular
> GR block that finds the beginning of a frame after receiving a dump of data
> and is supposed to tell my RFNoC block how many samples to trash before I
> get to the beginning of the next frame.
>
> The implementation: I have my noc_block_CPremoval.v setup with a register
> that is the sample_offset.  My CPremoval.v module checks for a new
> sample_offset value and reacts accordingly.  What is unclear to me (and
> maybe it is just regular old GR ignorance on my part), is how the GR block
> can write to that register.  Is this implemented or explained somewhere?
> Some way to poke values at asynchronous times into an RFNoC block seems
> like something that would be pretty common, but I am having trouble finding
> something similar.
>
> TIA!!!
>
> _______________________________________________
> USRP-users mailing list
> USRP-users@lists.ettus.com
> http://lists.ettus.com/mailman/listinfo/usrp-users_lists.ettus.com
>



-- 
Sugandha Gupta
Staff Software Engineer
Ettus Research

[Attachment #5 (text/html)]

<div dir="ltr"><div>Hey Jason</div><div><br></div><div>GNU Radio talks to the RFNoC \
blocks through the GRC bindings and the Noc Script.  <br></div><div>You can see a \
block from gr-ettus as an example :</div><div><br></div><div>GRC binding:  \
</div><div>&gt;&gt; gr-ettus/grc/uhd_rfnoc_siggen.<wbr>xml<br></div><div><br></div><div>This \
is where you include callbacks and connect the gr block to the noc_script.  \
</div><div><br></div><div><font face="monospace, monospace">  \
self.$(id).set_arg(&quot;enable&quot;, $enable)<br></font></div><div><div><font \
face="monospace, monospace">  &lt;callback&gt;set_arg(&quot;enable&quot;, \
$enable)&lt;/callback&gt;</font></div></div><div><font face="monospace, \
monospace"><br></font></div><div><font face="monospace, monospace">   \
&lt;param&gt;<br></font></div><div><div><font face="monospace, monospace">      \
&lt;name&gt;Enable&lt;/name&gt;</font></div><div><font face="monospace, monospace">   \
&lt;key&gt;enable&lt;/key&gt;</font></div><div><font face="monospace, monospace">     \
&lt;type&gt;int&lt;/type&gt;</font></div><div><font face="monospace, monospace">      \
&lt;option&gt;</font></div><div><font face="monospace, monospace">         \
&lt;name&gt;True&lt;/name&gt;</font></div><div><font face="monospace, monospace">     \
&lt;key&gt;1&lt;/key&gt;</font></div><div><font face="monospace, monospace">      \
&lt;/option&gt;</font></div><div><font face="monospace, monospace">     \
&lt;/param&gt;</font></div></div><div><br></div><div>Siggen \
noc_script:</div><div><br></div><div>&gt;&gt;  \
host/include/uhd/rfnoc/<wbr>blocks/siggen.xml</div><div><ul><li>Specify the address \
of the register as in the RFNoC Block  <br></li></ul></div><blockquote \
style="margin:0px 0px 0px 40px;border:none;padding:0px"><div><div><font \
face="monospace, monospace">      &lt;setreg&gt;</font></div></div><div><div><font \
face="monospace, monospace">         \
&lt;name&gt;ENABLE&lt;/name&gt;</font></div></div><div><div><font face="monospace, \
monospace">         &lt;address&gt;132&lt;/address&gt;</font></div></div><div><div><font \
face="monospace, monospace">      &lt;/setreg&gt;</font></div></div><div><div><font \
face="monospace, monospace">      \
&lt;arg&gt;</font></div></div></blockquote><div><ul><li>Specify the action and \
checks. Here SR_WRITE actually uses the settings bus (set_bus, set_addr, set_data) in \
the RFNoC framework to write to the register.  </li></ul></div><blockquote \
style="margin:0px 0px 0px 40px;border:none;padding:0px"><div><div><font \
face="monospace, monospace">         \
&lt;name&gt;enable&lt;/name&gt;</font></div></div><div><div><font face="monospace, \
monospace">         &lt;type&gt;int&lt;/type&gt;</font></div></div><div><div><font \
face="monospace, monospace">         \
&lt;value&gt;0&lt;/value&gt;</font></div></div><div><div><font face="monospace, \
monospace">         &lt;check&gt;EQUAL($enable, 0) OR EQUAL($enable, \
1)&lt;/check&gt;</font></div></div><div><div><font face="monospace, monospace">       \
&lt;check_message&gt;Enable is either 0 or \
1.&lt;/check_message&gt;</font></div></div><div><div><font face="monospace, \
monospace">         &lt;action&gt;SR_WRITE(&quot;ENABLE&quot;, \
$enable)&lt;/action&gt;</font></div></div><div><div><font face="monospace, \
monospace">      &lt;/arg&gt;</font></div></div></blockquote><div><br></div>I hope \
this helps. This is a very high-level overview. I am not sure if you wanted to go \
deeper than this.   More details are in:  <div><a \
href="https://kb.ettus.com/Getting_Started_with_RFNoC_Development#RFNoC_Framework" \
target="_blank">https://kb.ettus.com/Getting_<wbr>Started_with_RFNoC_<wbr>Development#RFNoC_Framework</a></div><div><br></div><div>Thanks</div><div><blockquote \
style="margin:0px 0px 0px \
40px;border:none;padding:0px"><div><br></div><div><br></div></blockquote></div><div \
class="gmail_extra"><br><div class="gmail_quote">On Fri, Oct 28, 2016 at 7:20 AM, \
Jason Matusiak via USRP-users <span dir="ltr">&lt;<a \
href="mailto:usrp-users@lists.ettus.com" \
target="_blank">usrp-users@lists.ettus.com</a>&gt;</span> wrote:<br><blockquote \
class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid \
rgb(204,204,204);padding-left:1ex">I attempted to work through this earlier, and \
never seemed to grasp it.   The project was put on hold and now I am circling back to \
it.<br> <br>
Some background: I have a block doing some cyclic prefix removal work, but it needs \
to know when the start of a frame is.   We already have a regular GR block that finds \
the beginning of a frame after receiving a dump of data and is supposed to tell my \
RFNoC block how many samples to trash before I get to the beginning of the next \
frame.<br> <br>
The implementation: I have my noc_block_CPremoval.v setup with a register that is the \
sample_offset.   My CPremoval.v module checks for a new sample_offset value and \
reacts accordingly.   What is unclear to me (and maybe it is just regular old GR \
ignorance on my part), is how the GR block can write to that register.   Is this \
implemented or explained somewhere?   Some way to poke values at asynchronous times \
into an RFNoC block seems like something that would be pretty common, but I am having \
trouble finding something similar.<br> <br>
TIA!!!<br>
<br>
______________________________<wbr>_________________<br>
USRP-users mailing list<br>
<a href="mailto:USRP-users@lists.ettus.com" \
target="_blank">USRP-users@lists.ettus.com</a><br> <a \
href="http://lists.ettus.com/mailman/listinfo/usrp-users_lists.ettus.com" \
rel="noreferrer" target="_blank">http://lists.ettus.com/mailman<wbr>/listinfo/usrp-users_lists.ett<wbr>us.com</a><br>
 </blockquote></div><br><br clear="all"><div><br></div>-- <br><div \
class="gmail-m_-104349470077294981gmail_signature"><div dir="ltr"><div>Sugandha \
Gupta</div>Staff Software Engineer<div>Ettus Research</div></div></div> </div></div>



_______________________________________________
USRP-users mailing list
USRP-users@lists.ettus.com
http://lists.ettus.com/mailman/listinfo/usrp-users_lists.ettus.com


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

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