EnglishJapanese Reload Front page List of pages Search Recent changes RSS of recent changes

Back to Seup page

Software settings for FEC

Usually, default CAMAC/VME FECs are already available. If you need additional CAMAC/VME crates, please contact RIBFDAQ group, first.

Files for the readout routine

Default setting is done by RIBFDAQ group. All default frontends refer daq@g01:/home/daq/daqconfig/ EXPNAME directory via NFS. "daq" account on g01 is a common account for DAQ setting. EXPNAME is your experiment's nickname.

Readout routine is separated into some files:

  • bbmoudles.h (header file)
  • startup.c (for start timing)
  • evt.c (for event-by-event)
  • clear.c (for event-by-event clear)
  • stop.c (for stop timing)
  • sca.c (for buffer-by-buffer)

Header file

An example is listed:

// Include file for the segment id list (this line is common for all)
#include "/home/daq/daqconfig/include/segidlist.h"

// Parameter for EFN and MAXBUFF (should be modified)
#define EFN    36
#define MAXBUFF 3000

// Definition for controllers (Normal Linux + CC7700 case)
#define BBRL
#define CAMAC
#define CAMACINT
#define CC7700

// User definition
#define LAMN  1
#define OPRN 18
#define OPBUSYCL 0x0001
#define OPCLEAR  0xfff0
#define CLKSCR 22
#define ADC1   1 

There are some special definitions.

Segment ID list
All FEC's drivers include /home/daq/daqconfig/include/segidlist.h
EFN
The ID number of the event fragment (front-end computer). Usually it is last 8 bits of IP addres (e.g. 10.32.1.21 -> EFN = 21)
MAXBUFF
When exceed this number (with the short word unit), data is transferred to a event builder. About 5--20kB = 2500--10000 MAXBUF is recommended. (Real maximum is 128 kB.) This size should not be less than 2048 (4kB).
CAMAC
Use CAMAC.
VME
Use VME.
CAMACINT
Use interrupt signal from CAMAC bus with CC/7700 or K3922 controller. CCNET case, this CAMACINT is meaningless.
VMEINT
User interrupt signal from VME bus with SBS618 or VMIVME controller.

Startup routine

This routine (startup.c) is called at the run start timing. VMIVME case, this startup.c includes map() and unmap() function which are called at module installing/removing timing. Usually, module's setting are done in this routine.

Hardware depended

We use some different crate controllers, such as CC/NET, CC/7700, Kinetic 3922, VMIVME and SBS-618/620. Files and compile command for readout routine are different:

For CC/NET
 startup = startup.c
 readout = ccnetsegment.c
 clear   = non
 stop    = non
 compile = smake (password is required)
 ** some CCNET is now running netboot mode, this case, please use 'make'
For VMIVME
 mapping = startup.c
 startup = startup.c
 readout = evt.c
 clear   = clear.c
 stop    = stop.c
 compile = make
For Kinetic 3922, CC/7700, SBS
 startup = startup.c
 readout = evt.c
 clear   = clear.c
 stop    = stop.c
 compile = smake (password is required)

Details are written in follows:

Launch Event Sender (babies)

By using process manager (see Utility's page), user can launch/kill DAQ processes. Usually babies is launched during the boot sequence. About this, please refer Power on sequence.

Power on sequence

The directory of /home/daq/daqconfig/EXPNAME/init contains special files for power on sequence.

daqbootrc

#!/bin/sh

echo 5 > /proc/sys/kernel/panic

/usr/babirl/babies/babies -l 21
/home/daq/daqconfig/ccnet01/init/daqinitrc >> /home/daq/daqconfig/ccnet01/init/initlog

3rd line is reboot parameter at the kernel panic. 5th line is launching babies. 6th line is executing the initialization script daqinitrc.

daqinitrc

/usr/nbbq/bin/cmdvme -am 0x29
/usr/nbbq/bin/cmdvme 0x800a 0x80
/usr/nbbq/bin/cmdvme -am 0x09

echo "V785 init"
/home/daq/daqconfig/ggdaq03/init/daliadc.sh      

In daqbootrc and daqinitrc, to execute commands, you have to type full path.

Hardware detail

CC/NET

For now Linux OS is installed on Compact Flash. The netboot system is planed in the future. For software setting, please see CCNET.

VMIVME

The netboot system is available. To install new VMIVME on RIBFDAQ, the registration of MAC address is required. For software setting, please see VMIVME.

Tips

Troubles in readout driver

  • Missing device file If the process of babies down at the run start, please check
    ls -l /dev/babildrv
    if you can't find it, please make the device file
  • Invalid readout driver in the front-end computer. Or, try to install the driver once,
    dmesg
    /sbin/insmod babildrv.ko

If you could see message of "Unknown symbol" like

  • babildrv: Unknown symbol XXXX_define_intlevel This is due to core driver such as (bb-sbs620, bb-v2718) are not installed. Please check the installation of NBBQ.

Other cases, if you find "no symbol version" like babildrv: no symbol version for XXXX_read_intvector This is because of conflicting the version code, please try to copy

cp /usr/nbbq/Module.symvers YOURDRIVERDIR
make clean
make
Last-modified: Wed, 28 Jan 2015 17:23:51 HADT (2428d)