IMSTesterNotes.tioga
Last Edited by: Neil Gunther, November 6, 1985 4:03:13 pm PST
Neil Gunther, November 8, 1985 3:26:11 pm PST
IMS CHIP TESTER - NOTES
IMS CHIP TESTER - NOTES
IMS CHIP TESTER - NOTES
DRAGON PROJECT — FOR INTERNAL XEROX USE ONLY
DRAGON PROJECT — FOR INTERNAL XEROX USE ONLY
DRAGON PROJECT — FOR INTERNAL XEROX USE ONLY
IMS Chip Tester - Notes
Interfacing and Operation
Release as [Indigo]<Dragon>Documentation>IMSTester>IMSTesterNotes.tioga

© Copyright 1985 Xerox Corporation. All rights reserved.
Abstract: This memo describes some of the problems and idiosyncrasies encountered while integrating the Logic Master 1000 functional tester into the Xerox Network Environment, in general, and the Cedar Programming Environment, in particular.
XEROX  Xerox Corporation
   Computer Science Laboratory
    Palo Alto Research Center

   3333 Coyote Hill Road
   Palo Alto, California 94304



For Internal Xerox Use Only
Contents
1. Introduction
2. Communication Buses
3. Communication Protocols
4. National Instruments GPIB Controller
5. Miscellaneous
1. Introduction
The IMS Logic Master 1000 is manufactured by:
Integrated Measurement Systems Inc.,
9525 S.W. Gemini Drive,
Beaverton, Oregon 97005.
In the event that more detailed information about the LM 1000 is required, contact the local Sales Engineer, Jay Terleski, (408) 262-0706.
The IMS Logic Master 1000 (hereafter referred to as IMS) purchased by CSL is a dual system comprising a master and a slave which together provide a practical number of test channels for chips with a large number of pins, such as the custom Dragon parts.
2. Communication Buses
In the dual configuration, IMS provides two mutually exclusive communication channels, viz., RS232C and GPIB. We have elected to use the GPIB option because of its higher baud rate and the fact that it is the intrinsic control bus (not to be confused with the fast memory bus) between the master and slave systems.
Note: An important point to notice is that the GPIB cabling arrangement is not organized in a way that would be naively or logically anticipated. Careful attention should be paid to the (somewhat ambiguous) diagrams on pp. 6-4 & 6-5 of the System Reference Manual.
Note: In the event of using RS232C cabling, note the diagram on page 6-6, and set the Master to address 98 (or somesuch?). This latter point is not clearly documented in the current edition of the Manual.
For a dual system, the front panel thumbwheel switches should be nominally set in the range [00..30] for the Master and [40..49] for the Slave. We have chosen the addresses 01 and 41 respectively. With these addresses the IMS uses the "default" terminal mode on power up. See the section on the ScreenLink mode of operation for more details.
Note: The System Reference Manual on page 6-8 incorrectly suggests a Master address range including the value 31. By convention, this address is illegal because it is used to tell GPIB devices to UnTalk or UnListen.
The host/controller used in the integration effort has been the Xerox 1108 processor with extended control store and memory (otherwise referred to as the DandeTiger), a Multibus adaptor/card cage with separate power supply, and a GPIB-796P interface card from National Instruments. This machine is capable of running the Cedar 6.0 programming environment, albeit at a performance level well below that of a Dorado (~5 MIPS). This performance level is sufficient for actual device control and communications but is unlikely to be sufficient for demanding tasks involving window display management. From this point of view alone, it would appear that the Screenlink facility will not be useful for anything beyond simple test pattern manipulation. A more appropriate approach for complicated testing would be to integrate the IMS controller at the level of RPC (Remote Procedure Call) so that test vectors could be transported directly from the Dorado-based simulation environment to the DandeTiger without the need for local display management.
3. Communication Protocols
The IMS offers two levels for user information exchange. The most elementary is the "Command Language," and the more sophisticated approach is called "ScreenLink." Each of these approaches is outlined below.
Command Language: In this mode, the IMS traffics in simple messages composed of ASCII character strings. The only GPIB functionalities used are Read and Write. The IMS exercises the newer IEEE-728 specification for string handling, which uses, among other things, carriage return followed by a line feed as the string terminator. The IMS strips carriage returns from strings it receives, but embeds them in strings that it transmits. Hence, omitting a carriage return from a string being sent to the IMS has no effect; omitting a line feed can be fatal!
Note: Much of the IMS software/firmware has been developed on IBM-PCs using the Lattice C compiler. Their nomenclature for carriage return and line feed is exactly opposite to that used in Cedar. IMS code uses the Kernighan & Ritchie/UNIX convention of \r, \n for carriage return and line feed ("newline") respectively, whereas Cedar uses the convention, \n and \l. This notational difference was not explicitly documented in the code examples supplied by IMS, Inc. and was at the seat of early confusion in software development. Using the more explicit CR and LF (see the point about pseudocode below) would be helpful for those of us who are not UNIX groupies!
Unlike some HP instruments, IMS adheres to the convention of asserting EOI with the last byte transmitted. There is, however, one exception to this rule. The transmission of a single status byte during a Serial Poll does not include EOI. More on this point in Section 4.
Most commands have a double identity: an imperative or "setting" form and an interrogative or "query" form. For example,
Multiple line commands look like:
RESource inputs = force #txt
1 a2 in2 2
1 a1 in1 1
RES end
Using the query form would return:
RES? inputs
1 a2 in2 2
1 a1 in1 1
A complete listing of the available commands is given in the IMS Command Reference Guide.
The current Cedar 6.0 software which allows the user to interact with the IMS at the Command level is called "IMSCommander" and can be retrieved from:
[DATools]<DATools6.0>Top>IMSCommander.df
Screen Link: The IMS possesses on-board firmware which provides user interaction through so called "screens." Since most commercially available computer systems come with a glass teletype terminal with a character generating ROM, the IMS attempts to make the environment more friendly for such users by formatting information into character arrays or screens. In the Xerox environment with bitmapped, large format displays, this approach is anathema. This is not to detract from IMS; they are in the business to stay in business by selling testers and most commercial establishments use anything but Xerox workstations. From a purely business point of view, IMS has not only done the right thing, they've done it well!
To better understand the IMS tester and its screenlink capability, it was necessary to first construct the right kind of interpreter to translate the screen control code of the IMS into a form that could be displayed in a Cedar viewer. This turned out to be more difficult than expected.
The language used for providing the screenlink is essentially a superset of the the Command language described above, and uses the keyword "Key" in both the imperative sense and the interrogative sense. As the word implies, "Key" refers to the keys of the keyboard. Things remain straightforward as long as one is considering only the standard alphanumeric keys.
Note: A particular key is captured as a character but transmitted to the IMS as its ASCII decimal equivalent. In Cedar this is achieved through the use of Formatted Ropes, e.g.,
IO.PutFR["Key %g\l", IO.card[LOOPHOLE[key]]]
However, it is assumed by the IMS, that control functions, e.g., activating screens and "pop-up" menus, will be communicated through the use of ASCII control or escape sequences. For most commercial computer systems this implies the use of function keys or alternate keypads. The escape sequences associated with function keys vary widely among computer brands. The question arises, how does the IMS know about the terminal type with which it is supposed to communicate?
IMS, Inc. has provided a so-called "Learn" capability. The IMS uses its own internal fixed representation for generic keys. A correspondence between the internal IMS representation and a particular physical keyboard can be taught to the preprocessor in order to establish the rules of ASCII communication. In this way the IMS "learns" the nature of the keyboard and terminal you are using. There is a separate preprocessor syntax, based once again on the base Command Language, which can be used to record the terminal attributes in a file to be downloaded after the IMS powers up. There is also a default setting which assumes the terminal being used is a VT00.
Note: Explicit escape sequences, i.e., ESC someKey, are transmitted to the IMS as the appropriate ASCII decimal equivalent for someKey, prepended by the code assigned to the ESC key. In Cedar, this is achieved through the use of Formatted Ropes, e.g.,
IO.PutFR["Key ESC %g\l", IO.card[LOOPHOLE[key]]]
In the case of a VT100, ESC is 1; an IBM-pc uses 0.
Note: More information about the Learn Command language is available in Appendix D (not included in the original documentation). This chapter is quite involved and difficult to digest on a single reading. There should be a higher level chapter which gives a better overview of the intent behind the Learn Commands with references to Appendix D for more detailed discussion. Because of this omitted overview, there are things in Appendix D which appear inconsistent, e.g., Table D-5 gives a list of internal key assignments. There are unexplained gaps in the numbers used. Some codes refer to actual keys of the keyboard while other codes refer to IMS functions like initialization of the tester. There is no mapping of key codes to screen functionality. For example, Key 150 is defined as referring to Function Key 1, but nothing is said about what will happen when one in fact presses that key on the keyboard! It can be deduced that it will activate the Configuration Screen only by close inspection of other parts of the general documentation. This whole situation is aggravated when the computer/ terminal being used does not possess function keys, as is the case with a VT100. In the Cedar environment, function keys are replaced with Tioga menu buttons.
Note: During the course of developing the screenlink capability in Cedar, it was discovered that if a separate configuration file was not explicitly downloaded, strange status bytes were generated when the IMS was prompted for screens and the screens did not appear. The reason for this strange behavior was the missing command sequence:
GPIB.WriteDevice[gh.addr, "lea com\lEnd\lKey 129\lSRQ 7\l"];
This sequence is transmitted at the end of the downloading of a configuration file. If the default mode is chosen instead, and no downloading takes place, the IMS never receives this final command sequence and gets confused when prompted for a screen; particularly a Configuration Screen. This point is not currently documented by IMS, Inc. A work-around has been incorporated in Cedar 6.0.
Note: There is an Application Note in the current documentation which purports to describe a simple screenlink program. Although it provides an outline, it has several disadvantages and has since been disowned by IMS, Inc. Unfortunately, the other incarnations I have seen still suffer several disadvantages. Not the least of these is that all the example code assumes from the outset that the screenlink will be running on a monoprocessor, like an IBM-pc. Clearly, Xerox systems, with their intrinsic concurrency, would have all their horsepower usurped by code that is written in the style suggested by IMS, Inc., e.g, a mainline polling loop. Although IMS code is well written (for C code), the choice of C as the language in which to write examples is not a good one. Pointer dereferencing, use of \n, and distinguishing the bottom of a loop from the end of a function block are examples of the kind of thing that can be a headache when translating C into another language. It has been suggested to IMS, Inc. that they write their examples in a carefully worded pseudocode (perhaps taking a hint from Cedar reserved words and style) with references to particular chunks of C code where appropriate.
The current software which allows the user to interact with the IMS at the screen level is called "IMSScreenLinker" and can be retrieved from:
[DATools]<DATools6.0>Top>IMSScreenLinker.df
4. National Instruments GPIB Controller
The host/controller for the IMS tester is based on the Xerox 1185 processor, with a Multibus adaptor/card cage with separate power supply, and a GPIB-796P interface card. The GPIB controller interface is manufactured by:
National Instruments
12109 Technology Boulevard
Austin, Texas 78727
(800) 531-5066
The GPIB-796P uses the NEC 7210 controller chip. Many other GPIB systems, including HP and IMS, use the TI 9914. These chips are not identical in their operation.
The Status Bit Problem: Both chips have 2 status registers, but the 9914 has, in addition, a "Bus Status" register. This seemingly innocent difference has been the source of several problems in developing software for the IMS. The Screenlink mode of operation relies on polling the IMS for a status byte to indicate which kind of action should be taken. Prior to reading the status byte, the IMS asserts SRQ, and so it is necessary to check for the SRQ status bit prior to reading the status byte.
Note: The IMS asserts SRQ essentially when it has something to say. When it first yanks that GPIB line the front panel LED for SRQ lights up. The SRQ light goes out only after the IMS is serially polled.
Most of the GPIB procedures for the 796 board read a status register and mask for both EOI and SRQ bits. This includes the procedures called Cmd and Init. All those procedures that read the status register update a global 16-bit WORD. Unlike the 9914, the N.I. status bits are volatile, because there is no Bus Status register equivalent. On reading, the register is zeroed. This means that for the screenlink program to work, the status bit would need to be checked on each call to the low-level driver procedures. One can never be sure which procedure saw the SRQ bit. To avoid creating a nondeterministic state machine, it was decided to implement a software register to store the status word if it becomes non-zero (its initial state is zero). This turned out to be a more successful approach than trying to prevent every procedure except GetStatus from reading the status register, since it was too difficult to be certain exactly when that status register was being read.
The Status Byte Problem: As mentioned earlier, the IMS transmits EOI on the last byte with one exception. A SelectedReadSerialPoll returns a single byte containing the 8-bit status, and in this case, the IMS does not assert EOI. The reason for it not asserting EOI is to do with the way the IMS handles interrupts. It will provide a status byte (not necessarily the same one) as long as the controller requests it. IEEE-728 legalizes this protocol, but it was the source of a lot of initial confusion and it should be explicitly documented by IMS, Inc. In this sense, then, the IMS is abiding by (the newer) GPIB rules.
A more serious problem arose with the N.I. board because their system did not hold off on successive bytes being latched into the DataRead register.
Note: The following effect would pertain even if EOI were asserted. The problem revolves around whether the device transmits a finite number of bytes (hence terminated with EOI) or an infinite number of bytes (EOI never gets asserted).
Since the IMS is capable of transmitting an infinite number of status bytes, one per serial poll, the next available status byte was being latched (unrequested) into the DataRead register. All the GPIB read routines begin by polling the appropriate status interrupt register for a flag to indicate that a byte has been latched. After having performed a serial poll, the very next call to any GPIB read routine had the effect of hanging the entire system! The reason for this is that the previous serial poll had both returned the current status byte and latched the successive byte, which caused the status register flag to be in the wrong state for the next GPIB DataRead invocation. National Instruments has acknowledged this flaw and provided the proper solution.
Note: This problem was not seen earlier in the case of using the base Command language because SelectedReadSerialPolls are never executed in that mode.
The current software which drives the National Instruments GPIB-796P controller board is called "NatInstrGPIBDriver," which exports GPIB.mesa and can be retrieved from:
[DATools]<DATools6.0>Top>GPIB.df
5. Miscellaneous
November 6, 1985 9:57:44 am PST
The following is a list of gripes provided by early users of IMSCommander. These have not yet been investigated.
IMS stuff:
* Bad input generates no error message, e.g.,
res read force #txt
1 AT Read 2
* Sample timer specified relative to cycle end.
* Timer expressed as fraction of cycle.
* Force & Acquire groups may not have the same names.
* Allows double assignment of resources.
* What's the difference between cycle, memory, and sequence commands?
* Only timing channels can be other than NRZ or DNRZ? No.
* Formatting: R0 (Reference Guide) is really R1(Manual/Firmware)
IMSCommander stuff:
* Eliminate extra CR during output to viewer.
* Avoid BS into prompt.
* STOP! re: cable not connected, etc.
* Scroll at bottom of viewer.