WARP Project Forums - Wireless Open-Access Research Platform

You are not logged in.

#1 2014-Jul-22 13:38:17

juvebogdan
Member
Registered: 2013-Sep-17
Posts: 76

Problem with CSMA

Hello,


I wanted to try CSMA MAC but i couldn't program the FPGA. I followed instructions from http://warpproject.org/trac/wiki/OFDMRe … esign/SDK, got to elfcheck passed and then when i tried to program the FPGA i got Program FPGA failed, Reason:FPGA configuration encountered errors. This is the log:


elfcheck -hw \
C:/Users/user/Desktop/warp/SDK_Workspace/w3_OFDM_ReferenceDesign_v18p1_hw_platform/system.xml \
-mode bootload -mem BRAM -pe microblaze_0 \
C:/Users/user/Desktop/warp/SDK_Workspace/CSMAMAC/Debug/CSMAMAC.elf
elfcheck
Xilinx EDK 14.1 Build EDK_P.15xf
Copyright (c) 1995-2012 Xilinx, Inc.  All rights reserved.

Command Line: elfcheck -hw
C:/Users/user/Desktop/warp/SDK_Workspace/w3_OFDM_ReferenceDesign_v18p1_hw_platfo
rm/system.xml -mode bootload -mem BRAM -pe microblaze_0
C:/Users/user/Desktop/warp/SDK_Workspace/CSMAMAC/Debug/CSMAMAC.elf

ELF file    : C:/Users/user/Desktop/warp/SDK_Workspace/CSMAMAC/Debug/CSMAMAC.elf
elfcheck passed.

data2mem -bm \
C:/Users/user/Desktop/warp/SDK_Workspace/w3_OFDM_ReferenceDesign_v18p1_hw_platform/system_bd.bmm \
-bt \
C:/Users/user/Desktop/warp/SDK_Workspace/w3_OFDM_ReferenceDesign_v18p1_hw_platform/system.bit \
-bd C:/Users/user/Desktop/warp/SDK_Workspace/CSMAMAC/Debug/CSMAMAC.elf tag microblaze_0 -o \
b \
C:/Users/user/Desktop/warp/SDK_Workspace/w3_OFDM_ReferenceDesign_v18p1_hw_platform/download.bit


Also i wasn't sure what to set in place code sections,place data sections and place heap sections because on different parts of your guide the different options are listed so i chose: xps_bram_if_cntlr_0, xps_bram_if_cntlr_1 and xps_bram_if_cntlr_1 respectively.

Can you help me?

Thank you

Offline

 

#2 2014-Jul-22 16:33:18

chunter
Administrator
From: Mango Communications
Registered: 2006-Aug-24
Posts: 1212

Re: Problem with CSMA

What JTAG programming cable are you using to connect to the board? Are you able to scan and identify the board in iMPACT?

Offline

 

#3 2014-Jul-23 13:06:08

juvebogdan
Member
Registered: 2013-Sep-17
Posts: 76

Re: Problem with CSMA

I'm using Digilent USB-JTAG Programming cable, and yes i am able to identify the board with iMPACT. Here what i get in iMPACT console:
Welcome to iMPACT
iMPACT Version: 14.1
// *** BATCH CMD : setMode -bs
// *** BATCH CMD : setMode -bs
// *** BATCH CMD : setMode -bs
// *** BATCH CMD : setMode -bs
GUI --- Auto connect to cable...
// *** BATCH CMD : setCable -port auto
INFO:iMPACT - Digilent Plugin: Plugin Version: 2.2.10
INFO:iMPACT - Digilent Plugin: no JTAG device was found.
AutoDetecting cable. Please wait.
PROGRESS_START - Starting Operation.
Connecting to cable (Usb Port - USB21).
Checking cable driver.
Driver file xusb_emb.sys found.
Driver version: src=1029, dest=1029.
Driver windrvr6.sys version = 10.2.1.0. WinDriver v10.21 Jungo (c) 1997 - 2010 Build Date: Aug 31 2010 x86_64 64bit SYS 14:14:44, version = 1021.
Cable PID = 0008.
Max current requested during enumeration is 74 mA.
Type = 0x0004.
Cable Type = 3, Revision = 0.
Setting cable speed to 6 MHz.
Cable connection established.
Firmware version = 1303.
File version of C:/Xilinx/14.1/LabTools/LabTools/data/xusb_xlp.hex = 1303.
Firmware hex file version = 1303.
PLD file version = 0012h.
PLD version = 0012h.
PROGRESS_END - End Operation.
Elapsed time =      1 sec.
Type = 0x0004.
ESN device is not available for this cable.
Attempting to identify devices in the boundary-scan chain configuration...
INFO:iMPACT - Current time: 23.7.2014 19:38:03
// *** BATCH CMD : Identify -inferir
PROGRESS_START - Starting Operation.
Identifying chain contents...'0': : Manufacturer's ID = Xilinx xc6vlx240t, Version : 8
INFO:iMPACT:1777 -
Reading C:/Xilinx/14.1/LabTools/LabTools/virtex6/data/xc6vlx240t.bsd...
INFO:iMPACT:501 - '1': Added Device xc6vlx240t successfully.
----------------------------------------------------------------------
----------------------------------------------------------------------
done.
PROGRESS_END - End Operation.
Elapsed time =      0 sec.
// *** BATCH CMD : identifyMPM


