Split-function implementation of 802.11g OFDM PHY and MAC on USRP2

Hi list,

My name
is Nemanja and I am working on my master thesis trying to implement
802.11g OFDM standard on USRP2 with XCVR2450. In order to meet the
timing requirements of the standard, I want to split the
functionality between the host and the FPGA, very similar to
Split-functionality MACs project
(https://www.cgran.org/wiki/CMUmacs).
Since 802.11g TX PHY has been developed by FTW
(https://www.cgran.org/wiki/ftw80211ofdmtx)
and further extended with MAC layer by Uwicore
(http://www.uwicore.umh.es/mhop-software.html),
both for use on the host, my approach would be to use these and
buffer the completely baked TX packets from the host on the
unused 1MB SRAM on the USRP2. These can then easily be sent with low
latency when the channel is sensed free. Moreover, the Carrier
Sensing with Collision Avoidance will be implemented on FGPA and
based on RSSI from the daughter card. In the RX mode FPGA should be
able to check the preamble in order to decide if the packet is for
this host or not, and accordingly proceed it to the host or discard.
However, since this standard is using OFDM, an FFT is needed. Maybe
FFT can be avoided by implementing a Look Up Table, which could be
used in closed networks where all senders are known. I will wait a
while with implementation of ACK and RTS/CTS.

I am using the following:

  • Ubuntu 10.04
  • GNUradio 3.3.0 with
    UHD_003.001.002-ba0e3c8

I am a newbie to all of this and I have
a few questions:

  1. Did anybody use this external SRAM
    on USRP2 before? According to the FAQ page the usual FPGA build is
    not using it.
    (http://gnuradio.org/redmine/projects/gnuradio/wiki/USRP2GenFAQ)
    However, my experience with these pages is that many of them are
    outdated. I also found the folder called extramfifo in
    uhd/fpga/usrp2 folder for which I believe has something to do with
    external RAM.True?

  2. How to build the new FPGA UHD image?
    I have access to Xilinx 12.4 on a Windows XP machine for building the
    image. At first I will try only to add more code without omitting any
    of the present code. I have read the discussion at
    (http://old.nabble.com/Finally-compiled-USRP2-code-works-fine-with-UDP-image-...but-not-with-compiled-Raw-Ethernet-Image-td30653029.html)
    , where it is written that no project file should be made. However,
    the process described is not fully clear to me.

  3. Does firmware image also have to be
    changed after modification with using the SRAM, or with any FPGA
    modification?

  4. How to read RSSI? I have read at
    (http://old.nabble.com/measuring-RSSI---N210-with-RFX2400-td31773654.html#a31773654)
    that this could be used:

from the uhd api:

usrp->get_rx_sensor(“rssi”)

or in
python w/ gr-uhd
usrp.get_dboard_sensor(“rssi”)

But what is uhd api?

BTW, I am aware that using RSSI from
XCVR2450 is the signal strength over wider bandwidth than used in the
software.

Please feel free to come with any
comment.

Thank you in advance!

Regards,
Nemanja Trecakov

On Fri, 2011-08-12 at 23:26 +0100, Nemanja Trecakov wrote:

functionality between the host and the FPGA, very similar to
Sensing with Collision Avoidance will be implemented on FGPA and

not using it.
(http://gnuradio.org/redmine/projects/gnuradio/wiki/USRP2GenFAQ)
However, my experience with these pages is that many of them are
outdated. I also found the folder called extramfifo in
uhd/fpga/usrp2 folder for which I believe has something to do with
external RAM.True?

The external SRAM is currently used for buffering TX packets.

  1. How to build the new FPGA UHD image?
    I have access to Xilinx 12.4 on a Windows XP machine for building the
    image. At first I will try only to add more code without omitting any
    of the present code. I have read the discussion at

(http://old.nabble.com/Finally-compiled-USRP2-code-works-fine-with-UDP-image-...but-not-with-compiled-Raw-Ethernet-Image-td30653029.html)

, where it is written that no project file should be made. However,
the process described is not fully clear to me.

The existing makefile is really for unix installations. You will have a
much easier time compiling your custom image with a Linux ISE
installation.

  1. Does firmware image also have to be
    changed after modification with using the SRAM, or with any FPGA modification?

Generally no. Use a firmware image version that corresponds to your FPGA
image though.

usrp->get_rx_sensor(“rssi”)

or in
python w/ gr-uhd
usrp.get_dboard_sensor(“rssi”)

But what is uhd api?

UHD API refers to the host (PC side) interface. If you’re reading RSSI
from the FPGA it doesn’t apply to you.

–n

Josh and Nick,

thank you very much for your reply.

I have some more things to ask:

  1. The external SRAM is currently used for buffering TX packets

  2. The existing makefile is really for unix installations. You will have a
    much easier time compiling your custom image with a Linux ISE
    installation.

@Nick: I am aware that the existing makefile is for unix-like
installations.

However, I have only the windows version available at the moment.

You should be able to do this on windows too. You just need to install
gnumake, and Xilinx xtclsh should be in your %PATH%

@Josh: I copied the FPGA UHD source code to my windows machine and
installed gnumake. At first I didn’t know how to run gnumake, so I tried
the command promt and run ‘gmake’ command the top\USRP2 directory.
Please correct me if I did this wrong, but the output saw quite correct,
since it started to build and gave the error of that ‘xtclsh’ is not
found/recognized. I did not include it in the %PATH% because I did not
know how to do it. I used search in windows and found two files named
‘xtclsh’(both recognized as application files by windows) in Xilinx ISE
directory. So my question is:

  • HOW TO INCLUDE xtclsh IN MY %PATH%? Where and how(form of it) to write
    the path towards the files I found?
    I saw your “recipe” from before on
    (http://old.nabble.com/xtclsh-not-found-td30486735.html#a30486735), but
    I am not sure how to do it in windows.

  • WHICH FILE TO USE? - …\ISE_DS\ISE\bin\nt or the in
    …\ISE_DS\ISE\bin\nt\unwrapped

  1. Generally no. Use a firmware image version that corresponds to your FPGA
    image though.

  2. UHD API refers to the host (PC side) interface. If you’re reading RSSI
    from the FPGA it doesn’t apply to you.

@Nick: I understand that it doesn’t apply to my project directly, but I
am just curious on the ways that it’s possible to read RSSI in the
software (explicitly what to write where and how to run, since I am a
newbie)

  • Can you explain how I can read RSSI in general, irrelevant of my
    project?

As I understand, there are two alternatives:

  1. If daughterboard having analog RSSi output → own dedicated small
    low-speed ADC → FPGA → host
  2. IF of received signal → usual big high-speed ADC → FPGA ->host
  • To which alternative does ‘rssi.v’ file in uhd\fpga\usrp2\sdr_lib
    directory correspond to?

  • How do we adjust dynamic range of ADC to the incoming signal?

Since I want to implement a simple carrier sensing in the FPGA, I would
like to know how I can read the value of the analog RSSI after being
digitalized with ADC and the form of the signal, in order to empirically
find the limit for idle channel.

Thank you in advance!

Best Regards,
Nemanja Trecakov

Hi Nick,

On Sat, Aug 13, 2011 at 02:41, Nick F. [email protected] wrote:

The external SRAM is currently used for buffering TX packets.
Is it true for USRP N and latest git too?


Regards,
Alexander C…

On Wed, 2011-08-17 at 18:00 +0400, Alexander C. wrote:

uhd/fpga/usrp2 folder for which I believe has something to do with
external RAM.True?

The external SRAM is currently used for buffering TX packets.

Is it true for USRP N and latest git too?

yes

On Wed, 2011-08-17 at 21:47 +0400, Alexander C. wrote:

However, my experience with these pages is that many of them are

By Tx do you mean Ethernet->RF aka RF Tx, or RF->Ethernet aka Eth Tx?

RF TX. It’s there as a buffer so you can use timestamped TX packets to
say “send this data at exactly time X”.

–n

On Wed, Aug 17, 2011 at 21:15, Nick F. [email protected] wrote:

outdated. I also found the folder called extramfifo in
uhd/fpga/usrp2 folder for which I believe has something to do with
external RAM.True?

The external SRAM is currently used for buffering TX packets.

Is it true for USRP N and latest git too?

yes

By Tx do you mean Ethernet->RF aka RF Tx, or RF->Ethernet aka Eth Tx?


Regards,
Alexander C…

On Wed, Aug 17, 2011 at 10:50 AM, Nick F. [email protected] wrote:

(http://gnuradio.org/redmine/projects/gnuradio/wiki/USRP2GenFAQ)
yes


Discuss-gnuradio mailing list
[email protected]
Discuss-gnuradio Info Page

Is the FPGA even big enough to support a full 802.11G receiver (so
many multipliers)? Unless there is a onboard microprocessor/DSP for you
to
use, trying to run everything in hardware will get very complicated very
fast. Granted the MAC is offloaded to the host computer, but handling
all
the PHY functions is daunting.

There is preamble search, then symbol/freq synchronization + whatever
filtering is needed to accomplish this. After that, there is OFDM
equalization from the pilot symbols. Also viterbi decoders for the FEC.

–Colby

Hi list,

I found the way to include the xctlsh in the %PATH%
(How to Set the Path and Environment Variables in Windows).

However, now I have a new problem. Here is the error I get in the
cmd.exe when I try gmake.

Any help is appreciated!

Best Regards,
Nemanja Trecakov

The error follows below:

C:\Documents and Settings\USRP2_fpga_NEMO\usrp2\top\USRP2>gmake
‘head’ is not recognized as an internal or external command,
operable program or batch file.
…/Makefile.common:55: warning: overriding commands for target
C:/Documents' ../Makefile.common:51: warning: ignoring old commands for target C:/Documents’
…/Makefile.common:55: warning: overriding commands for target and' ../Makefile.common:51: warning: ignoring old commands for target and’
…/Makefile.common:60: warning: overriding commands for target
C:/Documents' ../Makefile.common:55: warning: ignoring old commands for target C:/Documents’
…/Makefile.common:60: warning: overriding commands for target and' ../Makefile.common:55: warning: ignoring old commands for target and’
gmake: Circular C:/Documents ← C:/Documents dependency dropped.
gmake: Circular and ← C:/Documents dependency dropped.
gmake: Circular and ← and dependency dropped.
gmake: Circular
Settings/USRP2_fpga_NEMO/usrp2/top/USRP2/build/u2_rev3.bin ← C:
/Documents dependency dropped.
gmake: Circular
Settings/USRP2_fpga_NEMO/usrp2/top/USRP2/build/u2_rev3.bin ← an
d dependency dropped.
gmake: Circular
Settings/USRP2_fpga_NEMO/usrp2/top/USRP2/build/u2_rev3.xise ← C
:/Documents dependency dropped.
gmake: Circular
Settings/USRP2_fpga_NEMO/usrp2/top/USRP2/build/u2_rev3.xise ← a
nd dependency dropped.
gmake: *** No rule to make target
Settings/USRP2_fpga_NEMO/usrp2/top/USRP2/u2_c ore.v', needed by Settings/USRP2_fpga_NEMO/usrp2/top/USRP2/build/u2_rev3.xise’.
Stop.

C:\Documents and Settings\USRP2_fpga_NEMO\usrp2\top\USRP2>

On Wed, Aug 17, 2011 at 21:50, Nick F. [email protected] wrote:

(http://gnuradio.org/redmine/projects/gnuradio/wiki/USRP2GenFAQ)
yes

By Tx do you mean Ethernet->RF aka RF Tx, or RF->Ethernet aka Eth Tx?

RF TX. It’s there as a buffer so you can use timestamped TX packets to
say “send this data at exactly time X”.

Thanks. I’ve updated FAQ:
http://gnuradio.org/redmine/projects/gnuradio/wiki/USRP2GenFAQ#What-is-the-1-Megabyte-SRAM-used-for
Please check if I’m correct.


Regards,
Alexander C…

Hi again,

The Makefiles really were designed to work on a Linux-based (Ubuntu, I
think) install of the Xilinx tools. You are probably going to
have plenty of grief making them work on Windows.

Also, only a tiny fraction of the people on this list have actually
modifed the FPGA code themselves, so you’re unlikely to get a lot
of help doing so here–99.9% of the folks here are using the hardware
“as shipped” with Gnu Radio.

I am aware of that, but I have to try. Can you suggest any better way?

Looks like gmake doesn’t like pathnames with spaces in them. I guess you
can try moving the build directory to one without spaces in it.

Thank you for your reply. I changed the directory and this solved some
of the problems, but not all of them.

Any more suggestions?

Thank you for your help!

Error output:

C:\USRP2_fpga_NEMO\usrp2\top\USRP2>gmake
‘head’ is not recognized as an internal or external command,
operable program or batch file.
gmake: *** No rule to make target
C:/USRP2_fpga_NEMO/usrp2/top/USRP2/C:/USRP2_f pga_NEMO/usrp2/fifo/buffer_int.v', needed byC:/USRP2_fpga_NEMO/usrp2/top/USRP2
/build/u2_rev3.xise’. Stop.

C:\USRP2_fpga_NEMO\usrp2\top\USRP2>

On 19/08/2011 3:05 PM, Nemanja Trecakov wrote:

Hi again,

I am aware of that, but I have to try. Can you suggest any better way?
Get yourself a copy of VirtualBox or VmWare Player for your windows
environment, and do a recent Ubuntu install into it, then
install your Xilinx tools into that. That may be less work than
trying to make the makefiles work under Windows.

My, perhaps some-not-humble, opinion is that Windows should only be used
as a development platform for Windows stuff.
For any other type of serious engineering development, use Linux.
But, I’m a notorious Linux/Unix/BSD curmudgeon who has
been a Unix/Linux/BSD “fanboy” since before many on this list were
even born :slight_smile:

On Fri, 2011-08-19 at 19:40 +0100, Nemanja Trecakov wrote:

Hi list,

I found the way to include the xctlsh in the %PATH%
(How to Set the Path and Environment Variables in Windows).

However, now I have a new problem. Here is the error I get in the cmd.exe when I
try gmake.

Any help is appreciated!

Looks like gmake doesn’t like pathnames with spaces in them. I guess you
can try moving the build directory to one without spaces in it.

–n

On 19/08/2011 3:16 PM, Josh B. wrote:

Im fairly certain all you need is gnumake to be installed and xtclsh
from ISE to be in your %PATH%. I have never tried this, but i would be
happy to help debug it if there is some problem.

-josh

See, Josh is less of an aging curmudgeon than me :slight_smile:

Im fairly certain all you need is gnumake to be installed and xtclsh
from ISE to be in your %PATH%. I have never tried this, but i would be
happy to help debug it if there is some problem.

-josh

Thank you both for your advices.

Josh, in one of the earlier mails you already advised me to install the
gnumake and add xtclsh to my path, so I did this.
I installed gnumake from (complete packages without sources from
Make for Windows ) and added xctlsh to
my path.

However, I was not sure how to “run” gnumake, so I went to command promt
and tried gnumake
(http://old.nabble.com/Split-function-implementation-of-802.11g-OFDM-PHY-and-MAC-on-USRP2-td32253764.html#a32253764).
It looks as it tries to build, but I am in fact not quite sure what I am
doing.

With this procedure I get the errors I wrote in the last mail.

Please reply if I did right or not.

  • Nemanja

Sorry, I tried the command ‘gmake’(not ‘gnumake’) in command promt while
in top\usrp2 folder in order to build the image.
Is this the correct way to run gnumake?

Thanks


On 08/19/2011 12:10 PM, Marcus D. Leech wrote:

On 19/08/2011 3:05 PM, Nemanja Trecakov wrote:

Hi again,

I am aware of that, but I have to try. Can you suggest any better way?
Get yourself a copy of VirtualBox or VmWare Player for your windows
environment, and do a recent Ubuntu install into it, then
install your Xilinx tools into that. That may be less work than
trying to make the makefiles work under Windows.

Im fairly certain all you need is gnumake to be installed and xtclsh
from ISE to be in your %PATH%. I have never tried this, but i would be
happy to help debug it if there is some problem.

-josh

On Fri, 19 Aug 2011 12:16:01 -0700, Josh B. wrote:

Im fairly certain all you need is gnumake to be installed and xtclsh
from ISE to be in your %PATH%. I have never tried this, but i would
be
happy to help debug it if there is some problem.

Evidently one also needs ‘head’ as well:

alexd

On 08/19/2011 12:53 PM, Nemanja Trecakov wrote:

Sorry, I tried the command ‘gmake’(not ‘gnumake’) in command promt while in
top\usrp2 folder in order to build the image.
Is this the correct way to run gnumake?

On linux, i type “make proj” in the top level directory to make the ise
project file. I’m not sure what the binary is called when you install
gnumake. What files were installed on you system? Best guesses: make,
gmake, or gnumake

-josh

Nemanja,

‘make’ is not recognized as an internal or external command,
operable program or batch file.

You must tell your windows where your make/gmake is by setting the
environment variable PATH
to C:\Program Files\GnuWin32\bin (in your case)

Type path /? in cmd.exe for help

Patrik

----- Original Message -----
From: “Nemanja Trecakov” [email protected]
To: [email protected]; [email protected]
Sent: Saturday, August 20, 2011 0:13
Subject: Re: [Discuss-gnuradio] Split-function implementation of 802.11g
OFDM PHY and MAC on USRP2

-josh

  1. When I installed gnumake, I got a binary in C:\Program
    Files\GnuWin32\bin
    called ‘make’. However, when I write ‘make’ in the command promt, I get
    this:

C:\USRP2_fpga_NEMO\usrp2\top\USRP2>make
‘make’ is not recognized as an internal or external command,
operable program or batch file.

  1. I have tried again with ‘gmake’ command to make project, but I get
    the
    same error as before - ‘head’ is not recognized and no rule to make
    target.

C:\USRP2_fpga_NEMO\usrp2\top\USRP2>gmake proj
‘head’ is not recognized as an internal or external command,
operable program or batch file.
gmake: *** No rule to make target
C:/USRP2_fpga_NEMO/usrp2/top/USRP2/C:/USRP2_f pga_NEMO/usrp2/fifo/buffer_int.v', needed by C:/USRP2_fpga_NEMO/usrp2/top/USRP2
/build/u2_rev3.xise’. Stop.

Do you have any suggestions?


Discuss-gnuradio mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio