Download Server/Loader User Manual
Transcript
serverloader function if used without the server option (“-s”). This may be useful if
you need to do some programming in between the loader and server stage, for example, set
up threads that are going to communicate with DSP or FPGA nodes.
The server part of the Server/Loader will examine all HEART statements and see which
C6x nodes are connected to a host, including those that are connected to a host via InterBoard Connectors. Use the optional NOSERVE keyword at the end of HEART statements
to tell the Server/Loader you that don’t want such connections to be used by the Server.
Per C6x node that is connected to a host, the Server/Loader will select 1 connection to be
used for serving that node. This is a random choice. For each node that is to be served, the
Server/Loader creates a separate thread.
Example: int main(int argc, char *argv)
{
hesl sl; int r;
r = sl.loader(argc, argv);
if (r) { printf(“error %d.\n”, r); return 0; }
…
r = sl.server()
…
}
FlagMeServerUp
There are cases, where you may want to use both the Server and your own API program,
each accessing a node via a different connection. Your API program may need to know
when it’s safe to access the node (because the HEART connections may not have been
made, or the server cannot handle serve requests yet as it’s still busy setting up threads). For
such situations, the ‘FlagMeServerUp’ function can be asked to flag a semaphore. The
semaphore gets flagged when the Server/Loader has completed all the work and is now
ready to accept server (stdio) requests from all nodes it serves.
It can be used in conjunction with the server function, or with the serverloader
function used with the server option (“-s”). If the server isn’t used, nothing breaks, but the
semaphore will never get flagged.
HeartConf functions
HeartConf is a program using the same sources/library as the Server/Loader. HeartConf
also has its own library functions. As with serverloader and loader, there are 4
shapes: int
int
int
int
heartconf(int argc , char
heartconf(char *options, char
heartconf(HE_HANDLE *uDevice,
heartconf(HE_HANDLE *uDevice,
*argv[]);
*network);
int n, int argc, char *argv[]);
int n, char *options, char *netwrk);
The top heartconf entry has two parameters: an argc parameter that is the number of
argv arguments, and the argv parameter itself, which is an array of character string
pointers. This is identical to the arguments used by main() in a console program.
However, HeartConf accepts fewer arguments than the Server/Loader: only “-r” (reset), “38
HUNT ENGINEERING Server/Loader USER MANUAL