From amaudruz@triumf.ca Mon Apr 7 09:46:17 2003 Date: Sat, 05 Apr 2003 23:08:53 -0800 From: amaudruz To: Kirsten Sachs , Jean-Pierre Martin Subject: SIS3100/1100 CPI/VME X-IMAPbase: 1426689746 1 Status: O X-Status: X-Keywords: X-UID: 1 [ The following text is in the "iso-8859-1" character set. ] [ Your display is set for the "US-ASCII" character set. ] [ Some characters may be displayed incorrectly. ] Hello There, I'm not sure you've received the previous Email from a week ago may be due to a too large attachment. (2003-03-26 15:46) So I send the text only and we'll figure out how to get the tar file later. Cheers, Pierre-André ... I finally got the time to check the SIS under RH8.0. Starting with a PC the sequence of operations have been the following: - Install standard RH8.0 (install all, or make sure the kernel source is in) [root@twtest root]# more /etc/redhat-release Red Hat Linux release 8.0 (Psyche) [root@twtest root]# uname -a Linux twtest.triumf.ca 2.4.18-14 #1 Wed Sep 4 13:35:50 EDT 2002 i686 i686 i386 GNU/Linux [root@twtest root]# - Install SIS driver from web http://www.struck.de/sis1100v12.tar.gz This creates 2 trees (common, linux) - Build the driver a) ./configure b) modify the produced Makefile for the reference to /usr/src/linux LINUXINCLUDE = /usr/src/linux/include should read LINUXINCLUDE = /usr/src/linux-2.4/include OR add symbolic link in the /usr/src to point to linux-2.4 [root@twtest src]# cd /usr/src [root@twtest src]# ls -l Mar 25 06:11 linux -> ./linux-2.4.18-14/ Mar 24 18:22 linux-2.4 -> linux-2.4.18-14 Mar 24 18:21 linux-2.4.18-14 Mar 24 16:59 redhat c) build [root@twtest root]# cd linux/driver/ [root@twtest root]# make gcc -g3 -O -D__KERNEL__ -DMODULE -DMODULENAME=SIS1100 -Wall -I./.. -I./../../common -I/usr/src/linux/i nclude -c -o sis1100_block_read.o sis1100_block_read.c gcc -g3 -O -D__KERNEL__ -DMODULE -DMODULENAME=SIS1100 -Wall -I./.. -I./../../common -I/usr/src/linux/i nclude -c -o sis1100_pipe.o sis1100_pipe.c gcc -g3 -O -D__KERNEL__ -DMODULE -DMODULENAME=SIS1100 -Wall -I./.. -I./../../common -I/usr/src/linux/i nclude -c -o sis1100_tmp_write.o sis1100_tmp_write.c gcc -g3 -O -D__KERNEL__ -DMODULE -DMODULENAME=SIS1100 -Wall -I./.. -I./../../common -I/usr/src/linux/i nclude -c -o sis1100_tmp_read.o sis1100_tmp_read.c gcc -g3 -O -D__KERNEL__ -DMODULE -DMODULENAME=SIS1100 -Wall -I./.. -I./../../common -I/usr/src/linux/i nclude -c -o sis1100_read_dma.o sis1100_read_dma.c gcc -g3 -O -D__KERNEL__ -DMODULE -DMODULENAME=SIS1100 -Wall -I./.. -I./../../common -I/usr/src/linux/i nclude -c -o sis1100_write_dma.o sis1100_write_dma.c gcc -g3 -O -D__KERNEL__ -DMODULE -DMODULENAME=SIS1100 -Wall -I./.. -I./../../common -I/usr/src/linux/i nclude -c -o sis1100_read_loop.o sis1100_read_loop.c gcc -g3 -O -D__KERNEL__ -DMODULE -DMODULENAME=SIS1100 -Wall -I./.. -I./../../common -I/usr/src/linux/include -c -o sis1100_write_loop.o sis1100_write_loop.c gcc -g3 -O -D__KERNEL__ -DMODULE -DMODULENAME=SIS1100 -Wall -I./.. -I./../../common -I/usr/src/linux/include -c -o sis3100_sharc_read.o sis3100_sharc_read.c gcc -g3 -O -D__KERNEL__ -DMODULE -DMODULENAME=SIS1100 -Wall -I./.. -I./../../common -I/usr/src/linux/include -c -o sis1100_front_io.o sis1100_front_io.c ld -r -o sis1100.o pcisupport_linux2.4.o sis1100_linux_init.o sis1100_init.o sis1100_open.o sis1100_reset.o sis1100_irq.o sis1100_vme_irq.o sis1100_init_remote.o sis1100_init_sdram.o sis1100_ioctl.o sis1100_mmap.o sis1100_read.o sis1100_block_read.o sis1100_pipe.o sis1100_tmp_write.o sis1100_tmp_read.o sis1100_read_dma.o sis1100_write_dma.o sis1100_read_loop.o sis1100_write_loop.o sis3100_sharc_read.o sis1100_front_io.o d) Load the module [root@twtest driver]# ./load_module major SIS1100: 253 major SIS3100sdram: 252 major SIS3100sharc: 251 This will create the device in /tmp crw-rw-rw- 1 root root 253, 0 Mar 26 03:52 sis1100_0 crw-rw-rw- 1 root root 253, 1 Mar 26 03:52 sis1100_1 crw-rw-rw- 1 root root 252, 0 Mar 26 03:52 sis3100sdram_0 crw-rw-rw- 1 root root 252, 1 Mar 26 03:52 sis3100sdram_1 crw-rw-rw- 1 root root 251, 0 Mar 26 03:52 sis3100sharc_0 crw-rw-rw- 1 root root 251, 1 Mar 26 03:52 sis3100sharc_1 e) Create a symbolic link to the device as it is referenced in the example code. [root@twtest driver]# cd /tmp [root@twtest driver]# ln -s ./sis1100_0 sis1100 [root@twtest driver]# ls -l lrwxrwxrwx 1 root root 11 Mar 25 06:26 sis1100 -> ./sis1100_0 ... f) The sis module should be loaded at that time. [root@twtest tmp]# lsmod Module Size Used by Not tainted sis1100 33600 0 (unused) <<<<<<<<<From the 1.2 tar file there is no examples. You should get the http://www.struck.de/sis1100v10r190203.tar.gz This create the sis1100 dir [root@twtest root]# cd sis1100 [root@twtest sis1100]# ls applications daqtest examples selftests V1.0 [root@twtest sis1100]# cd examples/ [root@twtest examples]# ls irqs mapping pipeline_liste sdram_eeprom sharc_test vme_simple_routines [root@twtest examples]# cd vme_simple_routines/ [root@twtest vme_simple_routines]# ls Makefile test vme_read_blt32.c vme_write_blt32 pci_vme_ram_test_all test.c vme_read_d32 vme_write_blt32.c pci_vme_ram_test_all.c vme_read_blt32 vme_read_d32.c [root@twtest vme_simple_routines]# make gcc -I../../V1.0/linux-gnu -I../../V1.0/sis3100_calls -g -ansi -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations-Wimplicit -Wreturn-type -Wunused -Wcomment -Wformat -L../../V1.0/sis3100_calls -o pci_vme_ram_test_all pci_vme_ram_test_all.c -l_sis3100 gcc -I../../V1.0/linux-gnu -I../../V1.0/sis3100_calls -g -ansi -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations-Wimplicit -Wreturn-type -Wunused -Wcomment -Wformat -L../../V1.0/sis3100_calls -o test test.c -l_sis3100 gcc -I../../V1.0/linux-gnu -I../../V1.0/sis3100_calls -g -ansi -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations-Wimplicit -Wreturn-type -Wunused -Wcomment -Wformat -L../../V1.0/sis3100_calls -o vme_read_blt32 vme_read_blt32.c -l_sis3100 gcc -I../../V1.0/linux-gnu -I../../V1.0/sis3100_calls -g -ansi -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations-Wimplicit -Wreturn-type -Wunused -Wcomment -Wformat -L../../V1.0/sis3100_calls -o vme_read_d32 vme_read_d32.c -l_sis3100 gcc -I../../V1.0/linux-gnu -I../../V1.0/sis3100_calls -g -ansi -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations-Wimplicit -Wreturn-type -Wunused -Wcomment -Wformat -L../../V1.0/sis3100_calls -o vme_write_blt32 vme_write_blt32.c -l_sis3100 The pci_vme_ram_test_all.c is a local program for testing multiple sis functions. The VME access that I've used is the vme_read_d32 and vme_write_d32 [root@twtest vme_simple_routines]# ./vme_read_d32 0x1001c 1 vme_A32D32_read: return_code = 0x00000000 <<<<< correct with VME access vme_A32D32_read: data = 0xffffff00 <<<<< correct data content The VME access in AxDx are available from the sis3100_calls.c or sis3100_calls.h So I've created a sis1100-pierre.tgz containing: both sis tar files (1.2, 1.0) common, linux, sis1100 untared packages with makefile correction. This should be enough to get you going. In principle if you untar that package you should be able to make clean and make the driver and examples. At which address should I send the hardware? Cheers, Pierre-André -- __ _ _ /__)' _ _ /_| _/_ ' /_| _ _ _/_ _ / /(-/ / (- - ( |/)(// (- ( |//)(/(/(// (/ (_ (/ ---------------------------------------------------------------- TRIUMF Phone : (604) 222-1047 x6234 4004 Wesbrook Mall Fax : (604) 222-1074 Vancouver B.C. V6T 2A3 E-mail: amaudruz@triumf.ca CANADA Web : http://pierre.triumf.ca/ ---------------------------------------------------------------- -- Give your Data Acquisition System a Boost in Speed and Flexibility! Don't miss the May 2003 Real Time Conference in Montreal. Register for the Midas and Root short courses now! Check the RT03 program : http://www-dapnia.cea.fr/rt2003 -- __ _ _ /__)' _ _ /_| _/_ ' /_| _ _ _/_ _ / /(-/ / (- - ( |/)(// (- ( |//)(/(/(// (/ (_ (/ ---------------------------------------------------------------- Pierre-André Amaudruz Phone : (604) 222-1047 x6234 TRIUMF Pager : (604) 650-1903 4004 Wesbrook Mall Fax : (604) 222-1074 Vancouver B.C. V6T 2A3 E-mail: amaudruz@triumf.ca CANADA Web : http://pierre.triumf.ca/ ----------------------------------------------------------------