|
From: | Sean Nowlan |
Subject: | Re: [Discuss-gnuradio] Extending UHD USRP Sink in out-of-tree module |
Date: | Mon, 15 Apr 2013 10:33:44 -0400 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130329 Thunderbird/17.0.5 |
On 04/14/2013 05:53 AM, Josh Blum wrote:
So that is to say I'd use the standard gr_uhd_usrp_sink block for the data pipe and I'd create a separate USRP session from my own custom block to handle just the control logic (timed gain and DUC retuning commands, etc.)?On 04/12/2013 07:45 PM, Sean Nowlan wrote:I mean to set those controls dynamically based on incoming stream tags, similar to the way burst tags work. For instance I designed a tx_gain tag that gets read by uhd_usrp_sink and sets the gain using set_command_time. I just wanted to know the easiest way to move this modified sink to an OIT of tree module, even though I'll be duplicating most of the gr-uhd code to do it.I see. Sounds like it doesn't fit well. I wouldn't recommend tags or for that matter modifying the source/sink block. Since 1) the control is async to the data anyway, 2) the control would get delayed by the data pipeline, 3) it wouldn't make sense in the case of the source block. Rather I would create another block which opens a usrp session and accepts control messages to act on. I happen to have one in the works, but its not ready yet.
It looks like you're working on exactly the types of things I'd like to do: https://github.com/guruofquality/grextras/blob/next/lib/uhd_control_port.cppI was thinking, since there's a limited command buffer in the USRP, would it make sense to add a message queue and encode timestamps and commands into the message? Is there a way to test the FPGA command buffer for fullness or some other way to prevent overflow?
Also, if it fit well, you would FWIW, open the usrp device session in your control block/IP, whatever that may be, and talk directly to it. That may be convenient. A lot less to maintain out of tree in either case anyway. -joshJosh Blum <address@hidden> wrote:On 04/12/2013 07:00 PM, Sean Nowlan wrote:I want to add some functionality to gr_uhd_usrp_sink to change frontend gain and tune the DDC. I've achieved part of this in the past byHooks are already exposed to set individual gain element, or individual parts of the tuning chain. The later is even available in GRC. What specifically is missing?modifying the files directly in gnuradio/gr-uhd, but that's an imprecise way to do it. Would you recommend I: 1) copy the code from the gnuradio tree to my out-of-tree module, change namespaces, etc. and add my functionality? 2) create my own private uhd_usrp_sink_impl that extends gnuradio's uhd_usrp_sink and add my functionality there? 3) something else?If its using stock FPGA images and all, branch off of the gnuradio maint, contribute the changes back.I remember reading something on this list from somebody who rolled their own usrp wrapper. Any hints?That turned out to be an attempt to set gain from the work function based off of some older USRP1 app that did the same. In any case, it actually wasnt needed. -joshThanks, Sean _______________________________________________ Discuss-gnuradio mailing list address@hidden https://lists.gnu.org/mailman/listinfo/discuss-gnuradio_______________________________________________ Discuss-gnuradio mailing list address@hidden https://lists.gnu.org/mailman/listinfo/discuss-gnuradio
[Prev in Thread] | Current Thread | [Next in Thread] |