discuss-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Discuss-gnuradio] USRP/USB abstraction in gnuradio


From: Eric Blossom
Subject: Re: [Discuss-gnuradio] USRP/USB abstraction in gnuradio
Date: Mon, 4 Jul 2005 19:52:35 -0700
User-agent: Mutt/1.5.6i

On Mon, Jul 04, 2005 at 12:24:16PM +0200, Kalen Watermeyer wrote:
> Greetings,
> 
> I'm a masters student developing a hardware platform for simple SDR 
> applications which is similar to the USRP in that it will stream data to 
> a PC via USB. My boards are being manufactured and I'm drawing up a list 
> of tests that I'll want to carry out on them (once they've been debugged).
> 
> I've managed to get gnuradio up and running on my debian box and am 
> playing around with the code. I plan to reuse (where possible) existing 
> code to interface with my system, specifically the USB abstraction.

Good.  You should be able to use usrp_prims.{h,cc}, usrp_basic.{h,cc}
and the fusb_*.{h,cc} stuff pretty much as is.  usrp_prims and
usrp_basic have some built-in assumptions about the Cypress FX2, such
as how to load firmware, but other than that is a pretty general
interface.

> Am I correct in saying that the usrp code treats the device as a stream 
> of data entering the system via the USB connection?

It's a little  more complicated than that, but that's the basic idea.
USB supports three kinds of transfers across the USB: command, bulk
read/write and isochronous.  We use command packets to configure the
USRP, load firmware, the fpga bitstream, etc.  We use endpoint 0 for
that interface.  In addition, we use two other endpoints, one for
streaming input data and the other for streaming output data.  These
endpoints are used with bulk transfers, since they are the USB
transfers that support the highest throughput.  

If you haven't already, I suggest reading chapter 9, "USB Device
Framework" of the USB 2.0 specification.  http://www.usb.org/developers/docs/
It covers most of what you need to know to build a USB peripheral.

> Also, how feasibile would it be to re-use this code with another USB 
> device (my own in this case)?

Very feasible.  There are at least two other projects besides the USRP
that are using big chunks of the existing code base.

> Many thanks
> Kalen Watermeyer

Eric




reply via email to

[Prev in Thread] Current Thread [Next in Thread]