The error in SDK is Program FPGA failed. In details also Program FPGA failed. Also i tried to use SD card but when i run promgen -u 0 download.bit -p bin -spi -w it says that promgen is not recognnized as an internal or external command.

Last edited by juvebogdan (2014-Jul-23 13:49:37)

Offline

 

#4 2014-Jul-23 23:54:07

welsh
Administrator
From: Mango Communications
Registered: 2013-May-15
Posts: 612

Re: Problem with CSMA

1) There is a linker script provided in the 'w3_OFDM_ReferenceDesign_v18p1\SDK_Workspace\CSMAMAC\src' directory.  You should use those defaults.  Older versions of the the Xilinx tools used to be more sensitive to linker scripts and it was best to regenerate them.  You can still do that but take a look at where everything should go from the provided default.

2) Have you restarted the SDK and tried to program again.  We have occasionally seen that the SDK will get stuck and not be able to find the programming cable.  Usually, I try:  1) unplug the USB programmer from both the computer and WARP board;  if that doesn't work 2) Restart the SDK; if that doesn't work 3) restart the computer.

3) When you ran promgen, where did you run it from?  To run promgen, you need to select:  "Xilinx Tools" --> "Launch Shell".  Then you cd to your *_hw_platform directory and you should be able to run the promgen command.

Offline

 

#5 2014-Jul-24 00:25:20

juvebogdan
Member
Registered: 2013-Sep-17
Posts: 76

Re: Problem with CSMA

I regenerated linker script for CSMA and couldn't program FPGA. Also i tried NOMAC without generating linker script (just used the elf file provided) and it still couldn't program. I found on this forum post with the same problem as mine i tried everything listed there (plugging,unplugging,restarting PC etc.),still no progress. Should i just try different version of Xilinx.

Offline

 

#6 2014-Jul-24 09:29:04

welsh
Administrator
From: Mango Communications
Registered: 2013-May-15
Posts: 612

Re: Problem with CSMA

A couple of things you can try before upgrading the Xilinx tools: 

1) Are you able to program any other reference designs (ie WARPLab or the 802.11 reference design)?  First check that you can program the reference bitstreams using iMPact.   Then try with the SDK. 
2) Check the "Xilinx Tools" --> "Configure JTAG Settings".  I have them set to Type: "Auto Detect" and "Automatically Discover Devices on JTAG Chain".

If you still can't get it to work.  I would go ahead and upgrade to either 14.4 or 14.7.  At least then you will have a clean install.

Offline

 

#7 2014-Jul-24 15:49:37

juvebogdan
Member
Registered: 2013-Sep-17
Posts: 76

Re: Problem with CSMA

I managed to program the boards with SD cards. Now i have this strange problem with ping. I set first PC IP 10.0.0.1 (255.255.255.0),second PC 10.0.0.2 (255.255.255.0). After pinging i got sometimes request timeot, sometimes host unreachable and sometimes host unreachable from 89.188.32.106. When i disabled my wireless adapter this third message was gone but i don't know why it came up. And then after countless times of typing ping it passed (2 out of 4 packets). After that one time it returned to request timeout and host unreachable.

