Experiment Electronic Systems Group |
***************************************************************** ***** ***** **** TTTTT EEE SS TTTTT CCC L K K **** *** T E S S T C C L K K *** ** T E S T C L K K ** * T EEE S T C L KK * ** T E S T C L K K ** *** T E S S T C C L K K *** **** T EEE SS T CCC LLLLL K K **** ***** ***** *****************************************************************
Testclk User's Guide
Written by: Rodney Klein, Date: 10 April 1996
Theresa Shaw,
Walter Stuermer Version: V1.0
Introduction:
The Testclk program is a software package that interfaces with a Testclk module via a Unix machine and a MVME162 VME Controller or directly logged into a MVME162 VME Controller. The Testclk program is compiled and linked with the FISION V2.09 software written and supported by Jim Pangburn. The Testclk software and updates may be copied via internet at http://www-rd.fnal.gov/RDEED/Home_ees.html on the Projects/Testclk page. The software package will be in a tar file entitled testclk_software.tar. Questions may be directed to Rodney Klein via e-mail at rklein@fnal.gov.
After extracting the files from the tar file, inside the testclk directory will be six directories entitled: sunobj, sunbin, vxlib, vxobj, src, and include. The sunobj directory contains the sun compiled object files. The sunbin directory contains the testclk program that runs over the network. The vxobj contains the vxworks compiled object files. The vxlib directory contains the testclk.o program that is to be loaded onto a MVME162 to run locally. The src and include directories contains the source code and include files respectively.
Upon running the testclk program either remotely over the network or locally on the MVME162, the user is prompted for the "controller name" and "slot number". If running remotely, the controller name is referring to the MVME162's id. If running locally on the MVME162, the user may either hit the return key or type in the MVME162's id. The "slot number" refers to the slot in the vme crate that the testclk resides in and requires the slot number whether running remotely or locally. The following pages will describe how the program works.
Testclk main menu contains three
options: TSI Emulator, Register Access Menu and Test Registers. This document
will walk the user through the menu options and how to use them.
TSI Emulator:
1. Clock Control Cable Clock (0) Backplane Clock (0) 2. Toggle TSIE Start Wait (0) 3. Load FIFO and Enable Transmission 4. Load FIFO and Enable Transmission in Loop Mode Q. Exit MenuThe first option displayed is Clock Control. Under Clock Control the status is displayed for Cable Clock and Backplane Clock. Upon selecting Clock Control, the user may toggle the clocks by typing a 0 or a 1 next to the prompt for that clock. If the user presses enter without typing a 0 or a 1, no change is made to the current status of that clock.
The second option is Toggle TSIE Start Wait with the current status displayed. By toggling the Start Wait to 1, the TSIE state machine waits for the next Bunch_0_Marker before transmitting data. This bit needs to be set before loading the FIFO otherwise the data is transmitted immediately after the FIFO is loaded.
Upon selecting Option 3, the user is prompted for the filename the user wishes to be loaded into the TSIE FIFO. The FIFO is then reset to ensure it is empty before loading the data from the file into the FIFO. After the data is loaded into the FIFO, the TSIE state machine is enabled and the data is transmitted.
Option 4 is the same as Option 3 with the exception that prior to transmitting data, the Loop Enable bit is set, then the data is transmitted repeatedly.
Register Access:
The Register Access Menu is a list of registers, proms and individual bits that may be accessed.
Option 1: Delay Register - controls tsie delay and mc delay Option 2: Control Register - displays the current status of the control bits. This register is read/writeable. The FIFO Reset and TSIE State Machine Reset are not self-clearing, therefore the user will need to clear these bits before using the FIFO or State Machine. Software Reset clears the Control Register. Option 3: SES Register - read only register. Option 4: Set DONE - write 1 to done bit[31] in Done Register. Option 5: Clear DONE - write 0 to done bit[31] in Done Register. Option 6: TSIE Control Register - displays the current status of the TSIE control bits. Bits [22:20] are decoded to show the status of the FIFO. Only bits[17, 18 & 23] are read/writable. Bit[23] fifo_mark is self-clearing. Option 7: TSIE FIFO Menu - a menu with four options is displayed. The Read FIFO option will prompt user whether or not to write data to user specified file and number of FIFO locations to read. If user specifies all locations, the user will be prompted whether or not to print data to screen. The Write FIFO option writes one user specified word to FIFO. Download File to FIFO loads FIFO with data from user specified file. Download and Create Random Number File, creates a random data file with user specified filename and downloads data to FIFO. Option 8: Read IDPROM - reads and displays ID Prom data to screen. Option 9: Read Constant Prom - reads and displays Constant Prom data to screen. Option 10: Read Clock Prom - first prompts user whether or not to send data to user specified file. Then prompts user for starting address to start reading and displays 16 lines of data at a time. Option 11: General Register Access - displays a menu with a Read, Write and Loop options. Read prompts user for register address and displays data to screen. Write prompts user for register address and data to be written. Loop option displays a menu with Loop Read and Loop Write options. As in the Read and Write options above, user is prompted for register address and data. To terminate a Read Loop or Write Loop, user types Ctrl^C. Option 12: Compare FIFO Input and Output Files - compares a user specified FIFO input file with a user specified FIFO output file. Notifies user if files are of unequal length. If files are of equal length then compares each line and notifies user of unequal data.Test Registers:
This option tests all of the
registers, the ID Prom, the Constant Prom, and the FIFO. Errors are printed
to screen unless the errors exceeds over 100, then that test is terminated
and proceeds to next test. The errors are also written to file entitled
testclk_reg_err.log, this file is created in the user's default working
directory.
User Specified FIFO Input Files:
As specified earlier in this document, a user may download data into a FIFO from a user specified file, but there is a format that must be followed. The data must be in a hexadecimal format preceeded by an H. Below is an example of what Testclk expects.
H0013 HFFFF H5555 " HAAAA "Comment may be placed here or "here H1111Testclk looks for an H or a " in the first column if neither is detected an error will be printed to the screen. If it detects an H, the next four alpha-numeric charcters are loaded into the FIFO. If Testclk detects a " in the first column then the next line in the file is scanned and loaded into the TSIE FIFO until end-of-file is detected. Below is a file entitled tsi_data.tsi as a more definitive example.
" Comment Line H000 "L1 word - nothing active H007 "Control word - set Halt H000 "L1 word - nothing active H00B "Control word - set Reset H000 "L1 word - nothing active H013 "Control word - set TEST H000 "L1 word - nothing active H043 "Control word - set SCN0 H000 "L1 word - nothing active H083 "Control word - set SCN1 H000 "L1 word - nothing active H103 "Control word - set SCN2 H000 "L1 word - nothing active H023 "Control word - set RUN (releases Halt condition) H000 "L1 word - nothing active H005 "Calibration Word - set CAL0 H000 "L1 word - nothing active H009 "Calibration Word - set CAL1 H000 "L1 word - nothing active H011 "Calibration Word - set CAL2 H000 "L1 word - nothing active H021 "Calibration Word - set CAL3 H000 "L1 word - nothing active H041 "Calibration Word - set CAL4 H000 "L1 word - nothing active H081 "Calibration Word - set CAL5 H000 "L1 word - nothing active H101 "Calibration Word - set CAL6 H004 "L1 word - set L1A H200 "sync H008 "L1 word - set L1R H200 "sync H014 "L1 word - set L1A, L1B0 H200 "sync H024 "L1 word - set L1A, L1B1 H200 "sync H044 "L1 word - set L1A, RSRV1 H200 "sync H000 "L1 word - nothing active H002 "L2 word H000 "L1 word - nothing active H006 "L2 word - set SESB0 H000 "L1 word - nothing active H00A "L2 word - set SESB1 H000 "L1 word - nothing active H012 "L2 word - set RSVD H000 "L1 word - nothing active H022 "L2 word - set EVID0 H000 "L1 word - nothing active H042 "L2 word - set EVID1 H000 "L1 word - nothing active H082 "L2 word - set EVID2 H000 "L1 word - nothing active H102 "L2 word - set EVID3 H000 "L1 word - nothing active