WARP Project Forums - Wireless Open-Access Research Platform

You are not logged in.

#1 2007-Feb-27 18:54:16

jlliu
Member
Registered: 2007-Jan-25
Posts: 31

Question About xilkernel_main()

Hi,

When I read the project of OFDM_ReferenceDesign_v00, the main funtion in ackmac.c only has one line(xilkernel_main()) in it. After reading the content of xilkernel_main(), I can not figure out the interaction between the different functions in the project, such as when the powerpc will receive a packet from the desktop, when the powerpc will start to send a packet to the RF board, when the  powerpc will receive a packet from the the RF board and when the powerpc will send the received packet to the desktop. Can you give me some instructions of it?

Offline

 

#2 2007-Feb-27 19:25:58

zrcao
Member
From: Vienna, VA
Registered: 2007-Jan-24
Posts: 121

Re: Question About xilkernel_main()

In short, how does xilkernel_main(), which is written by Xilinx, knows  and calls various functions written by Rice.

Offline

 

#3 2007-Feb-27 22:50:53

murphpo
Administrator
From: Mango Communications
Registered: 2006-Jul-03
Posts: 5159

Re: Question About xilkernel_main()

Our xilkernel expert will chime in with more detail, but in the meantime check out the xilkernel documentation. It's installed with the EDK in C:\EDK\sw\lib\bsp\xilkernel_v3_00_a\doc\xilkernel_v3_00_a.pdf.

Offline

 

#4 2007-Mar-13 15:07:02

Scott
Member
From: Houston, Texas
Registered: 2006-Oct-01
Posts: 19

Re: Question About xilkernel_main()

Heyhey,

xilkernel_main() "starts" the OS running, with the parameters you have specified in Software Platform Settings for the OS. Read up in the following article about how threading works -- that should make Chris's ackmac.c code easier to understand.

Check this out: http://warp.rice.edu/trac/wiki/ppc_prog … rogramming

The kernel starts by calling the xilkernel_main( ) function. It is typically placed in the “main ( )” function, and all code after the xilkernel_main( ) call will be ignored/never reached. When running the kernel, it’s also important to include the library “xmk.h” as the first one listed at the top of all C-files running on the system.

If you still have a hard time understanding the ackmac code, one of us can look at it again in a bit more detail.

Last edited by Scott (2007-Mar-13 15:07:39)

Offline

 

#5 2007-Mar-13 21:45:03

zrcao
Member
From: Vienna, VA
Registered: 2007-Jan-24
Posts: 121

Re: Question About xilkernel_main()

Got it! Thanks.

Threading is a required component of Xilkernel – at least one thread is required to spawn from the system at kernel start. The main threads are simply functions of type void* and do not take any inputs. The launch threads are defined in SPS under the “OS and Libraries Tab,” under the “config_pthread_support” header, and finally in the “static_pthread_table.” A priority level may be given to the thread if priority-scheduling is used in the system – otherwise it will be ignored.

Offline

 

#6 2007-Mar-13 23:42:08

Scott
Member
From: Houston, Texas
Registered: 2006-Oct-01
Posts: 19

Re: Question About xilkernel_main()

No problem! By the way, I finally got the links to the reference designs up and running, so they can now be downloaded! :)

http://warp.rice.edu/trac/wiki/xilkernel_ref

Last edited by Scott (2007-Mar-13 23:42:21)

Offline

 

Board footer