Re: [USRP-users] UHD API

2018-08-06 Thread Brian Padalino via USRP-users
On Mon, Aug 6, 2018 at 3:37 AM TIMMEN Koen <
koen.tim...@thalesaleniaspace.com> wrote:

> Brian,
>
>
>
> I am not sure if I have stated my problem clearly. So I will reformulate:
> My HDL module which I have verified using testbenches needs to be
> controlled from the UHD API. However, I have trouble doing this. Following
> the two examples available from the source directory I connected my blocks
> as follows (using uhd:rfnoc::graph::connect(), without creating a streamer):
>
>
>
> SIGGEN à DUC à RADIO
>
>
>
> However, the USRP device does not transmit any samples.
>
>
>
> As I indicated, I am not sure whether or not to generate a stream. Because
> I don’t know what it is intended for. Should I for example create a stream
> object to manage the sample flow from the SIGGEN to the DUC? Or will it
> suffice to use uhd::rfnoc::graph::connect(). Or do I need to use both?
>

Sorry for the confusion.  No, you just need to connect the graph together
and the blocks should be stitched together.


>
>
> Then finally, once I have initialized and connected all blocks, how do I
> indicate to the radio it can start transmitting samples? The SIGGEN block
> generates samples after I write in a certain user register. It then stores
> these samples in a FIFO, which should offload the samples to the next block
> as soon as this activates ‘tready’. But I’m not sure if this ever happens
> or if the ‘tready’ signal might not be linked correctly for example.
>

You just need to write to the appropriate register.  To verify the tready
signal in your design, you can use the internal logic analyzer in Vivado
and check out what the core internally is doing.


>
>
> Hopefully now I indicated my struggles a bit better, if anything is
> unclear please don’t hesitate to let me know.
>

Yes, it was more clear.  Sorry for the confusion.  Hopefully this is more
clear.

Brian

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


Re: [USRP-users] UHD API

2018-08-06 Thread TIMMEN Koen via USRP-users
Brian,

I am not sure if I have stated my problem clearly. So I will reformulate: My 
HDL module which I have verified using testbenches needs to be controlled from 
the UHD API. However, I have trouble doing this. Following the two examples 
available from the source directory I connected my blocks as follows (using 
uhd:rfnoc::graph::connect(), without creating a streamer):

SIGGEN --> DUC --> RADIO

However, the USRP device does not transmit any samples.

As I indicated, I am not sure whether or not to generate a stream. Because I 
don’t know what it is intended for. Should I for example create a stream object 
to manage the sample flow from the SIGGEN to the DUC? Or will it suffice to use 
uhd::rfnoc::graph::connect(). Or do I need to use both?

Then finally, once I have initialized and connected all blocks, how do I 
indicate to the radio it can start transmitting samples? The SIGGEN block 
generates samples after I write in a certain user register. It then stores 
these samples in a FIFO, which should offload the samples to the next block as 
soon as this activates ‘tready’. But I’m not sure if this ever happens or if 
the ‘tready’ signal might not be linked correctly for example.

Hopefully now I indicated my struggles a bit better, if anything is unclear 
please don’t hesitate to let me know.

Kind regards,

Koen


De : Brian Padalino [mailto:bpadal...@gmail.com]
Envoyé : dimanche 5 août 2018 21:57
À : TIMMEN Koen
Cc : USRP-users@lists.ettus.com
Objet : Re: [USRP-users] UHD API

On Fri, Aug 3, 2018 at 3:19 AM TIMMEN Koen 
mailto:koen.tim...@thalesaleniaspace.com>> 
wrote:

De : Brian Padalino [mailto:bpadal...@gmail.com<mailto:bpadal...@gmail.com>]
Envoyé : jeudi 2 août 2018 16:57
À : TIMMEN Koen
Cc : USRP-users@lists.ettus.com<mailto:USRP-users@lists.ettus.com>
Objet : Re: [USRP-users] UHD API


First, let me tell you that I've done this exact thing so it's very possible.  
I also agree the current examples are poor in the UHD repository when dealing 
with most anything for RFNoC.

How did you setup your block to start and stop the transmission?  It sounds 
like maybe it's controlled using the settings registers?  A little more 
information about how you want to control your block would be useful here.

That is very good to hear.

Indeed the block is controlled through the settings registers. Sample 
generation can start by setting a certain value in a register, samples are then 
stored in a AXI FIFO at the end of the block. When the block is fully 
activated, the FIFO will communicate with the downstream block as normal.
This is very similar to how the siggen block works.  You 
should take a look there and see if that helps you out.

My problem is not with the HDL code, but with connecting the NoC blocks and 
piloting the whole set-up from the UHD API.

