****** Added by Kristi Luchini at SLAC *************************************** The base address for VSAM card(s) is set by calling the function VSAM_init() from your startup script. This function is to be called after vsamLib has been loaded but prior to executing iocInit(). The VSAM driver require that all VSAM modules in the crate be setup in a consecutive block of A24 address space. Since a VSAM module use 0x100 (hex) bytes of A24 address space you should set the switch settings on each module accordingly. The arguments to VSAM_init() are: (1) the local VME base address of the first VSAM, (2) the number of modules, (3) the card number you want to refer to your first VSAM as, within your EPICS database, For example, in the script cmd/VSAMInit.cmd only this VME crate has one VSAM module, referred to as card 0, and it can be found at the local VME address 0x400000 in A24 space. This module also has a revision number of 1. If you had five VSAMs, then you would change argument 3 to 5, and the VSAM driver would expect the base address of each card to be at the following locations: card # Local VME Address ------- ------------------ 0 0x400000 1 0x400100 2 0x400200 3 0x400300 4 0x400400 If a card in this block of address is not present it will be marked as such in the driver, and the EPICS database pv's refering to this card will not be initialized. It should be noted that the db files in this distribution assume that the VSAM card's base address is card 0. However, card 0 may start at any A24 address of your choosing by simply changing argument 1 of VSAM_init() to the desired address. Note: Without EPICS, you can check that the VSAM module is accessible using vxMemProbe. At the vxWorks prompt, for card 0: x=0 (to create a variable) vxMemProbe(0xf0400000,0,4,&x) NOTE: the VSAM data must be accessed as A24/D32. If you attempt to access the VSAM data from the vxWOrks shell, using the "d" command, you will get an access violation. This is because "d" accesses the data 1-byte at a time. ******************************************************************************* ADDRESS SWITCHES ---------------- The high 16 bits (4 hex digits) A23-A8 are set by the two DIP switch packs on the VSAM. The upper set of switches is A23-A16, and the lower is A15-A8. For each switch, "0" is up and "1" is down. (The lower two implied digits, A7-A0, are zero.) You can have up to 16 cards and assuming they begin at A24 address 0x400000: card "D" switches -------- -------- 0 4000 1 4001 2 4002 3 4003 4 4004 5 4005 6 4006 7 4007 8 4008 9 4009 10 400a 11 400b 12 400c 13 400d 14 400e 15 400f Any card may be in any VME slot; nor is it necessary to have contiguous values. VERIFICATION ------------ After the IOC is initialized, dbior "drvVSAM" should produce a report: Driver: drvVSAM VSAM: card 0, addr=0xf0400000 VSAM: card 1, addr=0xf0400100 ---------------------------------------------------------------------- Susanna Jacobson Steve Lewis Lawrence Berkeley National Laboratory Mar 12, 1998