MPV
概要はここ→ https://openit.kek.jp/workshop/2020/dsys/presentation/mpv20201130_baba.pdf
I/O
Firmwareによって異なるが, 一般的に使われているMPVのI/Oは次.
MOCO
1台のMPVにつき, MOCOは6台まで読める. MOCOのIDは下から順番に 0, 1, ..., 5 .
MOCOに接続するVMEモジュールは base address を 0x0000
に設定する必要がある.
MPVCTRL
mpv
にログイン後, mpvctrl
というコマンドでmocoに接続されたモジュールと通信できる.
ssh root@mpv
単に mpvctrl
と叩けば, helpが表示される.
root@mpv22:~# mpvctrl
mpvctrl COM [params] ...
COM = status : Read status
enable : Enable MOCO (moco0--moco5, ts, none)
busy : Enable busy member (moco0--moco5, none)
trigger : Set Trigger (in0-in1, clk1k, clk10k, none)
nout0 : NIM Out 0 (eob, busy, ungated, gated, pulse, level, clk10k, debug0--3, clk100m, mbusy0--5, int25m, ext25m)
nout1 : NIM Out 1 (eob, busy, ungated, gated, pulse, level, clk10k, debug0--3, clk100m, mbusy0--5, int25m, ext25m)
nout2 : NIM Out 2 (eob, busy, ungated, gated, pulse, level, clk10k, debug0--3, clk100m, mbusy0--5, int25m, ext25m)
nout3 : NIM Out 3 (eob, busy, ungated, gated, pulse, level, clk10k, debug0--3, clk100m, mbusy0--5, int25m, ext25m)
level : Level output (0x0X)
pulse : Pulse output (0x0X)
start : Start Run (default is common trigger, [notrg] = w/o trigger)
stop : Stop Run
reset : Reset Run (when Start Run, reset is automatically issued)
softtrg : Software trigger (moco0--moco5)
com : Issue command frame (moco0--moco5)
frame : set command frame for moco by raw values (moco0--moco5, 0xXXXXXXXX x 3)
latest : see latest data from moco (moco0--moco5)
vread : VME read (moco0--moco5, D16/D32 AM Addr)
vwrite : VME write (moco0--moco5, D16/D32 AM Addr Value)
vcont : set VME DAQ continuous readout mode (moco0--moco5, IRQ/TRG/DUMMY CNT D16/D32 AM Addr)
rread : RAW read (moco0--moco5, 0xXXXXXXXX 0xXXXXXXXX 0xXXXXXXXX)
rwrite : RAW write (moco0--moco5, 0xXXXXXXXX 0xXXXXXXXX 0xXXXXXXXX)
mocorst : reset moco (moco0--moco5)
mocotimer : set timerwait for moco (moco0--moco5 TIME (20ns step, < 65535, 0=disable))
mocovc : Enable/disable variable count read (to disable, AM=NONE) (moco0--moco5, D16/D32 AM Addr Mask)
mocoiack : Enable/disable Iack response (moco0--moco5, enable/disable)
mocopr0 : Set Pre0 command (to disable, AM=NONE) (moco0--moco5, R/W D16/D32 AM Addr [Value])
mocopr1 : Set Pre1 command (to disable, AM=NONE) (moco0--moco5, R/W D16/D32 AM Addr [Value])
mocops0 : Set Post0 command (to disable, AM=NONE) (moco0--moco5, R/W D16/D32 AM Addr [Value])
mocops1 : Set Post1 command (to disable, AM=NONE) (moco0--moco5, R/W D16/D32 AM Addr [Value])
v1x90 : for V1190/V1290 OPCODE (moco0--moco5, QN/QR/QW OPCode [nR]/[Val] [Val] ...)
scaler : see scaler values
currentts : check current TS value (upper 32bit)
babiscr : send scaler values to babildes
test : Send test command to available MOCOs
user : Send user command to all MOCOs
busystat : see Busy status
debug : for debug puporse (value)
help : Help
for command frame
RST : Reset MOCO
IRQ : IRQ driven mode
TRG : Trigger driven mode
DUMMY : Dummy command
D16/D32 : D16/D32 mode
R/W : Read or Write
CNT : Maximum number of readout data
AM : AM code (A16, A24, A24BLT, A32, A32BLT, A24INC <= address increment mode, NONE)
Addr : VME Address (only lower 24bit)
Value : Value to be written (only for Write mode)
例:
mpvctrl vread moco<N> D32 A24 0x0018
mpvctrl vwrite moco<N> D32 A24 0x0000 0xffffffff
MAC Address
devtool/findbiid
を使う方法
MPVをLANに接続して, 同一LANに存在するマシンで babirl/devtool/findbiid
を実行する.
./findbiid
------------------
BIID = bbdaqsrv
IP = 0.0.0.0
MAC = 00:00:00:00:00:00
Host = onokoro22.gen
------------------
------------------
BIID = bbdaqsrv
IP = 0.0.0.0
MAC = 00:00:00:00:00:00
Host = onokoro00.gen
------------------
------------------
BIID = bbdaqsrv
IP = 172.27.220.180
MAC = 84:47:09:14:48:25
Host = onokoro03.gen
------------------
シリアルポート経由でログインする方法
screen /dev/tty.usbserial-AB0M7NK1 115200
mpv22 login: root
Password:
baud rate = 115200
を指定しないと, うまくいかない.
ログインできたら ifconfig
でMACアドレスをチェック.
root@mpv22:~# ifconfig