Struck 1100/3100 Interface

 
In July 2004, the Parallel Port/VME interface being used for DAQ was replaced with the PCI/VME interface from Struck Innovative Systems called the SIS1100/3100. This interface, using an optical Gbit connection, provides a low latency, high speed link between the MIDAS DAQ system and the FlashADCs via the PCI and VME buses. The interface consists of three parts:

1. The SIS3100 - A full-size, 6U, single slot, VME master controller.
2. Small form factor Gigabit Link - Interconnecting full-duplex fibre link with both up and down link channels.
3. The SIS1100 - A Standard PCI 2.1/2.2 compliant PCI card.

Installing the SIS1100/3100 Interface
Detailed hardware installation instructions can be found at the Struck website (http://www.struck.de/sis3100windriver110.pdf), but the procedure is rather straigh forward:

1. Extract sis11003100win.zip to a folder called sis1100 on the root.
2. From the installed folder, execute \win\setup_winxp\setup.bat
3. Install the SIS1100 PCI card, the SIS3100 VME board, and attach the interface cable.
4. Power on the VME crate, and the PC.
5. Allow WinXP to install the device, and if it asks for a file (Pci9054.sys), direct it to     C:\WINDOWS\system32\drivers
6. Confirm installation by running \win\setup_winxp\Findbridge.exe from the installed folder. It should report finding one PLX9054 based PCI card device.

After successfully installing the hardware, you will need to properly configure the DAQ software to interface with the Struck system. Struck provides a significant number of example programs written in C that demonstrate how to program for the interface. Examples can be found in the \win folder, as well as in the \linux folder. Linux examples will not work exactly as shown, but function solely as guides.

Before continuing, it should be verified that the Struck interface is fully functioning and that VME read/write operations can be performed.

Testing the interface with SIS3100Base

As well as providing a DLL and high level language example source code with projects for Microsoft Visual C++, Struck provides a ready to run executable called SIS3100Base that allows you to execute VME and SIS1100/3100 control cycles without writing a single line of code. It features a full GUI interface with the ability to perform read or write operations in any of the supported address/data modes.

The program can be found on bragi at:

C:\sis1100\Win\sis1100_3100_win2k\cvi_applications\Sis3100_base\sis3100_base.exe

After executing, the program should indicate a successful loading by displaying the message "open and init SIS1100 OK". At this point, several different things can be tested. A Global Read in SIS1100_CTRL_REG access mode with a 0 offset, should return the Identification register of the SIS1100 card, indicating a proper connection to the SIS1100 card. A value of 5010101 is expected. Similarly, a Global Read performed in SIS3100_CTRL_REG access mode with a 0 offset should indicate whether the connection to the VME crate is functioning properly by returning the Identification register of the SIS3100 board. A value of 2010102 is expected.

Finally, the invidual FlashADC boards can be probed with SIS3100Base by performaing a Global Read in A24/D16 mode at the address offset of any of the cards. Currently, the VME addresses of the FlashADCs start at 0x800000, for card 1, with card 2 being found at 0x800100. This continues up to 0x800F00 for card 16. Under normal operating conditions, the FlashADCs should respond to a read at these addresses with a 0, 1, or some other number, such as 301. A value of FFFF, or the display of "prot_error = 211" would indicate a problem.

Programming for the SIS1100/3100 Interface
The SIS1100/3100 provides read and write functions for all supported data and address modes. The ones important to the use of the FlashADCS all take the form:

or

To access the FlashADCs, 24bit addressing is used, so *ADDRESSMODE* becomes A24. Similarly, 16bit data words are used, so *DATAMODE* becomes D16. The SIS1100_Device_Struct requires a reference to the particular Struck controller being used. The device driver can handle multiple controllers in one system, so a reference must exist to each one. On bragi, only one controller is used, but the reference must still be used. Initializing this reference can be accomplished using code that is provided by Struck and is included later. The vmeAddress is the VME bus address (offset) that is too be accessed. It uses and unsigned long which is a 32 bit integer. The FlashADCs use addresses from 0x800000 to 0x800F00. The VMEMM/VC32 modules are addressed at 0x802000, with the FlashADCs of a second crate at 0x803000 to 0x803F00. For performing read operations, vmeData is required to be a reference to an unsigned short, which is a 16 bit integer. Write operations do not require it to be a reference.

Therefore, if device has been properly setup as will be described below, vmeAddress is an unsigned long given an undress such as 0x800000, and vmeData is declared as an unsigned short, a VME read operation can be performed by:

vme_A24D16_read(&device, vmeAddress, &vmeData);

Following this operation, vmeData should contain the data the was read across the VME bus. If vmeData has been assigned a value, a write operation can be performed by:

vme_A24D16_write(&device, vmeAddress, vmeData);

Before any read/write operations can be performed, the Struck controller needs to be properly initialized and the reference needs to be setup. The following lines are required to configure the PCI controller that the SIS1100 uses, and to load all the proper headers:

It is also useful to make the reference to the SIS1100 device a global variable. This way, you can setup the card once, and then use the interface whenever it is necessary:

/* Struck controller reference */
struct SIS1100_Device_Struct sis1100_device1;

To actually configure the device, and setup the device reference, the following lines of code can be used. This code provides fairly rigorous error checking as well as providing fairly clear information on all actions being taken. It is definitely possible to setup the interface with fewer lines, but the extra messages displayed are useful:

At this stage, VME read/write operations can be performed as described previously.

Finally, when all operations with the VME bus have been completed, it is important to close the connection to the interface. This can be accomplished using:

sis1100w_Close(&sis1100_device1);

To compile an application that implements the above code to access the interface, you will need to ensure that the compiled object code is properly linked to the sis3100_vme_calls.obj file as well as the Struck library. The source for this file (and header) and the library can be found on bragi at:

Or, a copy of the object file can be found on bragi at:

It is easy to simply include the object file in an existing path that is used by the makefile or the project. The following is an excerpt from the makefile used on bragi to compile feflash, analyzer, among others:

Alexander Tomkins
This page was updated on Tuesday, August 10, 2004.

Back

 
© 2006 Carleton University 1125 Colonel By Drive, Ottawa, Ontario, K1S 5B6 Canada (613) 520-7400
| Contacts |
Canada's Capital University