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

Hi list,

Thank you for your response!

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)

@Patrik & Josh: I added this to my path, and this helped. Now is
‘make/gmake’-command recognizable.

Evidently one also needs ‘head’ as well:

CoreUtils for Windows

alexd

@Alex: I installed CoreUtils from the link (Complete package, except
sources), and it solved the ‘head’-problem.

Looks like a prefix is getting appended to a full/non-relative path. Its
got to be an issue in this line and lines like it in the Makefiles.srcs
files:

FIFO_SRCS = $(abspath $(addprefix $(BASE_DIR)/…/fifo/, \

-josh

@Josh: Yes, this was indeed the problem. I tried to change the line, but
then I got a new error 'missing separator. Stop. which means that there
were some irregular spaces between the commands in the file. After many
rounds with trying to find out what is wrong and reading in the
make-manual (which you get with the installation on C:\Program
Files\GnuWin32\doc\make\3.81\make-3.81\make.pdf), I found out that the
main problem is that you need to divide the lines ONLY WITH ENTER from
the last character in the previous line, not with tabs or spaces. I used
WordPad to edit my Makefiles.srcs, where the break between the lines
looks the same in case of line break with enter or some extra spaces and
enter.

So the line was changed to:

FIFO_SRCS = $(abspath/…/…/fifo/, \

However, what is really interesting is that I didn’t have to change the
all paths in all of the ‘Makefiles.srcs’, only in some, which is quite
illogical.

So this problems are now solved, but I got a new one.

Error output:

C:\USRP2_fpga_NEMO\usrp2\top\USRP2>make
make: *** No rule to make target )', needed by C:/USRP2_fpga_NEMO/usrp2/top/US
RP2/build/u2_rev3.xise’. Stop.

break between the lines looks the same in case of line break with

I made a simple rule to print the sources and they appear to be correct.
I suspect the secondary expansion is messed up, try this diff:

-josh

-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 byC:/USRP2_fpga_NEMO/usrp2/top/USRP2
/build/u2_rev3.xise’. Stop.

Do you have any suggestions?

There is one more thing which I didn’t mention before, which can have
some influence of the build-result:

The Xilinx ISE 12.4 version for Windows which I am using is a copy which
I got from the university’s engineer. However, if I want to use all of
the Xilinx functins, I have to connect to a school server by using VPN
client in order to have the access to a Xilinx license.

I am constantly connected to this server via VPN while I am trying to
build my project, but since I am using the command promt for it, I am
not sure that the Xilinx is “aware” of this.

Could this be the problem/one of them?

Thanks!

-Nemanja

I made a simple rule to print the sources and they appear to be correct.
I suspect the secondary expansion is messed up, try this diff:
diff --git a/fpga/usrp2/top/Makefile.common b/fpga/usrp2/top/Makefile.commonin - Pastebin.com

-josh

You are a real magician :slight_smile:

I followed your advice and deleted one $ sign in the two lines:

-$(ISE_FILE): $$(SOURCES) $$(MAKEFILE_LIST)
+$(ISE_FILE): $(SOURCES) $$(MAKEFILE_LIST)

And this made my project start to RUN! THANK YOU FOR THAT!

Now I have a new error - not so unexpected, is it?

ERROR:TclTasksC:xfile_070: File(s) “./)” cannot be found

The full output is available on: C:\USRP2_fpga_NEMO\usrp2\top\USRP2>makeC:/USRP2_fpga_NEMO/usrp2/top/USRP2/buil - Pastebin.com

Any suggestions?

Thank again for your help!

-Nemanja

ERROR:TclTasksC:xfile_070: File(s) “./)” cannot be found

Undo your previous changes to the makefile.srcs

I changed all the makefile.srcs to the original form, but a new error
occurs:

Error output:

C:\USRP2_fpga_NEMO\usrp2\top\USRP2>make
process_begin:
CreateProcess(C:\DOCUME~1\Nemanja\LOCALS~1\Temp\make4304-1.bat, C
:\DOCUME~1\Nemanja\LOCALS~1\Temp\make4304-1.bat, …) failed.
make (e=87): The parameter is incorrect.
make: *** [C:/USRP2_fpga_NEMO/usrp2/top/USRP2/build/u2_rev3.xise] Error
87

Google told me this means that the object path is too long. However, I
did not found any understandable way to solve it.
Any idea of what to do?

Thank you!

-Nemanja

Hi list,

