-- This module is used to check the trailer word from STC hit data. -- It is to be downloaded into Altera pci1 interface of a STC daughterboard. -- It can check up to nine STC module outputs. -- this module has a PCIid of 10071 and rev. number 0 -- Its memory space is different from that of the standard pci interface module. -- So after the first time reconfiguration, it is necessary to restart the Vxworks. -- BAR0 occupies 8 32-bit words of mem space. -- 0x0 is used to save the Base Address of MB1's LRB, only bits 31-15 are implemented -- 0x4 is used to save the Base Address of MB2's LRB, only bits 31-15 are implemented -- 0x8 is used to save the Base Address of MB3's LRB, only bits 31-15 are implemented -- 0xc is LRB's enable register. bits 2-0 enables MB1's channel 2-0 -- bits 5-3 enables MB2's channel 2-0 -- bits 8-6 enables MB3's channel 2-0 -- 0x10 always contains the last data word recevied from the LRB, normally this is the trailer word -- 0x14 bit14 is '1' when a trailer with bits 31-28 not eqaul "1111" -- 0x14 bit13-12 is the LRB number, MB1 = "00", MB2 = "01" and MB3 = "10" -- 0x14 bit11-10 is the LRB channel, channel0 = "00", channel1 = "01" and channel2 = "10" -- 0x14 bit9-0 is the total word count of the event, normally this should not be greated than 257 -- 0x18 is the total event count, including the last one with error -- BAR1 occupies 256 32-bit words of fmem space -- BAR1 is read only. It contains the last block of data from LRB. -- the header word is at location 0, bit 11-10 of this word is replaced with the LRB number -- If the block has more than 256 words, data after word 256 are discarded. --