I tried pinging PCs without boards and that went well. Also hex displays are showing different numbers (01 and 11)

Why is this happening?

Offline

 

#8 2014-Jul-24 16:46:27

chunter
Administrator
From: Mango Communications
Registered: 2006-Aug-24
Posts: 1212

Re: Problem with CSMA

The OFDM Reference Design uses the DIP switches on the boards to effectively set wireless MAC address. Furthermore, it is hardcoded so that "node 0" sends to "node 1" and vice versa. If your hex displays are showing "01" and "11", then the boards will not talk to one another. They need to show "00" and "01" as described here. You can make these changes by making sure all the DIP switches in the User I/O (left side of WARP v3) are down on one board and the rightmost bit is up on the other.

If you are just getting started and have WARP v3, I suggest moving over to the Mango 802.11 Reference Design. This design is much better than the OFDM Reference Design, and does away with things like the above DIP switch / MAC address stuff.

Offline

 

#9 2014-Sep-17 01:04:11

juvebogdan
Member
Registered: 2013-Sep-17
Posts: 76

Re: Problem with CSMA

If i want to make an experiment and test goodput using my MAC, how can i store data needed for plotting? Can you give me some advice on how to conduct these types of experiments where i need to follow the behavior of some parameter over time and similar stuff?

Offline

 

#10 2014-Sep-17 09:30:24

chunter
Administrator
From: Mango Communications
Registered: 2006-Aug-24
Posts: 1212

Re: Problem with CSMA

If you are using the older OFDM Reference Design, then really your only option is to use something like iperf on both of your PCs to measure throughput. That's only going to give you a very coarse measurement of throughput.

If you are using the new 802.11 Reference Design, you can also use iperf, but even better is to use the WLAN Experiments python framework. The design logs all transmissions and receptions into DRAM to allow very fine-grained processing. Using it, it's pretty easy to throughput at any time scale. Check out the Tx/Rx Log Capture and Tx/Rx Log Analysis examples.

Offline

 

#11 2014-Sep-23 00:33:25

juvebogdan
Member
Registered: 2013-Sep-17
Posts: 76

Re: Problem with CSMA

How hard is to switch to 802.11 design. I already wrote some code for cognitive MAC for OFDM design and it was relatively easy. I have warpphy,warpmac and i write top level C code. It seems that 802.11 is much more complicated

Offline

 

#12 2014-Sep-23 10:09:48

chunter
Administrator
From: Mango Communications
Registered: 2006-Aug-24
Posts: 1212

Re: Problem with CSMA

The code base for 802.11 is certainly much larger and more sophisticated than the OFDM Reference Design. That said, if you want to do non-standards-compliant MAC behaviors, it would be pretty straightforward. Like the OFDM Reference Design, these would be pure C-only changes.

With knowledge of the OFDM Reference Design, you are well equipped to take on the 802.11 Reference Design. There are a lot of structural similarities. WARPMAC in the OFDM Reference Design is similar to the MAC High Framework in the 802.11 Reference Design. WARPPHY in the OFDM Reference Design is similar to the MAC Low Framework in the 802.11 Reference Design. The most fundamental difference between the two designs is the dual-processor architecture. In the OFDM Reference Design, your top-level code was responsible for everything. In the 802.11 Reference Design, we've drawn a line between time-critical intra-packet behaviors like retransmissions and ACK transmissions and higher inter-packet behaviors like transmission queues, packet encapsulation, and traffic generation. With this architecture, high-level behaviors like association handshakes cannot adversely impact the node's ability to meet the strict timing requirements specified in the DCF of the 802.11 standard. Some more details about this split is here.

The top-level C code you were writing in the OFDM Reference Design is probably most similar to the top-level Access Point and Station projects. In these projects, you could define new non-standards-compliant packet types for your cognitive MAC and define the behaviors that occur when those packets are received or sent.

If you don't want to be modifying two files (AP + STA), another option is ad hoc (also known as IBSS). IBSS is most similar to the OFDM Reference Design -- every node on the network runs the same bitstream. The IBSS code is already in the public SVN, but we haven't zipped up an official release with it yet. We hope to have the v0.96 release with IBSS posted this week.

Offline

 

Board footer