I am pretty sure I know what is the problem. After reading the
installation manual
(http://www.xilinx.com/cgi-bin/SW_Docs_Redirect/sw_docs_redirect?ver=12.4&locale=en&topic=release+notes),
I found out that I did not appropriately set the environment variables.
It should be done with the command ‘source settings32.(c)sh’ when in
your XILINX installation directory (explained on the page 25 of the
manual).

However, in addition to this, the license has to be set up. Since I have
to point to a license found on a server, this corresponds to the chapter
‘Client Machines Pointing to a Floating License’ in the manual (page
50). However, this is what is written in the manual for setting the
floating licenses in linux:

“Note: For Linux operating systems, licensing environment variables
cannot be set using the Xilinx
License Configuration Manager (XLCM). The environment variable fields
are read only, and they are
grayed out and there are no Set buttons. The environment variable must
be set using the
appropriate shell and commands.”

Can anyone help me with this?

Thank you in advance for your reply!

Nemanja

P.S. As a student, I am not allowed to create a WebCase in order to get
help from a Xilinx engineer, so I do not have whom other to ask.

The current error output:


nemanja@radio-laptop:~/bin/uhd/fpga/usrp2/top/USRP2$ make proj
/home/nemanja/bin/uhd/fpga/usrp2/top/USRP2/build/u2_rev3.xise
xtclsh /home/nemanja/bin/uhd/fpga/usrp2/top/tcl/ise_helper.tcl “”

Creating project:
/home/nemanja/bin/uhd/fpga/usrp2/top/USRP2/build/u2_rev3.xise
ERROR:TclTasksC:project_115: Failed to create the directory
“/home/nemanja/bin/uhd/fpga/usrp2/top/USRP2/build”
while executing
“project new $env(ISE_FILE)”
invoked from within
"if [file isfile $env(ISE_FILE)] {
puts “>>> Opening project: $env(ISE_FILE)”
project open $env(ISE_FILE)
} else {
puts “>>> Creating project: $env…”
(file “/home/nemanja/bin/uhd/fpga/usrp2/top/tcl/ise_helper.tcl” line

make: ***
[/home/nemanja/bin/uhd/fpga/usrp2/top/USRP2/build/u2_rev3.xise] Error 1
nemanja@radio-laptop:~/bin/uhd/fpga/usrp2/top/USRP2$

Hi list,

now I got a Linux copy of Xilinx 12.4 and I tried to build the UHD fpga
image on ubuntu 10.04. with uhd version: UHD_003.001.002-ba0e3c8
I added the .bashrc to include xtclsh like this:

#Include Xilix xtclsh in te path in order to be able to build FPGA
images!
XILINX_ROOT=/opt/Xilinx/12.4/ISE_DS
export PATH=${XILINX_ROOT}/ISE/bin/lin:${PATH}
export PATH=${XILINX_ROOT}/ISE/bin/lin/unwrapped:${PATH}

In addition, I added .bashrc to show towards the license file on our
university server, for which I use VPN to connect with:

#Show the bash where to find the Xilinx license file
[email protected]
export LM_LICENSE_FILE

I checked the variables by using the ‘printenv’ and both of these were
included. However, I get the following error:

nemanja@radio-laptop:~/bin/uhd/fpga/usrp2/top/USRP2$ sudo make proj
/bin/sh: xtclsh: not found
/bin/sh: xtclsh: not found
/home/nemanja/bin/uhd/fpga/usrp2/top/USRP2/build/u2_rev3.xise
xtclsh /home/nemanja/bin/uhd/fpga/usrp2/top/tcl/ise_helper.tcl “”
/bin/sh: xtclsh: not found
make: ***
[/home/nemanja/bin/uhd/fpga/usrp2/top/USRP2/build/u2_rev3.xise] Error
127
nemanja@radio-laptop:~/bin/uhd/fpga/usrp2/top/USRP2$

On 08/30/2011 07:19 PM, Nemanja Trecakov wrote:

Marcus, you were right - I did install the Xilinx ISE being root.
However, when I tried to run the same command being root, the bash did
not find the xtclsh.
The next thing I did is to include the xtclsh into the PATH in
.bashrc, but for root this time, and tried to build it as root. And
… VOILA!

Doing anything other than what is absolutely necessary as root is a
bad idea. Poor form. Entirely-ordinary things like compiling code
should always be done as a regular user. Learn to use and understand
Unix ownership/permissions rules, so you don’t end up in silly
situations like this again.

WHAT CAN BE THE REASONS THAT TWO FPGA IMAGES ARE DIFFERENT IF ONE IS
USING THE SAME MAKEFILE?

Different versions of the toolchain? Also, do the Xilinx tools do any
random stuff–I’m not an expert in FPGA LUT generation, but I understand
that sometimes, when there are two equally-good “choices” to be made
in generating the LUTs, the toolchain simply picks randomly from
among the choices. I have no idea if this is the case here.

This is wandering very far away from the core topic of Gnu Radio,
and into “help with Xilinx Tools”. You may find people on this
list who
can help you, just by pure blind luck, or maybe not.

>

>From the looks of it, and I'm no TCL expert, it looks like it was
unable to create the "build" directory--I'd check the permissions on
the directories

leading up to …top/USRP2/build . Did you perhaps unpack them as
“root”, and now you’re trying to “do stuff” as your ordinary user,
so the

>  directories are owned by root, so they're not writable to you?

Marcus L.

Marcus, you were right - I did install the Xilinx ISE being root.
However, when I tried to run the same command being root, the bash did
not find the xtclsh.
The next thing I did is to include the xtclsh into the PATH in .bashrc,
but for root this time, and tried to build it as root. And … VOILA!

I got built a .xise roject and .bin file.

However, I am not sure if I point properly to the floating license on
the uni’s server, but since it built, I guess it is ok.

HOWEVER, when testing this, by building the same fpga image which is
downloaded to usr/local/share/uhd/images/ by the Marcus’s
build-gnuradio-script,
I FIND THAT THE TWO FPGA IMAGES ARE DIFFERENT.

WHAT CAN BE THE REASONS THAT TWO FPGA IMAGES ARE DIFFERENT IF ONE IS
USING THE SAME MAKEFILE?

Output for md5sum:

root@radio-laptop:/usr/local/share/uhd/images# md5sum usrp2_fpga.bin
4d47274d3255e5bbca6e68e8f0ee7c74 usrp2_fpga.bin

root@radio-laptop:/home/nemanja/bin/uhd/fpga/usrp2/top/USRP2/build#
md5sum u2_rev3.bin
d31cdcc7a1fecb3bc33bc7fbc4db2707 u2_rev3.bin

Doing anything other than what is absolutely necessary as root
is a bad idea. Poor form. Entirely-ordinary things like compiling
code
should always be done as a regular user. Learn to use and
understand Unix ownership/permissions rules, so you don’t end up in
silly
situations like this again.

Ok, thank you for the advise Marcus, but it seemed as the easiest thing
to do at that moment. I think it was faster than changing the permission
for a number of directories, but I may be wrong.

>Different versions of the toolchain?  Also, do the Xilinx tools do
any random stuff--I'm not an expert in FPGA LUT generation, but I
understand

that sometimes, when there are two equally-good “choices” to be
made in generating the LUTs, the toolchain simply picks randomly
from
among the choices. I have no idea if this is the case here.

What do you mean by toolchain? Do you mean different Xilinx_ISE 

version 12.x (I am using 12.4)? I can understand the random choice of
two equally-good.
By the way, the file sizes are the same, 842.3 KB, but when using diff
and mb5sum they show different.

Thanks for help! I really appreciate it!

-Nemanja Trecakov

sudo chown -R your-user-id whatever-your-directory-is

Owner of the directories changed :slight_smile:

>Don't think of the computer/OS as an obstacle that gets in the way
of what you're doing.  Think of it as a long-term partner.

>You should think of a new computer/operating-system as akin to an
exciting new lover.  Learn their secrets, the things they like, and
don't

like. Make them yours. It’ll be beautiful.

I’ll give my best!

Matt/Josh/Nick/Jason can say which version of the tool-chain they
used, but yes, I’m talking about the different versions of ISE.
They’ll produce
slightly different binaries, and also the “Monte Carlo” decision
stuff I talked about can yield a somewhat different build. Keep in
mind that
a program like ‘md5sum’ will produce a completely different hash
output even for a single changed bit!

By the way, I tried to “flash” the built UHD fpga image onto the SD
card, and the USRP2 is booting properly :slight_smile:

Thanks again!

--

Marcus L.
Principal Investigator
Shirleys Bay Radio Astronomy Consortium

Hi Folks,

I find this discussion interesting and would like to ask a few
questions.

I FIND THAT THE TWO FPGA IMAGES ARE DIFFERENT.
What do you mean by different? Do they behave different? Or you used a
program to compare the binary data comparison between the 2 and this is
what you are saying here?

Xilinx P&R tool as well as it’s resource optimizer and mapper use
special algorithm that creates a random path of data for each run,
unless you hard code your blocks and force the MAP and P&R not to touch
the blocks, the result of the 2 identical compilation will be different.

If there are any clocks in the whole design that is not included in the
UCF file, then the MAP will try to find the best placement for it which
in almost 99% of the cases when you start a new compile, is different
than the one created earlier.

Xilinx supports partial re-configuration on some it’s devices as it is
described here: Partial Reconfiguration in the ISE Design Suite
and that can help those who want to make sure that the differences
between different version of the code/compiles are minimum, but this is
not supported only by the Virtex family of devices and not the Spartan
series.

Just my 2c!

BR,
Farhad

On 08/30/2011 07:45 PM, Nemanja Trecakov wrote:

permission for a number of directories, but I may be wrong.
sudo chown -R your-user-id whatever-your-directory-is

Don’t think of the computer/OS as an obstacle that gets in the way of
what you’re doing. Think of it as a long-term partner.
You should think of a new computer/operating-system as akin to an
exciting new lover. Learn their secrets, the things they like, and
don’t
like. Make them yours. It’ll be beautiful.

What do you mean by toolchain? Do you mean different Xilinx_ISE
version 12.x (I am using 12.4)? I can understand the random choice of
two equally-good.
By the way, the file sizes are the same, 842.3 KB, but when using diff
and mb5sum they show different.

Thanks for help! I really appreciate it!

-Nemanja Trecakov
Matt/Josh/Nick/Jason can say which version of the tool-chain they used,
but yes, I’m talking about the different versions of ISE. They’ll
produce
slightly different binaries, and also the “Monte Carlo” decision
stuff I talked about can yield a somewhat different build. Keep in mind
that
a program like ‘md5sum’ will produce a completely different hash
output even for a single changed bit!

Nemanja Trecakov wrote in post #1016463:

  1. 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”)

Hi Nemanja,

Did you reach any answer, regarding your RSSI issue? I am wondering the
same thing.

Many thanks,

Filipe Ramos