Re: [USRP-users] Fw: a few questions on rfnoc

2017-08-07 Thread Dario Pennisi via USRP-users
Hi Nicolas,
Thank you very much for your quick response.
Regarding variable packet sizes the output of my block is going straight to the 
host side and I am not planning these to connect to other blocks. In this case 
do you see any issue? Will uhd and gnuradio cope with that or will I have 
issues?

Regarding timing I was referring to a relationship between input and output 
packets. I understand these can be unrelated and basically I just have to 
generate the right chdr on the output side but just wanted to cross check.

Regarding message ports the point is that my block is a sort of protocol 
decoder so the idea is to input samples and output metadata when a packet is 
received. In rfnoc_fosphor_c_impl::handle_cfg_message message port is an input 
whereas I was considering treating output data as an output message port as it 
is a more logical representation of what I am outputting. In any case if data 
can be output in discontinuous, variable length bursts then I don’t see any 
problem in using stream…

Finally, regarding tutorial… the link you sent me is exactly what I studied so 
far but it contains little information on how to code C implementations to 
support RFNoC blocks. As you may have guessed I have to perform some 
significant post processing on data and for me xml block descriptors are not 
enough. For this reason I was looking for the rfnoc-tutorial/lib/gain_impl.cc 
file referred in your link which I can’t find anywhere.

Thanks,

Dario Pennisi

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


Re: [USRP-users] Fw: a few questions on rfnoc

2017-08-07 Thread Nicolas Cuervo via USRP-users
Hello Dario,


We are creating a RFNoC block that inputs a continuous flow of data and
> needs to output an irregular burst of variable length.
>
> I tried to research a bit but didn’t found a final answer on the following
> questions:
>
>1. Packets to and from RFNoC blocks need to have a min/max/fixed
>length? Apparently not and if I didn’t misunderstand it is also possible to
>send packets without the length so that their length could be variable but
>just want to be sure
>
> If what you mean is that you might not have to deal with packet length in
your code... Then it is possible. Because the axi wrapper is the one who
forms packets for you, and it will calculate the length for you as well. As
long as you use axi stream with tlast correctly, you won't have to care
about packet length. Your code will only see axi going in and coming out.

About variable packet sizes within the same code from the host can mess up
a lot of things. The rfnoc infra might be supporting that. But some blocks
don't. Like the DDC or the DUC blocks. So if you use them with your block,
it just wont work.

 Is there any timing related requirement on when packets are sent/received?


It's not clear what you mean by "timing" here exactly. Your design should
meet FPGA timing, and that is an implementation requirement in order to
avoid undefined behavior. If you are asking about "timed commands", then it
depends on your application. If you need synchronized channels, then you
required timed commands, for example.

My output port would basically resemble a message port… I seem to
> understand that there is some work in progress to support message outputs
> from RFNoC blocks but didn’t really understand if this is really feasible
> or not. If it is where can I find some examples?



>

There are some implementations that have done something alike to a message
port [1]. However, message ports are *not* supported yet in the RFNoC
framework, although there are plans to implement this feature. You might
want to check how rfnoc-fosphor has an alike implementation with the
method rfnoc_fosphor_c_impl::handle_cfg_message, which could be helpful for
what you want to achieve.

The code for rfnoc-fosphor can be found within gr-ettus [2]


 On the host side I need to add some custom C code so was looking for the
> tutorial here (http://gnuradio.org/redmine/projects/gnuradio/wiki/Guided_
> Tutorials) but this link does not seem to work anymore and on git there
> seem to be no trace of it. is there any sample skeleton with the block
> implementation to just manage data from a stream and read/write registers?


You might be better off with the RFNoC development guided tutorial here
[3].

Regards,
- Nicolas

[1] https://archive.fosdem.org/2015/schedule/event/rfnocfosphor/
[2] https://github.com/EttusResearch/gr-ettus
[3] https://kb.ettus.com/Getting_Started_with_RFNoC_Development
___
USRP-users mailing list
USRP-users@lists.ettus.com
http://lists.ettus.com/mailman/listinfo/usrp-users_lists.ettus.com