-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup_new.sh
More file actions
83 lines (57 loc) · 1.67 KB
/
setup_new.sh
File metadata and controls
83 lines (57 loc) · 1.67 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
#----------------------------------------------------------------------------
#initialize things
export DTCLIB_DTC=0
export TRACE_FILE=/proc/trace/buffer
export TRACE_FILE=/tmp/trace_buffer_root
source /mu2e/ups/setup
setup pcie_linux_kernel_module v2_03_00 -qe19:s96:prof
source $PCIE_LINUX_KERNEL_MODULE_FQ_DIR/bin/Setup_DTC.sh
#configure JA
source /home/kwar/dtc/JAConfig.sh
sleep 5
source /home/kwar/dtc/loadEventTable2.sh
#set number of null heartbeats
my_cntl write 0x91BC 0x10
#set emulator event mode bits (for non-null heartbeats)
my_cntl write 0x91c0 0xffffffff
my_cntl write 0x91c4 0xffffffff
#set DDR write response timer
my_cntl write 0x9180 0xffffffff
#set control register
my_cntl write 0x9100 0x00808404
### remove?
#enable markers
#my_cntl write 0x91f8 0x00003f3f
#enable tx and rx
#my_cntl write 0x9114 0x00007f7f
# Send data
#enable event marker
#my_cntl write 0x91f0 0x4e20
#enable heartbeats
#my_cntl write 0x91a8 0x4e20
#set num dtcs
#my_cntl write 0x9158 0x1
#set ROC data timeout
# ~52us
#my_cntl write 0x9188 0x00002000
# ~160us
#my_cntl write 0x9188 0x00006000
# ~320us
#my_cntl write 0x9188 0x0000c000
# ~640us
my_cntl write 0x9188 0x00018000
# enable punched clock
my_cntl write 0x9100 0x00808604
#read ja lock bits
#my_cntl read 0x9308
#enable free running null markers
#my_cntl write 0x91bc 0x0
#initialization complete
#-------------------------------------------------------------------------
# ROC response timer for link 0
#read ROC response timer fifo for link 0
#my_cntl read 0x9460
#reset ROC response timer fifo for link 0
#my_cntl write 0x9460 0x0
#---------------------------------------------------------------------------
#Want to see some data?