ZPD test library examples
Load the ZPD test library
The libraries are loaded with a script that unloads any old libraries, loads
the new libraries, and then makes a map of which boards are in the crate
(it can also autodetect TSFs).
-> < /detector/trg/zpd/zpdlib
unld odfPath("app/teststand/bailey/libL1ZpdCommon.o",odfScratchBuffer)
value = 0 = 0x0
unld odfPath("app/teststand/bailey/libdodah.o",odfScratchBuffer)
value = 0 = 0x0
ld 0,0,odfPath("app/teststand/bailey/libL1ZpdCommon.o",odfScratchBuffer)
value = 10752608 = 0xa41260
ld 0,0,odfPath("app/teststand/bailey/libdodah.o",odfScratchBuffer)
value = 10751952 = 0xa40fd0
makemap
slot mask crate map
0 1 zpd zpd 0
1 2 -- --
2 4 zpd zpd 1
3 8 -- --
4 10 zpd zpd 2
5 20 -- --
6 40 zpd zpd 3
7 80 -- --
8 100 zpd zpd 4
9 200 -- --
10 400 zpd zpd 5
11 800 -- --
12 1000 zpd zpd 6
13 2000 -- --
14 4000 zpd zpd 7
15 8000 -- --
value = 0 = 0x0
Memory access commands
Set the slot and block first, and then you can read and write
16 and 32 bit memories quite easily.
-> slot 2
value = 2 = 0x2
-> setblock 1
value = 0 = 0x0
-> clr 0x4000,32
value = 0 = 0x0
-> r16 0x4000,32
4000 0 0 0 0 0 0 0 0
4008 0 0 0 0 0 0 0 0
4010 0 0 0 0 0 0 0 0
4018 0 0 0 0 0 0 0 0
value = 0 = 0x0
-> w16 0x4000,0xcafe; w16 0x4001,0xf00d
value = 0 = 0x0
value = 0 = 0x0
-> r16 0x4000,8
4000 cafe f00d 0 0 0 0 0 0
value = 0 = 0x0
-> wb16 0x4000,8,0,1,2,3,4,5,6,7
value = 0 = 0x0
-> r16 0x4000,8
4000 0 1 2 3 4 5 6 7
value = 0 = 0x0
-> setblock 2
value = 0 = 0x0
-> r32 0xc000,32
c000 7ff07ff 7ff07ff 7ff07ff fe72febb fe6cfebb fe67febb fe62febb fe5cfebb
c008 fe57febb fe52febb fe4dfebb fe47febb fe42febb fe3dfebb fe38febb fe33febb
c010 fe2efebb fe29febb fe23febb fe1efebb 7ff07ff 7ff07ff 7ff07ff 7ff07ff
c018 7ff07ff 7ff07ff 7ff07ff 7ff07ff 7ff07ff 7ff07ff 7ff07ff 7ff07ff
c020
value = 0 = 0x0
Diagnostic Memory Control
Diagnostic memories are controled with simple commands. The only pain
is figuring out which bit mask to write to CSR3 to enable the memories.
The GUI is better than a command line for that...
-> enablemem 0x13
value = 0 = 0x0
-> setonce 1
value = 0 = 0x0
-> setrun 1
value = 0 = 0x0
-> startmem
value = 0 = 0x0
-> setrun 0
value = 0 = 0x0
-> gomem
value = 0 = 0x0
gomem is a shortcut for
setrun 1; startmem; setrun 0.
Simple tests
memtest could be done on any boardtype;
the other tests are ZPD specific and will have printouts if there are any errors.
-> slot 4
value = 4 = 0x4
-> setblock 2
value = 0 = 0x0
-> memtest 0x4000,160
memtest : 0 mismatches seen
value = 0 = 0x0
-> diagmemtest
value = 0 = 0x0
-> megabustest
value = 0 = 0x0
-> frbustest
value = 0 = 0x0
-> algotest
value = 0 = 0x0
Change the board to slot mapping
Some tests need to know which boards are in which slots.
The easiest way to do this is with
makemap, which will create a
reasonable default mapping for you. You can also load a map file
or add individual boards to specific slots.
checkmap will print a comparison
of what is in your map and what is in the crate.
-> ldmap "zcrate.map"
value = 0 = 0x0
-> printmap
# format: board num crate slot
#
# +--------num
# | +-----crate
# | | +--slot
# V V V
zpd 2 0 3
value = 1903156 = 0x1d0a34 = cout
-> checkmap
slot mask crate map
0 1 zpd -- !!!
1 2 -- --
2 4 zpd -- !!!
3 8 -- zpd 2 !!!
4 10 zpd -- !!!
5 20 -- --
6 40 zpd -- !!!
7 80 -- --
8 100 zpd -- !!!
9 200 -- --
10 400 zpd -- !!!
11 800 -- --
12 1000 zpd -- !!!
13 2000 -- --
14 4000 zpd -- !!!
15 8000 -- --
value = 0 = 0x0
-> clearmap; mapAddZpd 4,0; mapAddZpd 5,2; mapAddTsfx 4,10; mapAddTsfy 2,11
value = 0 = 0x0
value = 0 = 0x0
value = 0 = 0x0
value = 0 = 0x0
value = 0 = 0x0
-> checkmap
slot mask crate map
0 1 zpd zpd 4
1 2 -- --
2 4 zpd zpd 5
3 8 -- --
4 10 zpd -- !!!
5 20 -- --
6 40 zpd -- !!!
7 80 -- --
8 100 zpd -- !!!
9 200 -- --
10 400 zpd tsfx 4 !!!
11 800 -- tsfy 2 !!!
12 1000 zpd -- !!!
13 2000 -- --
14 4000 zpd -- !!!
15 8000 -- --
value = 0 = 0x0
-> makemap
slot mask crate map
0 1 zpd zpd 0
1 2 -- --
2 4 zpd zpd 1
3 8 -- --
4 10 zpd zpd 2
5 20 -- --
6 40 zpd zpd 3
7 80 -- --
8 100 zpd zpd 4
9 200 -- --
10 400 zpd zpd 5
11 800 -- --
12 1000 zpd zpd 6
13 2000 -- --
14 4000 zpd zpd 7
15 8000 -- --
value = 0 = 0x0
|