TWiki> Main Web>AmsTracker>DaqSpecial (revision 17)EditAttachPDF

Special Operations

How to directly command a JINF/TDR:

  • Go to ~/TrackerUser/AMSWireCommands/ of the "tracker" user
    here you can find the program TESTjmdc
    this is a program that let talk to JINJ boards and to all the nodes after it
    that uses the slowconf.conf file for the HRDL settings

    The syntax for this program is:
    ./TESTjmdc port amsw_node cmd arg1 arg2 ...
    • port
    • amsw_node is the address (in AMSWire scheme, NOT in JMDC scheme!!! You can refer to the table below...) of the node you want talk to:
      Node address examples:
      JINJ-itself = ffff
      JINF-T0 = 033f
      TDR-0-00-A (T0 TDR00) = 003f033f
      TDR-4-10-B (T4 TDR21) = 153f103f
      AllTDR-7 = 4000173f
    • cmd is the command to send to the node (from Kounine document)
      Examples of Command (from Kounine document):
      Read Status: C [no pars]
      Read Flash: 7 [no pars]
      Read last Event Number: 2 [no pars]
    • args are the parameters you want to pass to cmd
      you can pass how many args (command's parameters) you need
    • numbers must be written in hex
          JINJ   JMDC  
X Y Z OCT Crate ADDR NUM A B P S  
+ WAKE + 1 T0 0x033f 03 0xA6 0xA7 0xA8 0xA9  
- WAKE + 2 T1 0x093f 09 0xAA 0xAB 0xAC 0xAD  
- RAM + 4 T2 0x003f 00 0xAE 0xAF 0xB0 0xB1  
+ RAM + 3 T3 0x013f 01 0xB2 0xB3 0xB4 0xB5  
+ WAKE - 5 T4 0x103f 16 0xB6 0xB7 0xB8 0xB9  
- WAKE - 6 T5 0x113f 17 0xBA 0xBB 0xBC 0xBD  
- RAM - 8 T6 0x163f 22 0xBE 0xBF 0xC0 0xC1  
+ RAM - 7 T7 0x173f 23 0xC2 0xC3 0xC4 0xC5  

Filenames convention and history:

The dsp codes are stored in : ~/TrackerUser/AMSWireCommands/DspCodes/

the file name has to be file_ node _ name.dat

where:

  • node = tdr, jinft, jinj, jlvl1
  • name = versnumber = same name as in Philipp list i.e. 3ee3, MUST be THE SAME as the first line in the contents of the file itself.

How to Upload a new JINF-T/TDR firmware

  • Get the new dsp code in : ~/TrackerUser/AMSWireCommands/DspCodes/file_ node _ name.dat

  • (Official way to have the default program with the official default name)
    • copy the file as file.dat in : ~/TrackerUser/AMSWireCommands/
    • edit the first line of the file.dat and set it as:
    • 29F2 if it will be the default file for JINF-T
    • 29F3 if it will be the default file for TDR
    • then use the script WriteFlashFileOnAllnodesFromHere.sh

or

  • (Unofficial way to have the default program with the official default name)

  • WHEN WRITING SOFTWARE ON JINF-T REMEMBER TO REPEAT THE SAME OPERATION ALSO ON THE OTHER SIDE JINF
  • REMEMBER: when a DSP code is written in the flash it will be effectively used only if it is loaded in memory with the right command (AMSWire command 0x46).
  • There are useful scripts:

  1. DeleteFlashFileOnAllnodes.sh port# filename#
    where node=TDR,JINF
  2. a - WriteFlashFileOnAllnodesFromHere.sh port# filename#
    where node=TDR,JINF
    It loads file.dat from the current directory, read back the flash content and
    checks that filename# is in the flash memory.
    b - WriteFlashFileOnAllnodesFromDSPCodes.sh port# filename#
    where node=TDR,JINF
    checks for file_ node _ name.dat in the /DspCodes directory and copies it in file.dat in current directory before uploading.
  3. SetDefaultFlashFileOnAllnodes.sh port# filename# #status
    where node=TDR,JINF
    looks for the filename in the flash and if it is found and set the default bit according to #status
    status=1 set it to default (from 3xxx to 2xxx, from 7xxx to 6xxx)
    status=0 downgrade from default
  4. LoadFlashFileOnAllnodes #port #filename
    runs the #filename on all nodes
  5. WriteANewnodesCodeOnAllnodesFromHereAndSetAsDefault.sh port# new_filename# old_filename#
  6. WriteANewnodesCodeOnAllnodesFromDSPCodesAndSetAsDefault.sh port# new_filename# old_filename#
  7. Performs either 2a or 2b on the new_filename + 3 with status=0 on old filename and 3 with status=1 + 4 on new filename.

    Output:
    during the running of these script you can see two types of info/output:
    if the AMSWire Command was sended without (with) problems -> rxdone=0x0000 (0x0001)
    if the operations was done -> File Erased (Not Erased) / File Loaded (Not Loaded)

How to change settings

  • There are useful scripts to do this:

  1. SetHighThresholdsOnAllTDRs.sh #port #threshS1 #threshS2 #threshK
    where port= the port of JMDC to be used [i.e. which JINJ and which side of JINF-T]
    threshS1= the S1 high threshold
    threshS2= the S2 high threshold
    thresh K=the K high threshold
  2. SetLowThresholdsOnAllTDRs.sh #port #threshS1 #threshS2 #threshK
    where port= the port of JMDC to be used [i.e. which JINJ and which side of JINF-T]
    threshS1= the S1 low threshold
    threshS2= the S2 low threshold
    thresh K=the K low threshold
  3. DisableDynamicPedestals.sh #port
    where port=the port of JMDC to be used [i.e. which JINJ and which side of JINF-T]
  4. EnablePedestals.sh #port
    where port=the port of JMDC to be used [i.e. which JINJ and which side of JINF-T]
  5. EnableDynamicPedestalsWithPar.sh #port #part
    where port=the port of JMDC to be used [i.e. which JINJ and which side of JINF-T]
    par= the parameter to use for the dynamic pedestals (how many ADC counts will be "touched" at each event)

    Output:
    during the running of these script you can see two types of info/output:
    if the AMSWire Command was sended without (with) problems -> rxdone=0x0000 (0x0001)
    if the operations was done -> File Erased (Not Erased) / File Loaded (Not Loaded)

How to Create and Load a TDR config file:

  • The stuff to create a config files, create the script to load config files, and then load config files is in:
    ~/TrackerUser/AMSWireCommands/ConfigurationFileTDR/


    In this directory you can find all the stuff (except for TESTjmdc and slowconf.conf of which there's a simbolic link) needed for create and load configuration files for TDRs:

    - ConfigFile: this is the program to create binary config files for TDRs starting from a "human readable" parameters file
    (as example TDRParamFile.txt) and to create the script (LoadConfs.sh) usefull to uplaod the binary files

    - LoadConfs.sh: the script that load the correct configuration file in each TDR

    - TDRParamFile.txt: can be used as a template for the "human readable" parameter file for TDR

    The file of parameters ("human readable file") can be filled using the TDR documentation by Philipp Azzarello
    and taking into account that for "compliantness" a parameter indicated as "N" here has to written as "0 0 N"
    (where the first two numbers are the Group and the SubGroup, here 0).

    The script for loading the configuration file has to be called using 1 parameter
    (the JMDC port to be used, i.e.
    to use JINF-T-B [JMDC ports: 0,3]
    to use JINF-T-A [JMDC ports: 1,2])
  • The procedure has to be, the 6 thresholds for external planes (up to now, it means layer 1 & 8, in the future has to be probably 1 & 8 & 9) HAS TO BE PASSED EXPLICITELY (Thresholds have to be passed in 'standard' way (1, 2, 3.5, ...)):
    1. Create a parameter file or edit the template (TDRParamFile.txt)
    2. ./ConfigFile TDRParamFile.txt <S1HighThresh> <S1LowThresh> <S2HighThresh> <S2LowThresh> <KHighThresh> <KLowThresh>
    3. ./LoadConfs.sh #port

How to Create and Load a JINF config file:

  • The stuff to create a config files, create the script to load config files, and then load config files is in:
    ~/TrackerUser/AMSWireCommands/ConfigurationFileJINF/


    In this directory you can find all the stuff (except for TESTjmdc of which there's a simbolic link)
    needed for create and load configuration files for JINF-Ts:

    - ConfigFile: this is the program to create binary config files for JINF-Ts starting from a "human readable" parameters file
    (as example JINFParamFile_X.txt, with X is the crate number in [0-8])
    and to create the script (LoadConfs_X.sh, with X is the crate number in [0-8])
    usefull to uplaod the binary files

    - LoadConfs_X.sh: the script that load the correct configuration file in JINF-T number X

    - LoadConfs.sh: the script that load the correct configuration file in each JINF-T

    - JINFParamFile_X.txt: can be used as a template for the "human readable" parameter file for JINF-T X


    8 different configuration files are created for the 8 crates/JINFs (for now all equals except for crate/JINF 4 [PowerGroup3 with Bias 60V]).
    The file of parameters ("human readable file") can be filled using the JINF documentation by Kounine or the JINF-T one by Philipp Azzarello.

  • The procedure has to be

    - to change and load the config file only for the JINF-T X using JINJ NN and JINJ MM to talk with JINF-T A and JINF-T B:

    1. Create a parameter file or edit the template (JINFParamFile_X.txt)
    2. ./ConfigFile JINFParamFile_X.txt NN MM
    3. ./LoadConfs_X.sh

    - to change and load the config file on all JINF-Ts using JINJ NN and JINJ MM to talk with JINF-T's A and JINF-T's B:

    1. Edit the template parameter files (JINFParamFile_X.txt)
    2. ./LoadConfs.sh NN MM

-- PaoloZuccon - 03-Dec-2009

Topic attachments
I Attachment History Action Size Date Who Comment
Texttxt JINFParamFile.txt r1 manage 1.3 K 2009-12-23 - 22:29 MatteoDuranti Human readable JINF parameter file (generic)
Texttxt JINFParamFile_4.txt r2 r1 manage 1.6 K 2010-01-13 - 17:26 MatteoDuranti Human readable JINF parameter file (Crate 4)
Texttxt TDRParamFile.txt r2 r1 manage 2.3 K 2010-08-16 - 19:37 MatteoDuranti Human readable TDR parameter file
Edit | Attach | Watch | Print version | History: r20 < r19 < r18 < r17 < r16 | Backlinks | Raw View | Raw edit | More topic actions...
Topic revision: r17 - 2010-08-16 - MatteoDuranti
 
    • Cern Search Icon Cern Search
    • TWiki Search Icon TWiki Search
    • Google Search Icon Google Search

    Main All webs login

This site is powered by the TWiki collaboration platform Powered by PerlCopyright & 2008-2019 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback