Difference between revisions of "Mce cmd"
Line 63: | Line 63: | ||
rb rc1 adc_offset0 | rb rc1 adc_offset0 | ||
Line 2 : ok : 0 1 2 8 100 200 14 15 | Line 2 : ok : 0 1 2 8 100 200 14 15 | ||
+ | Please note that WRA and RRA are not more efficient than WB and RB. | ||
+ | MAS translates WRA and RRA into the equivalent set of WB and RB | ||
+ | commands, and not the other way around. | ||
+ | |||
+ | |||
+ | = Output formatting = | ||
+ | |||
+ | The output consists of two or three parts, separated by colons. The | ||
+ | first part is of the form "Line <n>" with <n> an integer that | ||
+ | represents a running counter of lines entered into mce_cmd. This is | ||
+ | useful for debugging MCE scripts. The second part of the output will | ||
+ | either be the word "ok" or the word "error", indicating the success or | ||
+ | failure of the command. The third part is displayed only if a read | ||
+ | command succeeded, or if any command causes error. |
Revision as of 14:58, 5 March 2008
Contents
Read and write commands
MCE configuration data is stored in blocks at certain card and parameter addresses (which we will call "block locations". The data block consists of one or more 32-bit words.
The most basic data manipulation commands are RB ("read block") and WB ("write block"). These commands read and write to the entire range of data at the block location, starting at the beginning of the block.
The commands RRA ("read range") and WRA ("write range") can be used to read or write particular subranges of the data in a block location.
All read and write commands take a card (or virtual card) name and a parameter name as the first two arguments. Physical cards are associated with particular hardware elements in the system, for example "cc" (clock card) and "rc2" (readout card). Virtual cards are used to group a set of hardware functions into a single name-space. The data associated with a virtual card parameter may be shared across multiple hardware cards. Parameters accessible via virtual mappings are also accessible via some set of hardware card addresses.
Syntax summary
rb <card> <param> rra <card> <param> <starting index> <count> wb <card> <param> [data, ...] wra <card> <param> <starting index> [data, ...]
RB command
RB will return all data associated with the block location.
rb rc1 adc_offset0 Line 1 : ok : 10 11 9 8 12 13 14 15
RRA command
The RRA command returns only the subset of the data that were asked for.
rra rc1 adc_offset0 2 4 Line 1 : ok : 9 8 12 13
WB command
The WB command will update words in the block location. If the number of data words given as arguments to the WB command is smaller than the natural size of the block location, only those first few data locations will be updated. e.g.,
wb rc1 adc_offset0 0 1 2 Line 1 : ok rb rc1 adc_offset0 Line 2 : ok : 0 1 2 8 12 13 14 15
WRA command
The WRA command updates words starting at the specified index.
wra rc1 adc_offset0 4 100 200 Line 1 : ok rb rc1 adc_offset0 Line 2 : ok : 0 1 2 8 100 200 14 15
Please note that WRA and RRA are not more efficient than WB and RB. MAS translates WRA and RRA into the equivalent set of WB and RB commands, and not the other way around.
Output formatting
The output consists of two or three parts, separated by colons. The first part is of the form "Line <n>" with <n> an integer that represents a running counter of lines entered into mce_cmd. This is useful for debugging MCE scripts. The second part of the output will either be the word "ok" or the word "error", indicating the success or failure of the command. The third part is displayed only if a read command succeeded, or if any command causes error.