Streaming sends the data down to your block and the block receives it over the 
main AXI streaming interface.  It's meant for larger data sets, but it isn't 
limited to that.

Have you created your own custom C++ controller block, or are you using the XML 
definition to control your block?  I write my own C++ controller blocks, 
personally, and the XML is only there for defining the ID and the input/output 
ports.

So streaming is communication from Host PC to your USRP? Not 
between two NoC blocks for example?
No, host -> noc block streams are from the axi streaming interface, as are noc 
block -> noc block comms, for the most part.  You can perform configuration of 
other noc blocks if you know what you're doing, I believe - but that's more of 
an advanced topic.



Since I figured I only needed ‘sr_write’ and this is available from the 
standard block controller, I did not code my own. I did verify the writing to 
the registers using the readback register and that seems to work just fine.

For what reason would you recommend me writing my own block controller?

I find the XML scripting to be obtuse and difficult to understand when trying 
to read what it's doing.  In my opinion, it much more clear to the other 
developers what is going on when it's written in C++ and not abstracted by the 
XML.

Brian

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


Re: [USRP-users] UHD API

2018-08-05 Thread Brian Padalino via USRP-users
On Fri, Aug 3, 2018 at 3:19 AM TIMMEN Koen <
koen.tim...@thalesaleniaspace.com> wrote:

>
>
> *De :* Brian Padalino [mailto:bpadal...@gmail.com]
> *Envoyé :* jeudi 2 août 2018 16:57
> *À :* TIMMEN Koen
> *Cc :* USRP-users@lists.ettus.com
> *Objet :* Re: [USRP-users] UHD API
>
>
>
>
>
> First, let me tell you that I've done this exact thing so it's very
> possible.  I also agree the current examples are poor in the UHD
> repository when dealing with most anything for RFNoC.
>
>
>
> How did you setup your block to start and stop the transmission?  It
> sounds like maybe it's controlled using the settings registers?  A little
> more information about how you want to control your block would be useful
> here.
>
>
>
> That is very good to hear.
>
>
>
> Indeed the block is controlled through the settings registers. Sample
> generation can start by setting a certain value in a register, samples are
> then stored in a AXI FIFO at the end of the block. When the block is fully
> activated, the FIFO will communicate with the downstream block as normal.
>

This is very similar to how the siggen block works.  You should take a look
there and see if that helps you out.


>
>
> Streaming sends the data down to your block and the block receives it over
> the main AXI streaming interface.  It's meant for larger data sets, but
> it isn't limited to that.
>
>
>
> Have you created your own custom C++ controller block, or are you using
> the XML definition to control your block?  I write my own C++ controller
> blocks, personally, and the XML is only there for defining the ID and the
> input/output ports.
>
>
>
> So streaming is communication from Host PC to your USRP? Not
> between two NoC blocks for example?
>

No, host -> noc block streams are from the axi streaming interface, as are
noc block -> noc block comms, for the most part.  You can perform
configuration of other noc blocks if you know what you're doing, I believe
- but that's more of an advanced topic.


>
>
> Since I figured I only needed ‘sr_write’ and this is available from the
> standard block controller, I did not code my own. I did verify the writing
> to the registers using the readback register and that seems to work just
> fine.
>
>
>
> For what reason would you recommend me writing my own block controller?
>

I find the XML scripting to be obtuse and difficult to understand when
trying to read what it's doing.  In my opinion, it much more clear to the
other developers what is going on when it's written in C++ and not
abstracted by the XML.

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


Re: [USRP-users] UHD API

2018-08-03 Thread TIMMEN Koen via USRP-users

De : Brian Padalino [mailto:bpadal...@gmail.com]
Envoyé : jeudi 2 août 2018 16:57
À : TIMMEN Koen
Cc : USRP-users@lists.ettus.com
Objet : Re: [USRP-users] UHD API


First, let me tell you that I've done this exact thing so it's very possible.  
I also agree the current examples are poor in the UHD repository when dealing 
with most anything for RFNoC.

How did you setup your block to start and stop the transmission?  It sounds 
like maybe it's controlled using the settings registers?  A little more 
information about how you want to control your block would be useful here.

That is very good to hear.

Indeed the block is controlled through the settings registers. Sample 
generation can start by setting a certain value in a register, samples are then 
stored in a AXI FIFO at the end of the block. When the block is fully 
activated, the FIFO will communicate with the downstream block as normal.

Streaming sends the data down to your block and the block receives it over the 
main AXI streaming interface.  It's meant for larger data sets, but it isn't 
limited to that.

Have you created your own custom C++ controller block, or are you using the XML 
definition to control your block?  I write my own C++ controller blocks, 
personally, and the XML is only there for defining the ID and the input/output 
ports.

