Scanner Software.

Epic and vim

Here are a couple of useful vim accessories.

  • Epic syntax file: This file will correctly color different syntactic ggroups in the source code. (e.g. inline statements, cv's starting with op or pi etc). It goes in the vim releasein the ${VIM}/syntax (e.g. /usr/local/share/vim/vim71/syntax).
  • Color scheme: This file changes the colors used by the syntax file to ones that are easier on the eyes. It was originally written by Ciaran McCreesh. It shoud be put in ${VIM}/colors.

History formatter

The WTools interface writes out a pulse history, but is sorted according by sequencer rather than time. Here is a short program (written in python) that sorts the WTools.x output (in .tgt.his) and writes the output in tab-delimited text suitable for displaying in a spreadsheet program:


GE recommends using totalview or gdb. Totalview is bit too sophisticated for the job - it is really a development environment, and if you like gdb you must love Epic. The best debugger I have every used is ups, which was first developed in the late-80s, early 90s. It doesn't wrap gdb like other graphical debuggers. It builds over the gdb libraries to create a very fast and inuitive interface.. Its primary advantages is that it displays variable and expressions of variables very quickly and has a better user interface. You can make WTools use it as the primary debugger by changing both "Debugger" lines in your ~/.psdtoolsrc to

Debugger "/apps/dev/ups/bin/figaro/ups

There are a couple of tricks to getting it started. When debugging the MGD code, make sure you can load CVs successfully before starting the debugger. Otherwise it will hang. The second is avoiding the SIGUSR1 signal that occurs when it is started. Here is how to avoid it:

  • Click on "Signals" in the upper window.
  • Click the "Expand" button.
  • Click on the line that starts with "signal SIGUSR1"
  • Click on the "accept/ignore" button. The signal action will change to "Stop - ignore signal on continue."
  • Click on the "stop/continue" button. The signal action will change to "Ignore."
  • Double-click on "Signals" again to collapse the signals list.

To see source code do the following:

  • Click on "Source files"
  • Click on "Expand"
  • Click on the file named "<psdname>.ipg.c
  • Double click on "Source files" to collapse the source files list;

To get started:

  • Enter "pulsegen" and carriage return on the upper leftmost line.
  • Either scroll down the source code to an executable statement. (Clicking in the scrollbar and moving the cursor controls the speed of scrolling, not the scroll position) or enter the name of the function you want to debug in the box in the upper left corner and hit return.
  • Use the leftmost mouse button to insert a breakpoint.
  • Click on the "cont" button to continue.
  • Click on "Pulsegen" on the MGD sim panel
  • ups will stop at the breakpoint.
  • Display variables by clicking on them.
  • Display functions of variables by clicking on the the subroutine name and then on "add expr"

Add these X resources to your ~/.Xdefaults file for a more readable gui:

  • ups.Font: 10x20
  • ups.Geometry: 900x1000+0+0
  • ups.borderWidth: 9
  • ups.Foreground: White
  • ups.Background: Black
  • ups.EditlinesColor: Yellow
  • ups.VariableColor: Cyan
  • ups.HighlightColor: Yellow
  • ups.LastButtonTextColor: Yellow

This debugger hasn't been supported for several years now, and the public version will not build correctly. Here is a binary of the version I patched to run on the workstation we use to build sequences under ESE12M4. I hacked it again to work under ESE20M4, and it is more robust than the last version.

  • ESE12M4 binary
  • ESE20M4 binary This was built under scientific linux 5.2, which is essentially the same as RedHat 5.
  • man page

More documentation is on the ups website.

Last modified February 24, 2011