This document describes some of the SAM device modules that are available under the SAM source workspace and are included in official SAM package releases.
Common code is placed in modules/common. This code is compiled into each module separately. This allows for preprocessor macros to be expanded uniquely in each module.
Create a new module by copying 'sample' (for PCI devices) or 'example' (for any other type) to a new subdirectory.
Do not copy the SCCS subdirectory.
Edit the Makefile to change the module name and list of files.
Make sure the SCCS Id keywords are correct. For example, replace the comment
lines as shown below:
@(#)sample_mod.cc 1.4 04/08/05
with
@(#)SAM-modules.html 1.1 05/07/26
The modules/Makefile will compile any subdirectory with a Makefile in it.
arg.cc | utilities for parsing the sysconf command line arguments | |
module.cc | the base class for all modules | |
pci_dev.cc | the base class for all PCI devices | |
include/*.h | header files for common code |
sysconf -p $HOME/blaze/blaze-conf/modules/64opt sysconf sgc sgc0 # sysconf schizo schizo24 # sysconf pci_bus schizo24A bridge=schizo24 # sysconf pci_bus schizo24B bridge=schizo24 sysconf sample sample24B1 bus=schizo24B dev=1 fun=0 mem32_base=0x08000000 mem32_size=0x2000 -d1 sysconf sbbc sbbc24B bus=schizo24B dev=4 fun=0 # sysconf schizo schizo25 # sysconf pci_bus schizo25A bridge=schizo25 sysconf sample sample25A bus=schizo25A dev=1 mem32_base=0x00100000 mem32_size=0x2000 cycle=50000000 -d2 # sysconf pci_bus schizo25B bridge=schizo25 sysconf sample sample25B2 bus=schizo25B dev=2 fun=0 mem32_base=0x08000000 mem32_size=0x2000 -d1 # sysconf schizo schizo30 # sysconf pci_bus schizo30A bridge=schizo30 # sysconf pci_bus schizo30B bridge=schizo30 sysconf sample sample30B1 bus=schizo30B dev=1 fun=0 mem32_base=0x08000000 mem32_size=0x2000 sysconf sbbc sbbc30B bus=schizo30B dev=4 fun=0 # ##sysconf schizo schizo31 ### ##sysconf pci_bus schizo31A bridge=schizo31 ### ##sysconf pci_bus schizo31B bridge=schizo31 ##sysconf sample sample31B2 bus=schizo31B dev=2 fun=0 mem32_base=0x08000000 mem32_size=0x2000