So streaming is communication from Host PC to your USRP? Not 
between two NoC blocks for example?

Since I figured I only needed ‘sr_write’ and this is available from the 
standard block controller, I did not code my own. I did verify the writing to 
the registers using the readback register and that seems to work just fine.

For what reason would you recommend me writing my own block controller?
___
USRP-users mailing list
USRP-users@lists.ettus.com
http://lists.ettus.com/mailman/listinfo/usrp-users_lists.ettus.com


Re: [USRP-users] UHD API

2018-08-02 Thread Brian Padalino via USRP-users
On Thu, Aug 2, 2018 at 10:46 AM TIMMEN Koen via USRP-users <
usrp-users@lists.ettus.com> wrote:

> Hello all,
>
>
>
> I am working on a custom RFNoC based signal generator module on the X310
> using UBX daughterboards. I have created a custom signal generator NoC
> block, that generates IQ samples based on register values and loaded this
> block together with a DUC NoC block on a X310 RFNoC image. I wish to use a
> UHD API to pilot the USRP device, so I do not want to use GNU radio.
>
>
>
> As I understood, UHD should allow me to connect the blocks in the
> following order:
>
>
>
> SIGGEN àDUCàRadio
>
>
>
> And then, I should be able to generate samples, bring them up to radio
> frequency and sequentially transmit them. To be clear, the samples are thus
> created on the USRP device, stay there and are never to be transferred to
> the host. I found the examples in the UHD library not really helpful, since
> they show me how to load data on and off the host PC. But this is not what
> I’m trying to achieve.
>
>
>
> Up to this point, I have not been able to make the USRP transmit anything
> and I’m not sure if I have connected my blocks properly (using
> uhd::rfnoc::graph_impl::connect). I find it difficult to determine which
> calls I exactly have to make to connect my blocks in the correct fashion
> and consecutively instruct the radio to start transmitting my samples.
> Could someone instruct me on how to do so?
>

First, let me tell you that I've done this exact thing so it's very
possible.  I also agree the current examples are poor in the UHD repository
when dealing with most anything for RFNoC.

How did you setup your block to start and stop the transmission?  It sounds
like maybe it's controlled using the settings registers?  A little more
information about how you want to control your block would be useful here.


>
>
> Also I am confused about the term ‘streaming’ and the ‘streamer’ object.
> For me, streaming means the act of data transfer between host computer and
> USRP, but I’m not entirely sure about that. Is streaming also the act of
> transferring date between two RFNoC blocks? Or even the act of transmitting
> data over the antenna?
>

Streaming sends the data down to your block and the block receives it over
the main AXI streaming interface.  It's meant for larger data sets, but it
isn't limited to that.

Have you created your own custom C++ controller block, or are you using the
XML definition to control your block?  I write my own C++ controller
blocks, personally, and the XML is only there for defining the ID and the
input/output ports.

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


[USRP-users] UHD API

2018-08-02 Thread TIMMEN Koen via USRP-users
Hello all,

I am working on a custom RFNoC based signal generator module on the X310 using 
UBX daughterboards. I have created a custom signal generator NoC block, that 
generates IQ samples based on register values and loaded this block together 
with a DUC NoC block on a X310 RFNoC image. I wish to use a UHD API to pilot 
the USRP device, so I do not want to use GNU radio.

As I understood, UHD should allow me to connect the blocks in the following 
order:

SIGGEN -->DUC-->Radio

And then, I should be able to generate samples, bring them up to radio 
frequency and sequentially transmit them. To be clear, the samples are thus 
created on the USRP device, stay there and are never to be transferred to the 
host. I found the examples in the UHD library not really helpful, since they 
show me how to load data on and off the host PC. But this is not what I'm 
trying to achieve.

Up to this point, I have not been able to make the USRP transmit anything and 
I'm not sure if I have connected my blocks properly (using 
uhd::rfnoc::graph_impl::connect). I find it difficult to determine which calls 
I exactly have to make to connect my blocks in the correct fashion and 
consecutively instruct the radio to start transmitting my samples. Could 
someone instruct me on how to do so?

Also I am confused about the term 'streaming' and the 'streamer' object. For 
me, streaming means the act of data transfer between host computer and USRP, 
but I'm not entirely sure about that. Is streaming also the act of transferring 
date between two RFNoC blocks? Or even the act of transmitting data over the 
antenna?

I found that a similar question has already been asked once here in 2016 
(Link),
 back then someone replied that he was not sure if this was even possible. 
However, no further discussion on the topic took place. If this is truly the 
case, can someone explain to me why this is not possible?


Kind regards,

Koen


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