February, 1996
In order to provide a more integrated filing system for the software and files used with the various Unix based products the following restructure of the CAC software directories will be used for future releases. The purpose of this document is desribe the new hierarchy and provide information about migrating from the old hierachy.
The new hierarchy uses separate directories for the source files, device drivers, diagnostics and demos for each product line while integrating certain common directories.
The basic directory hierarchy is shown below. This does not show a complete list of all the subdirectories but illustrations the major branches.
$CAC - top level directory for all Unix based | products. The environment variable, CAC, | specifies the name of the top level. | For example, /usr/cac. | |- /bin - support programs used by all products such | as dspinit, pciinit, sbdspinit, tdmc, etc. | and the host servers and ushell for the | MIPS kernel. | |- /include - header files for host application programs | | written for all products (dsputil.h, | | sbdsputil.h, pciutil.h, etc.) | | | |-- /sys - symbolic link to the include directory. | |- /lib - library files for all products. These | include the host application libraries | such as libdsp.a and libpci.a as well as | DSP32C startup and map files, special MIPS | code, run time initialization files such | as SB32C2 mezzanine FPGA config files, VME | memory map for V6M6 MIPS Kernel, etc. | | |- /dsp - source files, diags and demos for the | | VME6U6 and VME9U12 products. | | | |-- /src - Source for host library, DSP32C startup | | and memory maps, host support programs. | | | |-- /dsp*dev - Various directories for host-dependent | | device driver source and other files. | | | |-- /diag - VME6U6/VME9U12 diagnostic programs | | | |-- /demos - VME6U6/VME9U12 demonstration programs | | |- /sbdsp - source files, diags and demos for the | | SB32C2 products. | | | |-- /src - Source for host library, DSP32C startup | | and memory maps, host support programs. | | | |-- /sbdsp*dev - Various directories for host-dependent | | device driver source and other files. | | | |-- /diag - SB32C2 diagnostic programs | | | |-- /demos - SB32C2 demonstration programs | | |- /pci - source files and diags for the V6M6 and V9M12 | | products excluding the MIPS Kernel, libraries | | and server. | | | |-- /libsrc - Source for host library. | | | |-- /binsrc - Source for host support programs. | | | |-- /pci*dev - Various directories for host-dependent | | device driver source and other files. | | | |-- /diag - V6M6/V9M12 diagnostic programs | | | |-- /flash - FPGA configuration and microcontroller | | code files that are loaded into flash. | | | |-- /mipsgcc - Gnu libraries and header files and source | for R3081 and R4600 programs. | | |- /mips - the MIPS kernel and server source for | | the VME6U6/R3081 mezzanine combination | | and the V6M6 MIPs processor modules. | | The directory also contains the MIPS | | application libraries. | | | |-- /server - Source for host servers. | | | |-- /bin - MIPS binaries (Kernels, examples, etc.) | | | |-- /lib - MIPS libraries for applications to be | | run with the Kernel | | | |-- /include - Header files for MIPS libraries. | | |- /man - on-line manual pages | |- /misc - a place for user created files such as macros | for the dsptest and pmtest diagnostics, or | special special test programs.
setenv CAC /usr/cac
This variable names the top level directory for all of the CAC software for Unix-based products. The example, above, uses the directory /usr/cac, for the top level. This is only an example. Users of Solris 2.x may opt for naming it /opt/cac but, really, any place you want to have it is alright. Note that the CACDSP, CACPCI and CACMIPS variables are no longer used.
$CAC/bin $CAC/dsp/diag $CAC/sbdsp/diag $CAC/pci/diag
Most customers will just use $CAC/bin but if you run diagnostics often you should include the appropriate diag directories so the programs may be run without having to cd to the directory.
setenv MANPATH /usr/man:/usr/local/man:$CAC/man
gcc -I$CAC/include -L$CAC/lib prog.c -o prog -ldsp
Note that the ioctl header files (dspioctl.h, sbdspioctl.h, etc.) are kept in the $CAC)/include directory. The symbolic link, $CAC/include/sys, is provided so that your source files and Makefiles that reference those headers as being in the sys subdiectory will still find them.
You still need to include the -D
You should modify any macros in your Makefiles that used the
old CACDSP or CACPCI environment variables. For example:
Note that for programs using both the pci and dsp libraries you
need only include one library and one include search path. But
you need to link with both libraries. For example:
For programs using only the V6M6 board with TDM functions the
pci TDM library needs to be linked. For example:
Many customers may only be using the old $(CACDSP)/{bin,lib,include}
directories. In this case, simply resetting the
CACDSP environment variable to the new top level directory might
be all that is necessary to use existing Makefiles and scripts
with the new directory hierarchy.
old macro new macro
LIBPATH = $(CACDSP)/lib LIBPATH = $(CAC)/lib
INCPATH = $(CACDSP)/include INCPATH = $(CAC)/include
INCPATH = $(CACPCI)/include INCPATH = $(CAC)/include
DSPDIAG = $(CACDSP)/diag DSPDIAG = $(CAC)/dsp/diag
gcc -I$CAC/lib -L$CAC/lib prog.c -o prog -ldsp -lpci
gcc -I$CAC/lib -L$CAC/lib prog.c -o prog -lpcitdm -lpci