TWT CONFIGURATION FILES Dennis J. Nicklaus updated Jan 14, 2000 original June 10, 1999 There is one master configuration file which tells all the TWTPM CPUs how many TWTPMs are attached and which particular TWTs are attached to which of those TWTPMS, and where on the twtpm ribbon cable busses the various TWTPMs and TWTs are attached. This document describes this file. This was written because it is helpful to use this file to create different configurations to test the bus crosstalk problem. The file used is stored in the directory (on crusher) /fecode-bd/vxworks_boot/fe/twt/ (also gotten to by /home/ad_projects/vxworks_boot/fe/twt/) Which is really on the machine fecode-bd and is cross-mounted onto crusher. (fecode-bd:~vxworks_boot/vxworks_boot/fe/twt/) The file is typically named runtwt.config, but the name of the file used can be adjusted in the TWT CPU's initialization script (typically twt.login in the same directory) by setting the global variable named "global_rundata_filename". The same file is used by all the different TWTPM CPUs. Here is part of the typical file. For illustration here, I have added comments down the right hand margin to explain what the various fields are. These comments canNOT be in the real configuration file. CPU 6 #Number of total TWTPM CPUs at Fermilab TWTPM 57 #Total number of TWTPMs at Fermilab TWT 113 #Total number of TWTs in use at Fermilab TWTPMS_PER_CPU # Number of TWTPMs per each CPU, (one line/cpu) # and and also divided up in to 4 busses. 1 0 0 0 # CPU 0 has 1 TWTPM on bus 1 0 2 0 0 # CPU 1 has 2 TWTPM on bus 2 1 0 0 0 # CPU 2 has 1 TWTPM on bus 1 8 8 8 8 # CPU 3 has the full 8 TWTPMs on each bus 8 8 5 0 # CPU 4 has 8 TWTPMs on busses 1&2, 5 on bus 3. 2 0 0 0 # CPU 5 has 2 TWTPMs on Bus 1. TWTS_IN_TWTPMS # Following this line are the definitions # of which TWTs are attached to each of the # TWTPMs that we said we have in TWTPMS_PER_CPU # in order, starting with those in cpu1, bus1. # The first number on each line is the 3bit ID header # which is expected for that TWTPM. # This is followed by the TWT numbers of the # two attached TWTs for that TWTPM. (0 indicates no TWT) # Finally, is a string name for the first TWT # attached to the TWTPM. This is used as # an identifying string to help figure out what # is attached where at run time. 1 112 , 113 TWT_TESTDEV_0 # thus CPU0, bus1, 1st TWTPM has twts #112, 113 # since there was only 1 TWTPM on CPU1, now # we start defining those on CPU2 1 108 , 109 TWT_RECYCLER_0 # CPU1, bus 2, bus slot 1 has TWTs 109 & 109. 1 110 , 111 TWT_RECYCLER_2 # CPU1, bus 2, bus slot 1 has TWTs 110 & 111. 2 1 , 2 TWT_CORE_MOM_8GHZ_1 # CPU2, bus1, bus slot 1 has TWTs 1 and 2 2 92 , 93 TWT_DEBUNCHER_VERT_B1_1 # CPU3, bus1, bus slot 2 has TWTs 92, 93 2 94 , 95 TWT_DEBUNCHER_VERT_B1_3 # CPU3, bus1, bus slot 3 has TWTs 94, 95 2 44 , 45 TWT_DEBUNCHER_MOM_B1_1 2 46 , 47 TWT_DEBUNCHER_MOM_B1_3 2 48 , 49 TWT_DEBUNCHER_MOM_B1_5 # and so on and so forth 2 50 , 51 TWT_DEBUNCHER_MOM_B1_7 2 76 , 77 TWT_DEBUNCHER_HORIZ_B1_1 2 78 , 79 TWT_DEBUNCHER_HORIZ_B1_3 # after the 8 TWTPMS in Bus1, CPU3 2 80 , 81 TWT_DEBUNCHER_HORIZ_B2_1 # here we have the TWTPMs for CPU3, Bus2, slot1 2 52 , 53 TWT_DEBUNCHER_MOM_B2_1 2 54 , 55 TWT_DEBUNCHER_MOM_B2_3 And so on, and so forth. Eventually, after the 1+2+1+8+8+8+8 TWTPM definitions. you will come to the Definition of CPU4 (which is the Accumulator TWTPM CPU). Sometimes, there is only one TWT connected out of the possible two that any TWTPM might be connected to. Its entry in the runtwt.config file will then like: 3 3 , 0 TWT_CORE_MOM_2GHZ A zero in this part of the config file indicates that there is no TWT attached to that "half" of the TWTPM. A word on TWT Numbers: They aren't real meaningful. They really aren't meant to be used directly. It is only for debugging certain problems that using this configuration file becomes necessary. The TWT #'s only have a meaning when compared with the database. The TWT number serves as part of the OID in the OID field of the SSDN, and as the OID for Mooc on the front end. Correspondence between the OID in the SSDNs and the TWT numbers in the configuration file is maintained because one program (using the Tcl/Tk program "tool.tcl" along with it's input file "twtdata.tcl") creates both this configuration file and the Dabbel commands to make the database objects point to the correct TWTPM CPU for each TWT. All these tcl programs are in the twtpm cvs project. The twtdata.tcl file is where you really define where each TWT is attached, and you get to use symbolic names, not just numbers. This runtwt.config file is created out of the definitions there. ---------------------------------------------------------------------- As I mentioned, the file that the CPU typically uses is called "runtwt.config". There may be other versions copied in the same directory which were used for testing purposes. You can change the runtwt.config file directly for a quick test, although that isn't the proper way to do it. The proper way to do it is to change twtdata.tcl, and run it through tcl to regenerate the runtwt.config file (as well as the DABBEL commands). Here's an example: In the TWTPMS_PER_CPU section of the above example runtwt.config file, the TWTPMs are connected to Bus 2 for CPU 1, as indicated by this line: 0 2 0 0 Suppose you believe that Bus 2 of the TWTPM transition box for CPU 1 (the Recycler TWTPM) is malfunctioning. What you might want to do is to move the TWTPM bus ribbon cable from the Bus 2 connection to the Bus 3 connection to use Bus 3 instead of the malfunctioning Bus 2. If you do this, you must also change the config file line for that CPU. For the line to indicate that both TWTPMs are now connected to Bus 4, that same line in the runtwt.config file must now become: 0 0 2 0 After you change the config file, you must reboot the affected CPU for it to pick up the changes. The config file is only read once, at start-up time. YOU HAVE TO REBOOT TO PICK UP THE CHANGES IN THE CONFIG FILE! Because of the serial way in which the TWTs in TWTPMs tables are built, if you change the number of TWTs on any CPU or bus, that is a pretty significant change and will affect the other CPUs as well and you need to make sure you have the config file correct.