amc13_control.py Documentation
Notes
- The primary purpose of this AMC13 python tool is to talk to the board and carry out simple debugging procedures. However, newer versions of the software also contain the ability to read events from the event buffer and dump them to a file, making the python software a functional backup to the much-more-well-developed C++ sofware.
- All Flash functions will be found in
p_flash.py
, not in amc13_control.py
. For more information on how to program the Flash Memory using the python software, visit the p_flash page.
Operation
To run
amc13_control.py
, you must have the PyChips libraries installed, and your computer must run Python 2.4 or greater. The executable is initialized via the
python
incantation:
$ python amc13_contol.py
Functionality
-
'I <in_list> (d) (f) (t)'
: initialize the AMC13 and enable 'RunMode'
-
'<in_list>'
is the comma/space/hyphen separated list of AMC inputs to be enabled (e.g. 0,1 3-5 = 0,1,3,4,5)
-
'(d)'
enables the 'DAQLink' bit on register 'CONTROL1'
-
'(f)'
enables the 'FakeDataGeneration' bit on register 'CONTROL1'
-
'(t)'
enables the 'TTCrxCommands' bit on register 'CONTROL1'
-
'Z'
: zero all counters on BOTH chips
-
'RE'
: reset current chip
-
'S <level>'
: display AMC13 status
-
'<level>'
specifies the level of detail to be shown in the status display (0 for the least detail, 2 for the most, default to 1)
-
'D <file> <nevt>'
: dump a specified number of events to a file
-
'<file>'
is the file to which the events will be dumped
-
'<nevt>'
is the number of events to be dumped to the file (default to reading 10000 events or until the end of the buffer is reached)
-
'R <addr> <count>'
: read from current chip
-
'RB <addr> <count>'
: block read from current chip
-
'<addr>'
is the starting address of the block read
-
'[count]'
is the number of address to be read from the block (default to 1)
-
'RF <addr> [count]'
: FIFO read from the current chip
-
'<addr>'
is the address to be FIFO read
-
'<count>'
is the number of reads to be carried out at <add>
(default to 1)
-
'W <addr> <data> <count>'
: write to current chip
-
'WB <addr> [<data_list>]'
: block write to current chip
-
'<addr>'
is the starting address of the block write
-
'[<data_list>]'
is the comma/space/hyphen separated list of data to be written
- e.g.
Type command (h for menu): wb CONTROL0 0,1 3-5
Block writing Virtex chip, address 'CONTROL0' from offset 0x0 to offset 0x4:
AddOff Values
00000000: 00000000
00000001: 00000001
00000002: 00000003
00000003: 00000004
00000004: 00000005
-
'WF <addr> [<data_list>]'
: FIFO write to an address on current chip
-
'FV'
: display the firmware versions of BOTH chips
-
'T1'
: change 'current' chip to Virtex
-
'T2'
: change 'current' chip to Spartan
-
'q'
: exit the program
--
CharlieHill - 17 Sep 2012