!------------------------------------------------------------------------------ ! This file holds a list of VMESCL Serial IO requests ! Comments start with an exclamation mark ("!") anywhere on a line. ! See end of file for more syntax information. !------------------------------------------------------------------------------ ! Revision: 19-May-2006 ! This file is a template ! and list of the syntax rules for Register IO Command Files Module: 0 Chip: 1 Group: 2 Serial_Address: 3 Serial_Data_Write: 4 Serial_Address: 5 Serial_Data_Write: 6 Group: 8 Serial_Address: 13 Serial_Data_Write: 14 Serial_Data_Write: 16 Module: 0 Chip: 1 Group: 2 Serial_Address_Read: 10 Serial_Address_Read: 11 Call_File: /users/default/another.sio !------------------------------------------------------------------------------ ! 19-May-2006 ! * Recommended file extension is ".SIO" (but not required). ! ! Syntax rules: ! ! - Blank lines are ignored. ! ! - Comments start after an exclamation mark ("!") anywhere on a line. ! ! * Recognized Keywords are (with colon required) ! ! Module: (Module Number; Range 0-8; TAB=0-7 or GAB=8) ! Chip: (FPGA Number; Range 0-15) ! Group: (Group Number; Range 0-15) ! Serial_Address: (Serial_Address to use for next Write; Range 0-0xffff) ! Serial_Data_Write: (Value to write in specified register; Range 0-0xffff) ! Serial_Address_Read:(Serial_Address to read from; Range 0-0xffff) ! ! Call_File: (Recursive call to another file) ! MilliSecond_Sleep: (Suspend execution of the command file) ! ! - Keywords are NOT case-sensitive. ! ! - Each Keyword must be followed by one and only one positive integer Value ! (with the exception of the Call_File Keyword using a character string) ! ! - One or more Keyword/Value pair may appear on the same line. ! ! - a Keyword and its matching Value may be separated by any number of spaces, ! and/or Tabs, but must appear on the same line. ! ! - Successive Keyword/Value pairs may be separated by any number of spaces, ! Tabs and/or Carriage_Returns (blank lines), or comments. ! ! * A Register will be accessed when and only when the "Serial_Data_Write", ! or the "Serial_Address_Read" Keyword is encountered. ! ! - All other Register Address Keywords ("Module", "Chip", "Group", ! and "Serial_Address") must have been specified before a ! "Serial_Data_Write" Keyword may be specified. ! ! - All other Register Address Keywords ("Module", "Chip", and "Group") ! must have been specified before a "Serial_Address_Read" Keyword may ! be specified. ! ! * The "Serial_Data_Write" keyword causes the specified register ! to be written with the specified value by calling ! int vmescl_write_serial (unsigned long module, ! unsigned long chip, ! unsigned long group, ! unsigned long seradr, ! unsigned long serdat); ! ! * The "Serial_Address_Read" keyword causes the specified register to be ! read, and the value read is reported using ! int vmescl_read_serial (unsigned long module, ! unsigned long chip, ! unsigned long group, ! unsigned long seradr, ! unsigned long serdat, ! unsigned long *value); ! note: the parameter passed for serdat will be the last value specified ! for Serial_Data_Write, or will be undefined if none was yet specified. ! ! * The "Serial_Address_Read" keyword also updates the "Serial_Address" ! context, so that a Serial_Data_Write keyword appearing right ! after a Serial_Address_Read keyword will write to the Serial Address ! that was just read. ! ! - The "Serial_Data_Write" specifies the Data to Write. This value may be ! specified in Decimal (e.g. 15), Hexadecimal (e.g. 0xff), ! or Binary (.e.g. 0b1111). In fact any keyword value can be specified ! in Decimal, Hexadecimal, or Binary. ! ! - Decimal, Hex, and Binary values may use commas to help readability. ! These commas will be removed during parsing (e.g. 0b,1000,0100,0111,0000). ! No spaces are allowed within any Value string. ! ! - Keyword/Values specified for a previous Register Address are still active ! for subsequent Register Selection until they are explicitly overwritten. ! ! - The "MilliSecond_Sleep:" Keyword causes the execution of the command file ! to be suspended for the number of milliseconds specified in the associated ! value (integer values only). ! ! - The "Call_File" Keyword causes a recursive call to read the specified file. ! ! - Full local Keyword/Value context present before the Call_File Keyword ! is still valid after. i.e. Context changes made in the Called file are ! NOT propagated back to the Calling file. ! ! - The syntax rules within a called file are the same as described here. ! The local Keyword/Value context present before the Call_File Keyword ! is imported into the Called File. i.e. You can define some Keyword Values ! in the Calling File which will be valid inside the Called File. !------------------------------------------------------------------------------ ! - Symbol usage in command files: ! ! Symbols may be defined and used in command files. ! A symbol name must start with a dollar sign "$". ! ! A symbol is defined by giving it a numeric value. ! A symbol is defined using a Keyword/Value syntax where the Keyword is ! the symbol's name, starting with its own dollar sign but with an additional ! equal character appended to the end of the symbol name, while the value ! is the desired symbol value. ! e.g. To define a symbol named "$Slot_AONM" and give it a value "5" ! enter the following: ! $Slot_AONM= 5 ! The equal sign "=" is required and must appear directly after the last ! character of the symbol name, with no space or tab in-between. ! Any number of spaces, or tabs may appear between the symbol definition and ! its value, but the symbol and its value must appear on the same line. ! Previously defined symbols can be re-defined to change their value. ! Previously defined symbols cannot be un-defined. ! ! A symbol may be used anywhere a value is required, i.e. in any Keyword/Value ! pair and the symbol value will be substituted. e.g. ! Slot: $Slot_AONM ! A symbol must have been defined before it can be used. ! There are no predefined symbols. ! Symbols are NOT case sensitive. ! Symbol names may include any alpha numeric characters (e.g. _[(}./$< ), ! (but no space, tabs, or end of line). For clarity one should avoid ! using embedded quotation marks, equal signs, colon. ! A symbol value may be used to define another new symbol. ! ! All symbols defined before a "Call_File" Keyword are propagated into ! the Called File. i.e. You can define symbols in the Calling File ! and use those symbols (or modify them) inside the Called File. ! Symbols created or modified inside a Called File are NOT propagated ! back to the Calling file. !------------------------------------------------------------------------------