Jun 30, 2000 onl50t: Solaris 2.6 cc ドライバのデバッグ. cc ドライバのデバッグ#04(その1) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (http://www-online.kek.jp/~inoue/CAMAC/ onl50t-sol2.6/Desktop/debug-list-step01.txt) 高エネルギー加速器研究機構 素粒子原子核研究所 物理、オンライングループ 井上 栄二 (1). 現状確認 (A). 株式会社ロジックハウスの白田様より SPARC CPU-50T を借用した。 (B). FORCE,CPU-50(UltraSPARC-IIi 300MHz)、に Solaris2.6 のシステムを インストールした。 (C). /etc の下の各設定、および /export/home の作成をやった。 (D). "Solaris2.6 Hardware: 5/98 SMCC Desktop 日本語版 SPARC版"では ディスクレス・クライアントを設定することはできないことを確認した。 (E). CPU-50T に Solaris2.6用の VMEドライバ、FRCvme-2.3.1 をインストール した。 (F). onl50t に ccドライバをインストールした。 (G). サンプル・プログラムを実行した。 (1). cam1、シングル・アクション 24ビット camac read/write の実行 NG. システムはパニックを起こしてリブートしてしまう。 (2). cam3、camac LAM割り込み処理の実行 NG. システムはパニックを起こしてリブートしてしまう。 (3). cam2、ブロック転送 16ビット read/write の実行 ok. 正常に実行できた。 (4). cam2、ブロック転送 24ビット read/write の実行 ok. 正常に実行できた。 (H). クラッシュ時の savecoreファイルを入手してデバッグを始めた。 (I). cam1プログラムのデバッグ、icc_ioctlルーチンを修正した。 ok. cam1プログラムは正常に実行できた。 (J). cam3プログラムのデバッグを始めた。 camac_s()ルーチンの中で "cc->k->dhr = *dat;" を実行したところでエラーになっている。 message構造体をcc_device構造体の中に入れてみたが改善されない。 (K). cam3プログラムは正常に動作できるようになった。 (L). cam3プログラムのデバッグ時に付加したゴミをはずして最終的な動作確認 をやった。 ok. (M). onl50t 上でデバッグしたcamacドライバをfrc7v-cl2 上で動作確認した。 ok. (N). onl50t 上でデバッグしたcamacドライバを onl7v2、スタンドアロン Solaris2.6 上で動作確認した。 ok. (O). onl50t 上でデバッグしたcamacドライバを frc8vt、ディスクレス・サーバ Solaris2.6 上で動作確認した。 ok. (P). onl50t 上でデバッグしたcamacドライバを onl8v1、スタンドアロン Solaris2.6 上で動作確認した。 ok. (Q). onl50t 上でデバッグしたcamacドライバを onl5v4、スタンドアロン Solaris2.6 上で動作確認した。 ok. (R). スタンドアロン Solaris2.6、onl50t 上で、シングルアクションの実行 速度を測定時に、camac_s()コールを連続実行すると不正割り込みが かかってしまった。 (S). camac_s()コールを連続実行しても不正割り込みはかからないように なった。 ok. -------------------- リスト処理 (A). 公開版のcamacドライバ、"FORCE-50T-sol2.6" を使ってリスト処理の テストを始める。 (2). ここでやるべきこと KEKリスト処理で camacシングルアクション read/write、LAM割り込み処理、 DMA camacブロック転送の動作確認をする。 (3). テスト環境整備 camac ドライバは FORCE-50T-sol2.6 をベースにし、KEKリスト処理用のテスト プログラムは、安さんが HP-RT 上で使われたものをベースに使用する。 テストのためのディレクトリは以下の場所とする。 /export/home/onl50t/inoue/CAMAC/Driver/Kit-test/ CAMAC-list/FORCE-50T-sol2.6 onl50t[93]% pwd /export/home/onl50t/inoue/CAMAC/Driver/Kit-test/CAMAC-list/FORCE-50T-sol2.6 onl50t[94]% ls -l total 516 -rw-r--r-- 1 inoue kek 2041 Jun 23 16:19 Makefile -rw-r--r-- 1 inoue kek 3624 Jun 23 16:19 README -rwxr-xr-x 1 inoue kek 14048 Jun 23 16:19 cam1* -rw-r--r-- 1 inoue kek 1170 Jun 23 16:19 cam1.c -rwxr-xr-x 1 inoue kek 29164 Jun 23 16:19 cam2* -rw-r--r-- 1 inoue kek 2295 Jun 23 16:19 cam2.f -rwxr-xr-x 1 inoue kek 14580 Jun 23 16:19 cam3* -rw-r--r-- 1 inoue kek 2055 Jun 23 16:19 cam3.c -rw-r--r-- 1 inoue kek 9740 Jun 23 16:19 camlib.c -rw-r--r-- 1 inoue kek 1415 Jun 23 16:19 camlib.h -rw-r--r-- 1 inoue kek 9576 Jun 23 16:19 camlib.o -rw-r--r-- 1 inoue kek 55664 Jun 23 16:19 cc -rw-r--r-- 1 inoue kek 74943 Jun 23 16:19 cc.c -rw-r--r-- 1 inoue kek 288 Jun 23 16:19 cc.conf -rw-r--r-- 1 inoue kek 2931 Jun 23 16:19 cc.h -rw-r--r-- 1 inoue kek 2288 Jun 23 16:19 cc_common.h -rw-r--r-- 1 inoue kek 876 Jun 23 16:19 cc_config.h -rw-r--r-- 1 inoue kek 3289 Jun 23 16:19 forlib.c -rw-r--r-- 1 inoue kek 3532 Jun 23 16:19 forlib.o -rw-r--r-- 1 inoue kek 4058 Jun 23 16:19 k2917.h -rw-r--r-- 1 inoue kek 13968 Jun 23 16:19 libcamac.a drwxr-xr-x 2 inoue kek 512 Jun 23 16:19 script/ onl50t[95]% (3-1). camasm ディレクトリの作成 onl50t[96]% cp -r /export/home/onl50t/inoue/CAMAC/Driver/Kit-test/CAMAC-list/Yasu/camasm . onl50t[97]% ls Makefile cam2.f camlib.h cc.h k2917.h README cam3* camlib.o cc_common.h libcamac.a cam1* cam3.c cc cc_config.h script/ cam1.c camasm/ cc.c forlib.c cam2* camlib.c cc.conf forlib.o onl50t[98]% ls -l camasm total 196 -rw-r--r-- 1 inoue kek 448 Jun 28 10:41 Makefile -rw-r--r-- 1 inoue kek 11249 Jun 28 10:41 asm_code.h -rw-r--r-- 1 inoue kek 11251 Jun 28 10:41 asm_code.h-org -rwxr-xr-x 1 inoue kek 28156 Jun 28 10:41 camasm* -rwxr-xr-x 1 inoue kek 20390 Jun 28 10:41 camasm-old* -rw-r--r-- 1 inoue kek 24762 Jun 28 10:41 camasm.c -rw-r--r-- 1 inoue kek 1646 Jun 28 10:41 err_code.h onl50t[99]% (3-2). リスト処理テスト用ディレクトリの作成 onl50t[99]% pwd /export/home/onl50t/inoue/CAMAC/Driver/Kit-test/CAMAC-list/FORCE-50T-sol2.6 onl50t[100]% ls Makefile cam2.f camlib.h cc.h k2917.h README cam3* camlib.o cc_common.h libcamac.a cam1* cam3.c cc cc_config.h script/ cam1.c camasm/ cc.c forlib.c cam2* camlib.c cc.conf forlib.o onl50t[101]% mkdir camlist onl50t[102]% cd camlist /export/home/onl50t/inoue/CAMAC/Driver/Kit-test/CAMAC-list/FORCE-50T-sol2.6/camlist onl50t[103]% ls -l total 0 onl50t[104]% cp /export/home/onl50t/inoue/CAMAC/Driver/Kit-test/CAMAC-list/Yasu/examples-Solaris2.x/M* . onl50t[108]% cp /export/home/onl50t/inoue/CAMAC/Driver/Kit-test/CAMAC-list/Yasu/examples-Solaris2.x/camtest* . onl50t[109]% ls -l total 182 -rw-r--r-- 1 inoue kek 4576 Jun 28 10:45 Makefile -rw-r--r-- 1 inoue kek 4566 Jun 28 10:45 Makefile-bak -rw-r--r-- 1 inoue kek 4575 Jun 28 10:45 Makefile-bak1 -rw-r--r-- 1 inoue kek 4262 Jun 28 10:45 Makefile.org -rw-r--r-- 1 inoue kek 1433 Jun 28 10:45 camtest10c.c -rw-r--r-- 1 inoue kek 1459 Jun 28 10:45 camtest11c.c -rw-r--r-- 1 inoue kek 1728 Jun 28 10:45 camtest11c.o -rw-r--r-- 1 inoue kek 1435 Jun 28 10:45 camtest12c.c -rw-r--r-- 1 inoue kek 1469 Jun 28 10:45 camtest13c.c -rw-r--r-- 1 inoue kek 1453 Jun 28 10:45 camtest14c.c -rw-r--r-- 1 inoue kek 2602 Jun 28 10:45 camtest1c.c -rw-r--r-- 1 inoue kek 3548 Jun 28 10:45 camtest2c.c -rw-r--r-- 1 inoue kek 2927 Jun 28 10:45 camtest31c.c -rw-r--r-- 1 inoue kek 1999 Jun 28 10:45 camtest3c.c -rw-r--r-- 1 inoue kek 3293 Jun 28 10:45 camtest4.asm -rw-r--r-- 1 inoue kek 2065 Jun 28 10:45 camtest4.obj -rw-r--r-- 1 inoue kek 2178 Jun 28 10:45 camtest41c.c -rw-r--r-- 1 inoue kek 2221 Jun 28 10:45 camtest4c.c -rw-r--r-- 1 inoue kek 718 Jun 28 10:45 camtest4dma.asm -rw-r--r-- 1 inoue kek 405 Jun 28 10:45 camtest4dma.obj -rw-r--r-- 1 inoue kek 1821 Jun 28 10:45 camtest4etc.asm -rw-r--r-- 1 inoue kek 699 Jun 28 10:45 camtest4int.asm -rw-r--r-- 1 inoue kek 540 Jun 28 10:45 camtest4single.asm -rw-r--r-- 1 inoue kek 175 Jun 28 10:45 camtest4single.obj -rwxr-xr-x 1 inoue kek 15344 Jun 28 10:45 camtest5c* -rw-r--r-- 1 inoue kek 2060 Jun 28 10:45 camtest5c.c -rw-r--r-- 1 inoue kek 2095 Jun 28 10:45 camtest5c.c-bak -rw-r--r-- 1 inoue kek 2036 Jun 28 10:45 camtest5c.c-org -rw-r--r-- 1 inoue kek 3250 Jun 28 10:45 camtestc.c onl50t[110]% (4). 症状確認 (4-1). コンパイラのバージョン onl50t[112]% which cc /kek/compilers/volume5/SUNWspro/bin/cc onl50t[113]% cc -V cc: WorkShop Compilers 4.2.1 04 Feb 1997 C 4.2.1 usage: cc [ options] files. Use 'cc -flags' for details onl50t[114]% which f77 /kek/compilers/volume5/SUNWspro/bin/f77 onl50t[115]% f77 -V f77: WorkShop Compilers 4.2.1 04 Feb 1997 FORTRAN 77 4.2.1 Usage: f77 [ options ] files. Use 'f77 -flags' for details onl50t[116]% (4-2). camacドライバのインストール onl50t[116]% pwd /export/home/onl50t/inoue/CAMAC/Driver/Kit-test/CAMAC-list/FORCE-50T-sol2.6 onl50t[117]% ls Makefile cam2.f camlib.h cc.conf forlib.o README cam3* camlib.o cc.h k2917.h cam1* cam3.c camlist/ cc_common.h libcamac.a cam1.c camasm/ cc cc_config.h script/ cam2* camlib.c cc.c forlib.c onl50t[118]% vi cc.c : static u_int cc_intr(int unit) { register struct cc_device *cc; /* E.Inoue */ uint_t chk_done; /* end */ : /* free DMA resources */ if (cc->executing_dma_flag != 0) { /* E.Inoue */ chk_done = 0x7ffffff; /* about 10 sec */ while (chk_done-- > 0){ if (cc->k->csr & CC_DONE) != 0){ cc->interrupt |= CC_INT_DONE; break; } } /* end */ /* change logichouse */ /* ddi_dma_free(cc->handle); */ ddi_dma_unbind_handle(cc->handle); /* end */ : onl50t[119]% onl50t[119]% vi cc.h : /* E.Inoue: begin */ /* #define CC_MINPHYS_SIZE 0x10000 */ /* max word count = 64k */ /* #define CC_MINPHYS_SIZE 0x1f000 */ /* max word count = 128k */ /* E.Inoue: end */ #define CC_MINPHYS_SIZE 0x10000 /* max word count = 64k */ : onl50t[120]% onl50t[120]% make clean \rm -f cc *.o libcamac.a cam1 cam2 cam3 *~ core onl50t[121]% make ./script/cc_build.sh [Building for sun4u] rm -f cc.o cc -O -c camlib.c -o camlib.o -I. cc -O -c forlib.c -o forlib.o -I. rm -f libcamac.a ar rcv libcamac.a camlib.o forlib.o a - camlib.o a - forlib.o ar: writing libcamac.a cc -O cam1.c -o cam1 -I. -L. -lcamac f77 -fast -O3 -u cam2.f -o cam2 -I. -L. -lcamac cam2.f: MAIN: cc -O cam3.c -o cam3 -I. -L. -lcamac onl50t[122]% onl50t# make unload ./script/cc_unload.sh [Removing CAMAC device driver] [Removing CAMAC device driver from system] [Deleting CAMAC device files] onl50t# make load ./script/cc_load.sh [Installing CAMAC device driver] [Adding CAMAC device driver to system] [Configuring CAMAC device driver] [Making CAMAC device files] sun4u onl50t# ls -l /dev/cc lrwxrwxrwx 1 root other 37 Jun 28 10:52 /dev/cc -> /devices/pci@1f,0/vme@5/cc@2d,ff00:cc onl50t# (4-3). camasm のコンパイル onl50t[126]% pwd /export/home/onl50t/inoue/CAMAC/Driver/Kit-test/CAMAC-list/FORCE-50T-sol2.6/camasm onl50t[127]% ls -l total 196 -rw-r--r-- 1 inoue kek 448 Jun 28 10:41 Makefile -rw-r--r-- 1 inoue kek 11249 Jun 28 10:41 asm_code.h -rw-r--r-- 1 inoue kek 11251 Jun 28 10:41 asm_code.h-org -rwxr-xr-x 1 inoue kek 28156 Jun 28 10:41 camasm* -rwxr-xr-x 1 inoue kek 20390 Jun 28 10:41 camasm-old* -rw-r--r-- 1 inoue kek 24762 Jun 28 10:41 camasm.c -rw-r--r-- 1 inoue kek 1646 Jun 28 10:41 err_code.h onl50t[128]% make clean rm -f camasm *.obj *.lis *~ *.o core onl50t[129]% make cc -O -o camasm camasm.c "./asm_code.h", line 192: warning: initializer does not fit or is out of range: -1 onl50t[130]% (4-4). camtest5c をコンパイル & 実行 (camacシングルアクション read/write) onl50t[135]% pwd /export/home/onl50t/inoue/CAMAC/Driver/Kit-test/CAMAC-list/FORCE-50T-sol2.6/camlist onl50t[136]% ls -l total 182 -rw-r--r-- 1 inoue kek 4576 Jun 28 10:45 Makefile -rw-r--r-- 1 inoue kek 4566 Jun 28 10:45 Makefile-bak -rw-r--r-- 1 inoue kek 4575 Jun 28 10:45 Makefile-bak1 -rw-r--r-- 1 inoue kek 4262 Jun 28 10:45 Makefile.org -rw-r--r-- 1 inoue kek 1433 Jun 28 10:45 camtest10c.c -rw-r--r-- 1 inoue kek 1459 Jun 28 10:45 camtest11c.c -rw-r--r-- 1 inoue kek 1728 Jun 28 10:45 camtest11c.o -rw-r--r-- 1 inoue kek 1435 Jun 28 10:45 camtest12c.c -rw-r--r-- 1 inoue kek 1469 Jun 28 10:45 camtest13c.c -rw-r--r-- 1 inoue kek 1453 Jun 28 10:45 camtest14c.c -rw-r--r-- 1 inoue kek 2602 Jun 28 10:45 camtest1c.c -rw-r--r-- 1 inoue kek 3548 Jun 28 10:45 camtest2c.c -rw-r--r-- 1 inoue kek 2927 Jun 28 10:45 camtest31c.c -rw-r--r-- 1 inoue kek 1999 Jun 28 10:45 camtest3c.c -rw-r--r-- 1 inoue kek 3293 Jun 28 10:45 camtest4.asm -rw-r--r-- 1 inoue kek 2065 Jun 28 10:45 camtest4.obj -rw-r--r-- 1 inoue kek 2178 Jun 28 10:45 camtest41c.c -rw-r--r-- 1 inoue kek 2221 Jun 28 10:45 camtest4c.c -rw-r--r-- 1 inoue kek 718 Jun 28 10:45 camtest4dma.asm -rw-r--r-- 1 inoue kek 405 Jun 28 10:45 camtest4dma.obj -rw-r--r-- 1 inoue kek 1821 Jun 28 10:45 camtest4etc.asm -rw-r--r-- 1 inoue kek 699 Jun 28 10:45 camtest4int.asm -rw-r--r-- 1 inoue kek 540 Jun 28 10:45 camtest4single.asm -rw-r--r-- 1 inoue kek 175 Jun 28 10:45 camtest4single.obj -rwxr-xr-x 1 inoue kek 15344 Jun 28 10:45 camtest5c* -rw-r--r-- 1 inoue kek 2060 Jun 28 10:45 camtest5c.c -rw-r--r-- 1 inoue kek 2095 Jun 28 10:45 camtest5c.c-bak -rw-r--r-- 1 inoue kek 2036 Jun 28 10:45 camtest5c.c-org -rw-r--r-- 1 inoue kek 3250 Jun 28 10:45 camtestc.c onl50t[137]% onl50t[138]% rm camtest4single.obj onl50t[139]% make camtest4single.obj ../camasm/camasm camtest4single.asm CAMASM macro assembler V0.1 --- KEK online group --- Modified by Y.T Oct-1991 onl50t[140]% onl50t[140]% rm camtest4.obj onl50t[141]% make camtest4.obj ../camasm/camasm camtest4.asm CAMASM macro assembler V0.1 --- KEK online group --- Modified by Y.T Oct-1991 onl50t[142]% onl50t[142]% rm camtest4dma.obj onl50t[143]% make camtest4dma.obj ../camasm/camasm camtest4dma.asm CAMASM macro assembler V0.1 --- KEK online group --- Modified by Y.T Oct-1991 onl50t[144]% onl50t[144]% make camtest5c cc -o camtest5c camtest5c.c -I../includes -L../lib -lcamac "camtest5c.c", line 28: warning: improper pointer/integer combination: arg #1 onl50t[145]% vi camtest5c.c : 23 error_exit(status) 24 int status; { 25 #ifdef HP_RT 26 perror(sys_errlist[status]); 27 #else 28 perror(strerror(status)); 29 #endif 30 exit(status); 31 } : onl50t[146]% onl50t[146]% man -s 3c perror C Library Functions perror(3C) NAME perror, errno - print system error messages SYNOPSIS #include void perror(const char *s); #include int errno; DESCRIPTION perror() produces a message on the standard error output (file descriptor 2), describing the last error encountered during a call to a system or library function. The argument string s is printed first, then a colon and a blank, then the message and a newline. (However, if s is a null pointer or points to a null string, the colon is not printed.) To be of most use, the argument string should include the name of the program that incurred the error. The error number is taken from the external variable errno, (see intro(2)), which is set when errors occur but not cleared when non- erroneous calls are made. ATTRIBUTES See attributes(5) for descriptions of the following attri- butes: __________________________________ | ATTRIBUTE TYPE| ATTRIBUTE VALUE| |_______________|_________________| | MT-Level | MT-Safe | |_______________|_________________| SEE ALSO intro(2), fmtmsg(3C), gettext(3C), setlocale(3C), strerror(3C), attributes(5) NOTES If the application is linked with -lintl, then messages printed from this function are in the native language speci- fied by the LC_MESSAGES locale category; see setlocale(3C). SunOS 5.6 Last change: 29 Dec 1996 1 onl50t[147]% onl50t[147]% vi camtest5c.c : int status; { #ifdef HP_RT perror(sys_errlist[status]); #else perror((const char *)strerror(status)); #endif exit(status); } : main(argc, argv) int argc; char *argv[]; { int status, Error, i; int Lenlis, action; unsigned short List[MAXLENLIST], Buffer[MAXLENBUF], *PtrBuffer; struct cc_iosb Iosb; char Filename[30]; /* strcpy(Filename, "camtest4.obj"); */ strcpy(Filename, "camtest4single.obj"); /* strcpy(Filename, "camtest4dma.obj"); */ if (argc > 1) : onl50t[148]% onl50t[148]% vi Makefile : CAMDIR = .. #LIBDIR = $(CAMDIR)/lib LIBDIR = $(CAMDIR) #INCDIR = $(CAMDIR)/include #INCDIR = $(CAMDIR)/includes INCDIR = $(CAMDIR) : onl50t[149]% onl50t[149]% rm camtest5c onl50t[150]% make camtest5c cc -o camtest5c camtest5c.c -I.. -L.. -lcamac onl50t[151]% camtest5c を実行する。 onl50t[73]% pwd /export/home/onl50t/inoue/CAMAC/Driver/Kit-test/CAMAC-list/FORCE-50T-sol2.6/caml ist onl50t[74]% camtest5c CamReaLIST : OK lenlist = 33 list = 329 1 0 10a ef7a6080 CamLisExeWAIt : OK contents of iosb : iosb.status = fffffff6 iosb.ret_length = 6 iosb.s_reg = f iosb.devinfo = a000 a0 contents of buffer : 5 0 5 5 0 5 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 onl50t[75]% CAMAC device driver V1.4x, 1991-1993 by Y.TAKEUCHI (T.I.T. ) cc0 at vme0: vme16d16 0xff00 VME level 4 vector 0xff sparc ipl 7 Jun 28 10:52:01 onl50t su: 'su root' succeeded for inoue on /dev/pts/5 CAMAC device driver V1.4x, 1991-1993 by Y.TAKEUCHI (T.I.T.) cc0 at vme0: vme16d16 0xff00 VME level 4 vector 0xff sparc ipl 7 vmeplus0 at vme0: vme16d16 0x0 and vme24d16 0x0 and vme32d16 0x0 and vme16d32 0x 0 and vme24d32 0x0 and vme32d32 0x0 and space 0x2f offset 0x0 and space 0x6f offset 0x0 and space 0x10 offset 0x0 and space 0x11 offset 0x0 and space 0x50 offset 0x0 and space 0x51 offset 0x0 vmedma0 at vme0 vmefdma0 at vme0 vmedvma0 at vme0 vmectl0 at vme0 ok. エラー無しで実行できた。 (1) 16ビット シングルアクション read onl50t[87]% cat camtest4single.asm ; File name : camtest4single.asm ; Creation date : July 1992 ; Author : Y.Yasu, Online group, Physics department, KEK SW equ 3 ; CAMAC SWITCH REGISTER MEM equ 4 ; CAMAC BUFFER MEMORY MOUDLE INT equ 5 ; CAMAC INTERRUPT REGISTER LEN equ 10 ; 10 words ; MOVE #1,A SETCRATE A SETCRATE #0 GENZ GENC SETI REMI ; READ (0,SW,1) ; READ.l (0,SW,1) ; READ (0,SW,1),A ; MOVE A,(PTR)+ ; READ.l (0,SW,1),A ; MOVE.l A,(PTR)+ ; WRITE #0x80081,(16,SW,0) ; WRITE.l #0x80082,(16,SW,0) ; WRITE A,(16,SW,0) ; WRITE.l A,(16,SW,0) ; STOP end onl50t[88]% onl50t[85]% camtest5c CamReaLIST : OK lenlist = 14 list = 329 1 0 10a ef7a6080 CamLisExeWAIt : OK contents of iosb : iosb.status = fffffff6 iosb.ret_length = 1 iosb.s_reg = f iosb.devinfo = 8000 80 contents of buffer : 5 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 onl50t[86]% onl50t[90]% camtest5c CamReaLIST : OK lenlist = 14 list = 329 1 0 10a ef7a6080 CamLisExeWAIt : OK contents of iosb : iosb.status = fffffff6 iosb.ret_length = 1 iosb.s_reg = f iosb.devinfo = 8000 80 contents of buffer : ffff 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 onl50t[91]% (2) 24ビット シングルアクション read onl50t[95]% cat camtest4single.asm ; File name : camtest4single.asm ; Creation date : July 1992 ; Author : Y.Yasu, Online group, Physics department, KEK SW equ 3 ; CAMAC SWITCH REGISTER MEM equ 4 ; CAMAC BUFFER MEMORY MOUDLE INT equ 5 ; CAMAC INTERRUPT REGISTER LEN equ 10 ; 10 words ; MOVE #1,A SETCRATE A SETCRATE #0 GENZ GENC SETI REMI ; ; READ (0,SW,1) READ.l (0,SW,1) ; READ (0,SW,1),A ; MOVE A,(PTR)+ ; READ.l (0,SW,1),A ; MOVE.l A,(PTR)+ ; WRITE #0x80081,(16,SW,0) ; WRITE.l #0x80082,(16,SW,0) ; WRITE A,(16,SW,0) ; WRITE.l A,(16,SW,0) ; STOP end onl50t[96]% onl50t[97]% camtest5c CamReaLIST : OK lenlist = 14 list = 329 1 0 10a ef7a6080 CamLisExeWAIt : OK contents of iosb : iosb.status = fffffff6 iosb.ret_length = 2 iosb.s_reg = f iosb.devinfo = 8000 80 contents of buffer : 0 5 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 onl50t[98]% onl50t[98]% camtest5c CamReaLIST : OK lenlist = 14 list = 329 1 0 10a ef7a6080 CamLisExeWAIt : OK contents of iosb : iosb.status = fffffff6 iosb.ret_length = 2 iosb.s_reg = f iosb.devinfo = 8000 80 contents of buffer : ff ffff 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 onl50t[99]% (3) Aレジスタへの 16ビットシングルアクション read onl50t[105]% cat camtest4single.asm ; File name : camtest4single.asm ; Creation date : July 1992 ; Author : Y.Yasu, Online group, Physics department, KEK SW equ 3 ; CAMAC SWITCH REGISTER MEM equ 4 ; CAMAC BUFFER MEMORY MOUDLE INT equ 5 ; CAMAC INTERRUPT REGISTER LEN equ 10 ; 10 words ; MOVE #1,A SETCRATE A SETCRATE #0 GENZ GENC SETI REMI ; ; READ (0,SW,1) ; READ.l (0,SW,1) READ (0,SW,1),A ; MOVE A,(PTR)+ ; READ.l (0,SW,1),A ; MOVE.l A,(PTR)+ ; WRITE #0x80081,(16,SW,0) ; WRITE.l #0x80082,(16,SW,0) ; WRITE A,(16,SW,0) ; WRITE.l A,(16,SW,0) ; STOP end onl50t[106]% onl50t[103]% camtest5c CamReaLIST : OK lenlist = 14 list = 329 1 0 10a ef7a6080 CamLisExeWAIt : OK contents of iosb : iosb.status = fffffff6 iosb.ret_length = 0 iosb.s_reg = f iosb.devinfo = 8000 80 contents of buffer : 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 onl50t[104]% スイッチレジスタには 0x5 がセットしてある。 camtest5c を実行すると camac データウェー上にはデータが正しく読み出される。 ok. Aレジスタに 読み込まれたデータはユーザバッファに送られていないので、アプリケーション プログラムには届かない。 ok. (4) 16ビット シングルアクション read & ユーザバッファへの書き出し onl50t[113]% cat camtest4single.asm ; File name : camtest4single.asm ; Creation date : July 1992 ; Author : Y.Yasu, Online group, Physics department, KEK SW equ 3 ; CAMAC SWITCH REGISTER MEM equ 4 ; CAMAC BUFFER MEMORY MOUDLE INT equ 5 ; CAMAC INTERRUPT REGISTER LEN equ 10 ; 10 words ; MOVE #1,A SETCRATE A SETCRATE #0 GENZ GENC SETI REMI ; ; READ (0,SW,1) ; READ.l (0,SW,1) READ (0,SW,1),A MOVE A,(PTR)+ ; READ.l (0,SW,1),A ; MOVE.l A,(PTR)+ ; WRITE #0x80081,(16,SW,0) ; WRITE.l #0x80082,(16,SW,0) ; WRITE A,(16,SW,0) ; WRITE.l A,(16,SW,0) ; STOP end onl50t[114]% onl50t[115]% camtest5c CamReaLIST : OK lenlist = 15 list = 329 1 0 10a ef7a6080 CamLisExeWAIt : OK contents of iosb : iosb.status = fffffff6 iosb.ret_length = 1 iosb.s_reg = f iosb.devinfo = 8000 80 contents of buffer : 5 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 onl50t[116]% onl50t[116]% camtest5c CamReaLIST : OK lenlist = 15 list = 329 1 0 10a ef7a6080 CamLisExeWAIt : OK contents of iosb : iosb.status = fffffff6 iosb.ret_length = 1 iosb.s_reg = f iosb.devinfo = 8000 80 contents of buffer : ffff 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 onl50t[117]% Aレジスタに読み込んだ16ビットcamacデータをユーザバッファに送っている。 アプリケーションプログラムでは正しく受け取れている。 (5) 24ビット シングルアクション read onl50t[121]% cat camtest4single.asm ; File name : camtest4single.asm ; Creation date : July 1992 ; Author : Y.Yasu, Online group, Physics department, KEK SW equ 3 ; CAMAC SWITCH REGISTER MEM equ 4 ; CAMAC BUFFER MEMORY MOUDLE INT equ 5 ; CAMAC INTERRUPT REGISTER LEN equ 10 ; 10 words ; MOVE #1,A SETCRATE A SETCRATE #0 GENZ GENC SETI REMI ; ; READ (0,SW,1) ; READ.l (0,SW,1) ; READ (0,SW,1),A ; MOVE A,(PTR)+ READ.l (0,SW,1),A ; MOVE.l A,(PTR)+ ; WRITE #0x80081,(16,SW,0) ; WRITE.l #0x80082,(16,SW,0) ; WRITE A,(16,SW,0) ; WRITE.l A,(16,SW,0) ; STOP end onl50t[122]% onl50t[123]% camtest5c CamReaLIST : OK lenlist = 14 list = 329 1 0 10a ef7a6080 CamLisExeWAIt : OK contents of iosb : iosb.status = fffffff6 iosb.ret_length = 0 iosb.s_reg = f iosb.devinfo = 8000 80 contents of buffer : 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 onl50t[124]% スイッチレジスタには 0x5 がセットしてある。 camtest5c を実行すると camac データウェー上にはデータが正しく読み出される。 ok. Aレジスタに 読み込まれたデータはユーザバッファに送られていないので、アプリケーション プログラムには届かない。 ok. (6) 24ビット シングルアクション read & ユーザバッファへの書き出し onl50t[128]% cat camtest4single.asm ; File name : camtest4single.asm ; Creation date : July 1992 ; Author : Y.Yasu, Online group, Physics department, KEK SW equ 3 ; CAMAC SWITCH REGISTER MEM equ 4 ; CAMAC BUFFER MEMORY MOUDLE INT equ 5 ; CAMAC INTERRUPT REGISTER LEN equ 10 ; 10 words ; MOVE #1,A SETCRATE A SETCRATE #0 GENZ GENC SETI REMI ; ; READ (0,SW,1) ; READ.l (0,SW,1) ; READ (0,SW,1),A ; MOVE A,(PTR)+ READ.l (0,SW,1),A MOVE.l A,(PTR)+ ; WRITE #0x80081,(16,SW,0) ; WRITE.l #0x80082,(16,SW,0) ; WRITE A,(16,SW,0) ; WRITE.l A,(16,SW,0) ; STOP end onl50t[129]% onl50t[130]% camtest5c CamReaLIST : OK lenlist = 15 list = 329 1 0 10a ef7a6080 CamLisExeWAIt : OK contents of iosb : iosb.status = fffffff6 iosb.ret_length = 2 iosb.s_reg = f iosb.devinfo = 8000 80 contents of buffer : 0 5 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 onl50t[131]% onl50t[131]% camtest5c CamReaLIST : OK lenlist = 15 list = 329 1 0 10a ef7a6080 CamLisExeWAIt : OK contents of iosb : iosb.status = fffffff6 iosb.ret_length = 2 iosb.s_reg = f iosb.devinfo = 8000 80 contents of buffer : ff ffff 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 onl50t[132]% Aレジスタに読み込んだ 24ビットcamacデータをユーザバッファに送っている。 アプリケーションプログラムでは正しく受け取れている。 (7) 16ビット シングルアクション write onl50t[138]% cat camtest4single.asm ; File name : camtest4single.asm ; Creation date : July 1992 ; Author : Y.Yasu, Online group, Physics department, KEK SW equ 3 ; CAMAC SWITCH REGISTER MEM equ 4 ; CAMAC BUFFER MEMORY MOUDLE INT equ 5 ; CAMAC INTERRUPT REGISTER LEN equ 10 ; 10 words ; MOVE #1,A SETCRATE A SETCRATE #0 GENZ GENC SETI REMI ; ; READ (0,SW,1) ; READ.l (0,SW,1) ; READ (0,SW,1),A ; MOVE A,(PTR)+ ; READ.l (0,SW,1),A ; MOVE.l A,(PTR)+ WRITE #0x80081,(16,SW,0) ; WRITE.l #0x80082,(16,SW,0) ; WRITE A,(16,SW,0) ; WRITE.l A,(16,SW,0) ; STOP end onl50t[139]% onl50t[136]% camtest5c CamReaLIST : OK lenlist = 15 list = 329 1 0 10a ef7a6080 CamLisExeWAIt : OK contents of iosb : iosb.status = fffffff6 iosb.ret_length = 0 iosb.s_reg = f iosb.devinfo = a000 a0 contents of buffer : 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 onl50t[137]% リストプログラムは 0x80081 の値を 16ビットcamac write で書いている。 camtest5c を実行すると、camacスイッチレジスタの LED は R1 と R8 の LED が点灯している。 16ビットcamac write で 24ビットデータを書こうとした ために上位 8ビット分のデータは無効にされ、下位 16ビット分のデータのみが 書かれている。 ok. write データを 0x5555 にして実行してみる。 onl50t[145]% cat camtest4single.asm ; File name : camtest4single.asm ; Creation date : July 1992 ; Author : Y.Yasu, Online group, Physics department, KEK SW equ 3 ; CAMAC SWITCH REGISTER MEM equ 4 ; CAMAC BUFFER MEMORY MOUDLE INT equ 5 ; CAMAC INTERRUPT REGISTER LEN equ 10 ; 10 words ; MOVE #1,A SETCRATE A SETCRATE #0 GENZ GENC SETI REMI ; ; READ (0,SW,1) ; READ.l (0,SW,1) ; READ (0,SW,1),A ; MOVE A,(PTR)+ ; READ.l (0,SW,1),A ; MOVE.l A,(PTR)+ WRITE #0x5555,(16,SW,0) ; WRITE #0x80081,(16,SW,0) ; WRITE.l #0x80082,(16,SW,0) ; WRITE A,(16,SW,0) ; WRITE.l A,(16,SW,0) ; STOP end onl50t[146]% onl50t[143]% camtest5c CamReaLIST : OK lenlist = 15 list = 329 1 0 10a ef7a6080 CamLisExeWAIt : OK contents of iosb : iosb.status = fffffff6 iosb.ret_length = 0 iosb.s_reg = f iosb.devinfo = a000 a0 contents of buffer : 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 onl50t[144]% ok. camac スイッチレジスタの LED で確認すると、指定した 0x5555 の値が 正しく書き込まれている。 write データを 0xffff にして実行してみる。 onl50t[153]% cat camtest4single.asm ; File name : camtest4single.asm ; Creation date : July 1992 ; Author : Y.Yasu, Online group, Physics department, KEK SW equ 3 ; CAMAC SWITCH REGISTER MEM equ 4 ; CAMAC BUFFER MEMORY MOUDLE INT equ 5 ; CAMAC INTERRUPT REGISTER LEN equ 10 ; 10 words ; MOVE #1,A SETCRATE A SETCRATE #0 GENZ GENC SETI REMI ; ; READ (0,SW,1) ; READ.l (0,SW,1) ; READ (0,SW,1),A ; MOVE A,(PTR)+ ; READ.l (0,SW,1),A ; MOVE.l A,(PTR)+ WRITE #0xffff,(16,SW,0) ; WRITE #0x80081,(16,SW,0) ; WRITE.l #0x80082,(16,SW,0) ; WRITE A,(16,SW,0) ; WRITE.l A,(16,SW,0) ; STOP end onl50t[154]% onl50t[151]% camtest5c CamReaLIST : OK lenlist = 15 list = 329 1 0 10a ef7a6080 CamLisExeWAIt : OK contents of iosb : iosb.status = fffffff6 iosb.ret_length = 0 iosb.s_reg = f iosb.devinfo = a000 a0 contents of buffer : 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 onl50t[152]% ok. camac スイッチレジスタの LED で確認すると、指定した 0xffff の値が 正しく書き込まれている。 (8) 24ビット シングルアクション write onl50t[164]% cat camtest4single.asm ; File name : camtest4single.asm ; Creation date : July 1992 ; Author : Y.Yasu, Online group, Physics department, KEK SW equ 3 ; CAMAC SWITCH REGISTER MEM equ 4 ; CAMAC BUFFER MEMORY MOUDLE INT equ 5 ; CAMAC INTERRUPT REGISTER LEN equ 10 ; 10 words ; MOVE #1,A SETCRATE A SETCRATE #0 GENZ GENC SETI REMI ; ; READ (0,SW,1) ; READ.l (0,SW,1) ; READ (0,SW,1),A ; MOVE A,(PTR)+ ; READ.l (0,SW,1),A ; MOVE.l A,(PTR)+ ; WRITE #0x5555,(16,SW,0) ; WRITE #0x80081,(16,SW,0) WRITE.l #0x80082,(16,SW,0) ; WRITE A,(16,SW,0) ; WRITE.l A,(16,SW,0) ; STOP end onl50t[165]% onl50t[166]% camtest5c CamReaLIST : OK lenlist = 16 list = 329 1 0 10a ef7a6080 CamLisExeWAIt : OK contents of iosb : iosb.status = fffffff6 iosb.ret_length = 0 iosb.s_reg = f iosb.devinfo = a000 a0 contents of buffer : 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 onl50t[167]% ok. camac スイッチレジスタの LED で確認すると、指定した 0x80082 の値が 正しく書き込まれている。 (9) Aレジスタから camacへの 16ビット シングルアクション write onl50t[173]% cat camtest4single.asm ; File name : camtest4single.asm ; Creation date : July 1992 ; Author : Y.Yasu, Online group, Physics department, KEK SW equ 3 ; CAMAC SWITCH REGISTER MEM equ 4 ; CAMAC BUFFER MEMORY MOUDLE INT equ 5 ; CAMAC INTERRUPT REGISTER LEN equ 10 ; 10 words ; MOVE #1,A SETCRATE A SETCRATE #0 GENZ GENC SETI REMI ; ; READ (0,SW,1) ; READ.l (0,SW,1) READ (0,SW,1),A ; MOVE A,(PTR)+ ; READ.l (0,SW,1),A ; MOVE.l A,(PTR)+ ; WRITE #0x5555,(16,SW,0) ; WRITE #0x80081,(16,SW,0) ; WRITE.l #0x80082,(16,SW,0) WRITE A,(16,SW,0) ; WRITE.l A,(16,SW,0) ; STOP end onl50t[174]% onl50t[175]% camtest5c CamReaLIST : OK lenlist = 16 list = 329 1 0 10a ef7a6080 CamLisExeWAIt : OK contents of iosb : iosb.status = fffffff6 iosb.ret_length = 0 iosb.s_reg = f iosb.devinfo = a000 a0 contents of buffer : 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 onl50t[176]% camacスイッチレジスタには 0x5 がセットしてある。 camtest5c を実行すると camacスイッチレジスタの LED は 0x5 の値が点灯する。 ok. camacスイッチレジスタに 0xffff をセットして再度 camtest5c を実行して みる。 onl50t[188]% camtest5c CamReaLIST : OK lenlist = 16 list = 329 1 0 10a ef7a6080 CamLisExeWAIt : OK contents of iosb : iosb.status = fffffff6 iosb.ret_length = 0 iosb.s_reg = f iosb.devinfo = a000 a0 contents of buffer : 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 onl50t[189]% ok. camacスイッチレジスタの LED は 0xffff の値が書き込まれてことを 示している。 (10) Aレジスタから camacへの 24ビット シングルアクション write onl50t[180]% cat camtest4single.asm ; File name : camtest4single.asm ; Creation date : July 1992 ; Author : Y.Yasu, Online group, Physics department, KEK SW equ 3 ; CAMAC SWITCH REGISTER MEM equ 4 ; CAMAC BUFFER MEMORY MOUDLE INT equ 5 ; CAMAC INTERRUPT REGISTER LEN equ 10 ; 10 words ; MOVE #1,A SETCRATE A SETCRATE #0 GENZ GENC SETI REMI ; ; READ (0,SW,1) ; READ.l (0,SW,1) ; READ (0,SW,1),A ; MOVE A,(PTR)+ READ.l (0,SW,1),A ; MOVE.l A,(PTR)+ ; WRITE #0x5555,(16,SW,0) ; WRITE #0x80081,(16,SW,0) ; WRITE.l #0x80082,(16,SW,0) ; WRITE A,(16,SW,0) WRITE.l A,(16,SW,0) ; STOP end onl50t[181]% onl50t[194]% camtest5c CamReaLIST : OK lenlist = 16 list = 329 1 0 10a ef7a6080 CamLisExeWAIt : OK contents of iosb : iosb.status = fffffff6 iosb.ret_length = 0 iosb.s_reg = f iosb.devinfo = a000 a0 contents of buffer : 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 onl50t[195]% camacスイッチレジスタには 0x555555 がセットしてある。 camtest5c を実行 するとcamacスイッチレジスタの LED は 0x555555 の値が点灯する。 ok. camacスイッチレジスタに 0xffffff をセットして再度 camtest5c を実行して みる。 onl50t[183]% camtest5c CamReaLIST : OK lenlist = 16 list = 329 1 0 10a ef7a6080 CamLisExeWAIt : OK contents of iosb : iosb.status = fffffff6 iosb.ret_length = 0 iosb.s_reg = f iosb.devinfo = a000 a0 contents of buffer : 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 onl50t[184]% ok. camacスイッチレジスタの LED は 0xffffff の値が書き込まれてことを 示している。 (4-5). camtest5c1 をコンパイル & 実行 (LAM 割り込み処理) オリジナルの camtest4int.asm では camacインタラプトレジスタを使うように なっている。 しかし、私が実行したところでは camacインタラプトレジスタに camacコマンドを実行したところで No-Q のエラーになってうまく実行でき なかった。 そこで LAM 割り込みは SWレジスタからかけるように変更して テストした。 onl50t[64]% vi camtest4int.asm : MOVE.l #1000,T ; NDT (26,INT,0) NDT (26,SW,0) LOOPIN1 WAITINT ; GENC ; NDT (9,INT,0) NDT (9,SW,0) MOVE.l T,A : onl50t[65]% onl50t[66]% vi camtest5c1.c : /* strcpy(Filename, "camtest4.obj"); */ strcpy(Filename, "camtest4int.obj"); /* strcpy(Filename, "camtest4single.obj"); */ /* strcpy(Filename, "camtest4dma.obj"); */ if (argc > 1) : onl50t[67]% onl50t[132]% camtest5c1 CamReaLIST : OK lenlist = 52 list = 20b 0 10c 10d ef7a6080 CamLisExeWAIt : OK contents of iosb : iosb.status = fffffff6 iosb.ret_length = 8 iosb.s_reg = f iosb.devinfo = a000 a0 contents of buffer : 0 3e8 0 2 0 7d0 0 6 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 onl50t[133]% onl50t[133]% onl50t[133]% onl50t[133]% camtest5c1 CamReaLIST : OK lenlist = 52 list = 20b 0 10c 10d ef7a6080 CamLisExeWAIt : OK contents of iosb : iosb.status = fffffff6 iosb.ret_length = 8 iosb.s_reg = f iosb.devinfo = a000 a0 contents of buffer : 0 7d0 0 2 0 bb8 0 6 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 onl50t[134]% onl50t[134]% onl50t[134]% onl50t[134]% camtest5c1 CamReaLIST : OK lenlist = 52 list = 20b 0 10c 10d ef7a6080 CamLisExeWAIt : OK contents of iosb : iosb.status = fffffff6 iosb.ret_length = 8 iosb.s_reg = f iosb.devinfo = a000 a0 contents of buffer : 0 bb8 0 2 0 fa0 0 6 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 onl50t[135]% onl50t[135]% onl50t[135]% onl50t[135]% camtest5c1 CamReaLIST : OK lenlist = 52 list = 20b 0 10c 10d ef7a6080 CamLisExeWAIt : OK contents of iosb : iosb.status = fffffff6 iosb.ret_length = 8 iosb.s_reg = f iosb.devinfo = a000 a0 contents of buffer : 0 fa0 0 2 0 1388 0 6 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 onl50t[136]% CAMAC device driver V1.4x, 1991-1993 by Y.TAKEUCHI (T.I.T.) cc0 at vme0: vme16d16 0xff00 VME level 4 vector 0xff sparc ipl 7 vmeplus0 at vme0: vme16d16 0x0 and vme24d16 0x0 and vme32d16 0x0 and vme16d32 0x 0 and vme24d32 0x0 and vme32d32 0x0 and space 0x2f offset 0x0 and space 0x6f offset 0x0 and space 0x10 offset 0x0 and space 0x11 offset 0x0 and space 0x50 offset 0x0 and space 0x51 offset 0x0 vmedma0 at vme0 vmefdma0 at vme0 vmedvma0 at vme0 vmectl0 at vme0 ok. 正常に実行できた。 !!!! DMA のテスト後に再度 LAM割り込み処理を実行したら、今度は "list timeout" のエラーになってしまった。 とても、不安定。 camacドライバプログラムを チェックし直す必要あり。 onl50t[190]% camtest5c1 CamReaLIST : OK lenlist = 35 list = 20b 0 10c 10d ef7a6080 CamLisExeWAIt : OK contents of iosb : iosb.status = fffffff5 iosb.ret_length = 0 iosb.s_reg = f iosb.devinfo = a000 a0 contents of buffer : 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 onl50t[191]% (4-6). camtest5c2 をコンパイル & 実行 (DMA) (1). 1回目の実行 onl50t[153]% camtest5c2 CamReaLIST : OK lenlist = 76 list = 20b 0 10c 10d ef7a6080 CamLisExeWAIt : OK contents of iosb : iosb.status = fffffff6 iosb.ret_length = 48 iosb.s_reg = f iosb.devinfo = 800 080 contents of buffer : ff00 5 ff00 5 ff00 5 ff00 0 ff00 5 ff00 5 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 onl50t[154]% onl50t[154]% CAMAC device driver V1.4x, 1991-1993 by Y.TAKEUCHI (T.I.T.) cc0 at vme0: vme16d16 0xff00 VME level 4 vector 0xff sparc ipl 7 vmeplus0 at vme0: vme16d16 0x0 and vme24d16 0x0 and vme32d16 0x0 and vme16d32 0x 0 and vme24d32 0x0 and vme32d32 0x0 and space 0x2f offset 0x0 and space 0x6f offset 0x0 and space 0x10 offset 0x0 and space 0x11 offset 0x0 and space 0x50 offset 0x0 and space 0x51 offset 0x0 vmedma0 at vme0 vmefdma0 at vme0 vmedvma0 at vme0 vmectl0 at vme0 ok. 正常に実行できた。 (2). 2回目の実行 onl50t[154]% camtest5c2 CamReaLIST : OK lenlist = 76 list = 20b 0 10c 10d ef7a6080 CamLisExeWAIt : OK contents of iosb : iosb.status = fffffff6 iosb.ret_length = 48 iosb.s_reg = f iosb.devinfo = 800 080 contents of buffer : ff00 5 ff00 5 ff00 5 ff00 0 ff00 5 ff00 5 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 onl50t[155]% onl50t[155]% (3). 3回目の実行 onl50t[155]% camtest5c2 CamReaLIST : OK lenlist = 76 list = 20b 0 10c 10d ef7a6080 CamLisExeWAIt : OK contents of iosb : iosb.status = fffffff6 iosb.ret_length = 48 iosb.s_reg = f iosb.devinfo = 800 080 contents of buffer : ff00 5 ff00 5 ff00 5 ff00 0 ff00 5 ff00 5 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 onl50t[156]% onl50t[156]% (4). 4回目の実行 onl50t[156]% camtest5c2 CamReaLIST : OK lenlist = 76 list = 20b 0 10c 10d ef7a6080 CamLisExeWAIt : OK contents of iosb : iosb.status = fffffff6 iosb.ret_length = 48 iosb.s_reg = f iosb.devinfo = 800 080 contents of buffer : ff00 5 ff00 5 ff00 5 ff00 0 ff00 5 ff00 5 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 onl50t[157]% ここまでのリスト処理の例題プログラムの実行結果から言えることは、 (1). シングルアクション read/write は、正しくデータの受け渡しが行われて いて、まともそうな動作をしている。 しかし、iosb.status は "-10" の "LIST STOP" が返されている。 camacドライバのチェックの必要あり。 (2). LAM割り込み処理は例題プログラムを正しく実行できていない。 camacドライバのデバッグの必要あり。 (3). DMAブロック転送 read/write は正しくデータの受け渡しが行われていて まともそうな動作をしている。 しかし、iosb.status は "-10" の "LIST STOP" が返されている。 camacドライバのチェックの必要あり。 ---xxxx ここまでやった(継続中) --- (6). 項目タイトル (6-1). サブ項目タイトル (6-1-1). サブサブ項目タイトル