Difference between revisions of "SIS3600 Trigger Supervisor"

From New IAC Wiki
Jump to navigation Jump to search
 
(18 intermediate revisions by the same user not shown)
Line 1: Line 1:
 +
=Manual=
 +
 +
[[Image:SIS3610_Manual.pdf]]
 +
 
=Setting address=
 
=Setting address=
  
[[Image:SIS3610_Address.gif | 400 px]]
+
[[Image:SIS3610_Address.jpg | 400 px]]
  
 
{| border="1"  |cellpadding="20" cellspacing="0  
 
{| border="1"  |cellpadding="20" cellspacing="0  
Line 8: Line 12:
 
| Pin ||  Setting
 
| Pin ||  Setting
 
|-
 
|-
|SW-A32L ||  3
+
|SW-A32U ||  3
 
|-
 
|-
|SW-A32U ||  8
+
|SW-A32L ||  8
 
|-
 
|-
|SW-A24L ||  3
+
|SW-A24U ||  3
 
|-
 
|-
|SW-A24U ||  8
+
|SW-A24L ||  8
 
|-
 
|-
 
|SW-A16 ||  3
 
|SW-A16 ||  3
Line 23: Line 27:
  
 
I left the base address unchanged.  Which means for A16 addressing mode the address will be 0x3800.
 
I left the base address unchanged.  Which means for A16 addressing mode the address will be 0x3800.
 +
 +
= loading ROC library=
 +
 +
A ROC library is created by compiling "c" code functions which make VxWorks system calls to modules in the VME. 
 +
 +
== compiling VxWorks Modules==
 +
 +
In order to compile VxWorks modules you need the cross compiler ccppc which compiles binaries which will run on PPC chip sets used by the ROC. The cross compiled was distributed as a binary from the CODA group and is located in
 +
 +
/usr/local/gnu/x86-linux/bin/ccppc.
 +
 +
  You also need the header files for the particular version of VxWorks you are using.  I created a subdirectory called "ROClibs" in which I store all of these libraries and download them onto the ROC.  The "ROCLibs" subdirectory is located under the CODA directory but isn't associated with a version of CODA since.  I got the VxWorks header files from
 +
 +
  /site/vxworks/5.5/ppc/target/h
 +
 +
and copied the whole "h/" subdirectory under "ROClibs"
 +
 +
 +
== Makefile.ppc==
 +
 +
The Makefile below is used to compile the libraries
 +
 +
#
 +
# Description:
 +
#      Makefile for PPC code
 +
#
 +
ifndef ARCH
 +
  ARCH = VXWORKSPPC
 +
endif
 +
#example
 +
#ccppc -i adc1182.c -fno-builtin -fno-for-scope -fstrength-reduce -nostdinc -nostdinc -mcpu=604 -DCPU=PPC604
 +
-DVXWORKS -D_GNU_TOOL -DVXWORKSPPC -I/usr/local/coda/2.5/common/include/ -I./h -o adc1182_ppc.o
 +
CC = ccppc
 +
LD = ldppc
 +
LIBDIR = $(CODA)/$(ARCH)/lib
 +
#DEFINES = -DVXWORKS -DVXWORKSPPC -DCPU=PPC604 -D_GNU_TOOL
 +
DEFINES = -mcpu=604 -DCPU=PPC604 -DVXWORKS -D_GNU_TOOL -DVXWORKSPPC
 +
INCS = -I$(CODA)/common/include/ -I./h
 +
CFLAGS = -fno-builtin -fno-for-scope -fstrength-reduce -mlongcall $(DEFINES) -I$(CODA)/common/include -I./h
 +
#OBJS =  adc1182_ppc.o scale32Lib.o usrstrutils.o
 +
#OBJS =  adc1182_ppc.o scale32Lib.o  pas9740Lib.o
 +
OBJS = sis3610Lib.o
 +
all: $(OBJS)
 +
sis3610LIB.o: sis3610Lib.c sis3610.h
 +
        $(CC) -i sis3610Lib.c $(CFLAGS) -o sis3610Lib_ppc.o
 +
clean: distclean
 +
distclean:
 +
        rm -f $(OBJS)
 +
exports: install
 +
install:
 +
        cp $(OBJS) $(CLON_VXWORKS)/code
 +
 +
 +
==sis3610Lib==
 +
 +
The SIS3610 library source code is given below:
 +
 +
[[Media:sis3610Lib.c.txt]]
 +
 +
The header file is:
 +
 +
[[Media:sis3610.h.txt]]
 +
 +
 +
just type
 +
 +
make -f Makefile.ppc
 +
 +
to compile the library
 +
 +
=Test Communication from ROC console=
 +
 +
If the ROC didn't download the sis library from within the boot script then you will need to do it by hand from the ROC console.
 +
 +
 +
->cd "/home/daq/CODA/ROClibs"
 +
->ld < sis3610Lib.o 
 +
 +
From the ROC console (minicom window)  I tried talking to the SIS3610 using the library function "s3610Init"
 +
 +
->  s3610Init 0x3800                                                           
 +
Initialized SIS3610 ID 0 at address 0x91003800                                 
 +
value = 0 = 0x0
 +
 +
 +
The next test was to try and turn the user LED (labeled "U" on the front pannel)  on and off.
 +
 +
From the ROC console I typed
 +
 +
-> s3610SetLED                                                                 
 +
value = 0 = 0x0                                                               
 +
 +
and I saw the green LED light up
 +
 +
I then typed
 +
 +
-> s3610ClearLED                                                               
 +
value = 0 = 0x0                                                               
 +
 +
and I saw it turn off
 +
 +
= SIS3610 readout list (ROL) =
 +
 +
makelist gen_int.crl ppc -mlongcall
 +
 +
The readout list is a script that coda download to the ROC which
 +
 +
= SIS3610 run configuration =
 +
 +
= Input data word tests=
 +
Run 876
 +
 +
 +
D0 | D1 | D2 | D3| D4SIS3610 Input word= fbfe = 64510
 +
SIS3610 Input word= 7bfe = 31742
 +
SIS3610 Input word= 3bfe = 15358
 +
SIS3610 Input word= 1bfe = 7166
 +
SIS3610 Input word= bfe = 3070
 +
SIS3610 Input word= 9fe = 2558
 +
SIS3610 Input word= 8fe = 2302
 +
SIS3610 Input word= 87e = 2174
 +
SIS3610 Input word= 8be = 2238
 +
SIS3610 Input word= 8ae = 2222
 +
SIS3610 Input word= 8a6 = 2214
 +
SIS3610 Input word= 8a2 = 2210
 +
SIS3610 Input word= 8a0 = 2208
 +
 +
 +
 +
[http://wiki.iac.isu.edu/index.php/Data_Acquisition Back to DAQ] [[Data_Acquisition]]

Latest revision as of 16:48, 3 April 2009

Manual

File:SIS3610 Manual.pdf

Setting address

SIS3610 Address.jpg

Address
Pin Setting
SW-A32U 3
SW-A32L 8
SW-A24U 3
SW-A24L 8
SW-A16 3


There was also a of jumpers labeled "EN_A16, "EN_A24" and "EN_A32". The factory default setting was "EN_A32" so I moved the jumper to "EN_16".

I left the base address unchanged. Which means for A16 addressing mode the address will be 0x3800.

loading ROC library

A ROC library is created by compiling "c" code functions which make VxWorks system calls to modules in the VME.

compiling VxWorks Modules

In order to compile VxWorks modules you need the cross compiler ccppc which compiles binaries which will run on PPC chip sets used by the ROC. The cross compiled was distributed as a binary from the CODA group and is located in

/usr/local/gnu/x86-linux/bin/ccppc.
 You also need the header files for the particular version of VxWorks you are using.  I created a subdirectory called "ROClibs" in which I store all of these libraries and download them onto the ROC.  The "ROCLibs" subdirectory is located under the CODA directory but isn't associated with a version of CODA since.  I got the VxWorks header files from
 /site/vxworks/5.5/ppc/target/h

and copied the whole "h/" subdirectory under "ROClibs"


Makefile.ppc

The Makefile below is used to compile the libraries

#
# Description:
#       Makefile for PPC code
#
ifndef ARCH
  ARCH = VXWORKSPPC
endif
#example
#ccppc -i adc1182.c -fno-builtin -fno-for-scope -fstrength-reduce -nostdinc -nostdinc -mcpu=604 -DCPU=PPC604 
-DVXWORKS -D_GNU_TOOL -DVXWORKSPPC -I/usr/local/coda/2.5/common/include/ -I./h -o adc1182_ppc.o
CC = ccppc
LD = ldppc
LIBDIR = $(CODA)/$(ARCH)/lib
#DEFINES = -DVXWORKS -DVXWORKSPPC -DCPU=PPC604 -D_GNU_TOOL 
DEFINES = -mcpu=604 -DCPU=PPC604 -DVXWORKS -D_GNU_TOOL -DVXWORKSPPC
INCS = -I$(CODA)/common/include/ -I./h 
CFLAGS = -fno-builtin -fno-for-scope -fstrength-reduce -mlongcall $(DEFINES) -I$(CODA)/common/include -I./h
#OBJS =  adc1182_ppc.o scale32Lib.o usrstrutils.o
#OBJS =  adc1182_ppc.o scale32Lib.o  pas9740Lib.o 
OBJS = sis3610Lib.o
all: $(OBJS)
sis3610LIB.o: sis3610Lib.c sis3610.h 
       $(CC) -i sis3610Lib.c $(CFLAGS) -o sis3610Lib_ppc.o
clean: distclean
distclean:
       rm -f $(OBJS)
exports: install
install:
       cp $(OBJS) $(CLON_VXWORKS)/code


sis3610Lib

The SIS3610 library source code is given below:

Media:sis3610Lib.c.txt

The header file is:

Media:sis3610.h.txt


just type

make -f Makefile.ppc

to compile the library

Test Communication from ROC console

If the ROC didn't download the sis library from within the boot script then you will need to do it by hand from the ROC console.


->cd "/home/daq/CODA/ROClibs"
->ld < sis3610Lib.o  

From the ROC console (minicom window) I tried talking to the SIS3610 using the library function "s3610Init"

->  s3610Init 0x3800                                                            
Initialized SIS3610 ID 0 at address 0x91003800                                  
value = 0 = 0x0


The next test was to try and turn the user LED (labeled "U" on the front pannel) on and off.

From the ROC console I typed

-> s3610SetLED                                                                  
value = 0 = 0x0                                                                 

and I saw the green LED light up

I then typed

-> s3610ClearLED                                                                
value = 0 = 0x0                                                                 

and I saw it turn off

SIS3610 readout list (ROL)

makelist gen_int.crl ppc -mlongcall

The readout list is a script that coda download to the ROC which

SIS3610 run configuration

Input data word tests

Run 876


D0 | D1 | D2 | D3| D4SIS3610 Input word= fbfe = 64510
SIS3610 Input word= 7bfe = 31742
SIS3610 Input word= 3bfe = 15358
SIS3610 Input word= 1bfe = 7166
SIS3610 Input word= bfe = 3070
SIS3610 Input word= 9fe = 2558
SIS3610 Input word= 8fe = 2302
SIS3610 Input word= 87e = 2174
SIS3610 Input word= 8be = 2238
SIS3610 Input word= 8ae = 2222
SIS3610 Input word= 8a6 = 2214
SIS3610 Input word= 8a2 = 2210
SIS3610 Input word= 8a0 = 2208


Back to DAQ Data_Acquisition