GLAST/LAT > DAQ and FSW > FSW > Doxygen Index > PBC / V4-12-1
Constituent: pbc_build_ser_num     Tag: linux-gcc
#include <fcntl.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
Include dependency graph for build_ser_num.c:
Data Structures | |
struct | _Fill_Map |
Map of locations to fill with the CPU serial number value. More... | |
Defines | |
#define | PROG_NAME "pbc_build_ser_num" |
Functions | |
int | show_usage (void) |
Display a usage message for the program. | |
int | show_too_large (char *desc, unsigned int act_value, unsigned int max_value) |
Display a message that a parameter is too large. | |
int | show_missing (char *desc) |
Display a message that a parameter is missing. | |
int | write_word (FILE *file, unsigned int value) |
Write a 32-bit value to a file. | |
int | write_region (FILE *file, unsigned int value, unsigned int first, unsigned int last) |
Write to an emcLd input file to fill a region of memory. | |
int | main (int argc, char **argv) |
Entry point for the program. | |
Variables | |
_Fill_Map | Fill_Map |
Instance of the _Fill_Map structure. |
** CVS $Id: build_ser_num.c,v 1.2 2005/10/17 15:56:44 dmay Exp $ **
This utility builds a sparse RAD750 SUROM image that contains multiple copies of a CPU serial number. The serial number is a 32-bit value that contains the following information:
byte 0 (MSB) - serial ID value that is unique for each CPU board. byte 1 - physical (hardware) address of the CPU on the EBM. byte 2 - logical (ITC) address of the CPU. byte 3 (LSB) - location of the CPU (LAT, test-bed, NRL, etc.).
A copy of the CPU serial number value is stored between each of the four PBC images within the SUROM. Furthermore, the last 3K bytes of SUROM are filled with the CPU serial number value. The locations at which the copies are stored are hard-coded by this utility, i.e. there are no options to specify where to store them.
See the show_usage() function for a description of the options for this program.
|
Entry point for the program.
|
|
Display a message that a parameter is missing.
|
|
Display a message that a parameter is too large.
|
|
Display a usage message for the program.
|
|
Write to an emcLd input file to fill a region of memory.
|
|
Write a 32-bit value to a file.
|