One simple question

hi friends,

Can anyone tell me how one can implement a block that generates a
sequence
of bits at a rate of 2Mbps. I am new to Gnuradio and working towards
implementing a sequence generator on gnuradio. I did not find any block
which already does this (atleast this is what i believe is true). I
should
be able to control the rate too.

I just need some hints to work on.

Thanks
Ali

On Mon, Aug 11, 2008 at 11:47 PM, Murtuza [email protected] wrote:

hi friends,

Can anyone tell me how one can implement a block that generates a sequence
of bits at a rate of 2Mbps. I am new to Gnuradio and working towards
implementing a sequence generator on gnuradio. I did not find any block
which already does this (atleast this is what i believe is true). I should
be able to control the rate too.

I am assuming you’re talking about the USRP. If not, you just deal
with arbitrary samples within GNU Radio and it’s up to you to figure
out what your sampling means.

As for the USRP, your data rates really just depend on your
interpolation rates set in the FPGA. The master clock runs at 64MHz.

I believe the TX chain runs at 128MSPS, but I am not certain if the
last 2x interpolation happens in the AD9862 or in the FPGA. I
recommend reading the USRP FAQ on the Wiki for more USRP information.

Brian

Thanks for the replies. I think I have started to get a picture of what
it
really is. I want to implement a Direct Sequence Spread spectrum
application
for my work as I want to use it to implement a ad hoc network. I thought
that, one could be implemented using Gnuradio and USRPs. I actually
wanted
to work towards generating a block that would generate PN sequences at
the
rate of 2Mbps for my work. I will be using gold codes as the PN
sequences.

Is it possible to purely implement in software instead of programming
the
FPGA. As the rate is only 2Mbps isn’t it possible to implement in
software
only given we have a good computer to work with ?

Correct me if I am wrong. I will really appreciate it.

Thanks again
Ali

On Tue, Aug 12, 2008 at 4:53 AM, Patrick S. <

Murtuza wrote am 2008-08-12 05:47:

hi friends,

Can anyone tell me how one can implement a block that generates a
sequence of bits at a rate of 2Mbps.

Have you had a look at the docu?
Look at
http://www.gnuradio.org/trac/
and especially at
http://www.gnu.org/software/gnuradio/doc/howto-write-a-block.html

Blocks in GNU Radio generally do not have a instrinsic speed but are
constrained by the rate of their sources and sinks and of course by the
speed of your machine. In a software-only (no USRP or Audio)
applications you’d likely use gr.throttle.

I am new to Gnuradio and working
towards implementing a sequence generator on gnuradio. I did not find
any block which already does this (atleast this is what i believe is
true).

Please be more specific in what you want to implement. Do you want to
have very special sequences, or repeat sequences, or PRN? What do you
need it for?
GNU Radio has a vector source, and you can load it with arbitrary
values. You could also use a file as source and generate you data
outside GNU Radio. Of course the file can be a pipe and you could use
another program to generate your sequence on the fly.

Patrick

Engineers motto: cheap, good, fast: choose any two
Patrick S.
Student of Telematik, Techn. University Graz, Austria

I will be using gold codes as the PN sequences.

Is it possible to purely implement in software instead of programming the
FPGA. As the rate is only 2Mbps isn’t it possible to implement in software
only given we have a good computer to work with ?

The ‘quick and dirty’ option would be to just make vectors containing
the gold codes you want to use then put them in a repeating vector
source.

If you want to generate a stream of PR sequences to use in your python
code you should be fine as well. Look at
http://www.gnu.org/software/gnuradio/doc/howto-write-a-block.html and
the code for existing sources to get an idea of where to start.

Jason

Murtuza wrote:

Thanks for the replies. I think I have started to get a picture of what
it really is. I want to implement a Direct Sequence Spread spectrum
application for my work

I also was working on a DSSS implementation. Our chip rate was around
3 Mcps. The software had no trouble generating this rate in sw on an
Intel 2.33 GHz Core 2 Duo processor.

as I want to use it to implement a ad hoc

network. I thought that, one could be implemented using Gnuradio and
USRPs. I actually wanted to work towards generating a block that would
generate PN sequences at the rate of 2Mbps for my work. I will be using
gold codes as the PN sequences.

Is it possible to purely implement in software instead of programming
the FPGA. As the rate is only 2Mbps isn’t it possible to implement in
software only given we have a good computer to work with ?

I have written a GnuRadio source block that is a Gold Code generator.
you’re welcome to the code if you’re interested.

@(^.^)@ Ed

On Tue, Aug 12, 2008 at 11:47 AM, Jason U. [email protected]
wrote:

I will be using gold codes as the PN sequences.

Is it possible to purely implement in software instead of programming the
FPGA. As the rate is only 2Mbps isn’t it possible to implement in software
only given we have a good computer to work with ?

The ‘quick and dirty’ option would be to just make vectors containing
the gold codes you want to use then put them in a repeating vector
source.

There is a Galois form LFSR stream generator:

gr.glfsr_source_b(degree, repeat=True, mask=0, seed=1)

If the mask is not specified, it will choose one from an internal
table and generate a maximal length PRN sequence of length
2**degree-1, otherwise it will use the mask for the taps and you can
implement your own polynomial. The degree is valid from 2-32.

The seed value is put into the LFSR as its initial value, and the
repeat parameter will cause the sequence to repeat indefinitely
instead of just once.

The _b suffix indicates that it will create samples of item size 1
(bytes). These are unpacked; that is, the PRN sequence is transmitted
in the LSB of each byte.

Two of these wired into the inputs of gr.xor_bb will give you a Gold
code, provided you have the correct mask and seed for each of them.


Johnathan C.
Corgan Enterprises LLC
http://corganenterprises.com/