DIRECTORY BasicTime USING [GMT], Core USING [CellType], IO USING [STREAM], Ports USING [Port], RefTab USING [Ref], Rope USING [ROPE], RosemaryUser USING [TestEvalProc, TestProc], RosemaryVector USING [Target], SymTab USING [Ref]; MTSVector: CEDAR DEFINITIONS ~ BEGIN CreateCapture: PROC [ct: Core.CellType] RETURNS [capture: Capture]; EvalAndCapture: PROC [capture: Capture, Eval: RosemaryUser.TestEvalProc, memory: BOOL _ TRUE, useClockEval: BOOL _ TRUE, checkPorts: BOOL _ TRUE]; CloseCapture: PROC [capture: Capture]; ReadPort: PROC [ct: Core.CellType, p: Ports.Port, eachVector: PROC[]]; Create: PROC [ct: Core.CellType, package: Rope.ROPE, vectors: Rope.ROPE, title: Rope.ROPE _ NIL] RETURNS [file: File]; WriteVector: PROC [file: File]; WriteVectorFromPorts: PROC [file: File, before: Ports.Port, after: Ports.Port]; Close: PROC [file: File]; Read: PROC [ct: Core.CellType, vectors: Rope.ROPE, eachVector: PROC [File]]; MTSCaptureTP: RosemaryUser.TestProc; MTSReplayTP: RosemaryUser.TestProc; SyntaxError: SIGNAL [msg: Rope.ROPE, at: INT, s: IO.STREAM]; ReadPackage: PROC [file: Rope.ROPE] RETURNS [p: Package]; CGF: TYPE ~ MACHINE DEPENDENT RECORD [ -- Channel Group Field SELECT OVERLAID * FROM bytes => [bytes: PACKED ARRAY [0..8) OF BYTE], bits => [bits: PACKED ARRAY [0..64) OF BOOL], ENDCASE ]; CG: TYPE ~ REF CGRep; CGRep: TYPE ~ RECORD [ -- Channel Group test information tristate: CGF, data: CGF, mask: CGF ]; Vector: TYPE ~ REF VectorRep; VectorRep: TYPE ~ RECORD [cg: SEQUENCE ngrps: NAT OF CG]; Package: TYPE ~ REF PackageRep; PackageRep: TYPE ~ RECORD [ name: Rope.ROPE, -- informative only fixtureName: Rope.ROPE, -- informative only signals: SymTab.Ref -- wire names to wireDescription ]; WireFlag: TYPE ~ {signal, pullup, gnd, vdd, ignore}; WireDescription: TYPE ~ REF WireDescriptionRep; WireDescriptionRep: TYPE ~ RECORD [ name: Rope.ROPE, -- informative only flavor: WireFlag, -- flavor of this wire pins: LIST OF PinDescription -- the pins connected to this wire (usually a single one) ]; PinDescription: TYPE ~ REF PinDescriptionRep; PinDescriptionRep: TYPE ~ RECORD [ pkgName: Rope.ROPE, -- name on package (e.g. K12) conName: Rope.ROPE, -- name on connector (e.g. P7.24) group: [0..8), -- tester board to which this pin is connected byte: [0..8), -- byte on the board to which this pin is connected, used only on PC mask: BYTE, -- to mask out this bit in the byte, PC use only bit: [0..60) -- bit number on board, redundant with byte & mask ]; File: TYPE ~ REF FileRep; FileRep: TYPE ~ RECORD [ id: Rope.ROPE, -- title of the simulation dut: Core.CellType, -- the device under test package: Package, -- describing the DUT and its test environment wireToPins: RefTab.Ref, -- public atomic wire to pin mapping vector: Vector, -- vector currently read or written nGroups: PRIVATE INT _ 0, -- number of groups (boards) to be put in the file nVects: PRIVATE INT _ 0, -- number of vectors in file hdrSize: PRIVATE INT _ 0, -- size of header, ceiling to 1K boundary timeStamp: PRIVATE BasicTime.GMT, -- file creation time ckSum: PRIVATE CARD16 _ 0, -- current file checksum block: PRIVATE REF TEXT, -- IO buffer stream: PRIVATE IO.STREAM -- output to MTS vector file ]; Capture: TYPE ~ REF CaptureRep; CaptureRep: TYPE ~ RECORD [ -- this record is not of any use to a normal client mtsFile: File, -- to store computed vectors before, after: Ports.Port, -- into which captured data are stored target: RosemaryVector.Target -- describing target CT and associated info ]; END. ‚MTSVector.mesa Copyright Σ 1987 by Xerox Corporation. All rights reserved. Jean-Marc Frailong October 19, 1988 3:42:49 pm PDT Generation of MTS tester files. Vector file creation (high-level) Create the data structure necessary to capture the vectors for a flatcell within ct. Uses Core properties as follows: Vectors: ROPE -- the base of the vector file name, file will be .mtsVectors. Defaults to name of ct. DUT: ROPE -- resolving to a flat CT which is the device under test, must be present Capture DUT state at entry, Eval, capture DUT state after Eval and write resulting vector to capture file. If useClockEval is TRUE, two Evals are performed (clockEval: TRUE, then clockEval: FALSE) and only the second one is verified. If useClockEval is FALSE, a single Eval is performed. Capture should normally be done with a gate-level (not macro-level), while replay should be done at transistor level... End of simulation, close vector file. Recover file name from Vectors Core property; for each vector, map it back into the Rosemary test port passed and call back the client. Normally, ct is the celltype corresponding to the flat CT that has been captured earlier. Vector file creation & access (low-level) Open a new MTSVector file and return descriptor. The package information is taken from package.mtsPins (default suffix) and the vectors are written into vectors.mtsVectors (default suffix) Append file.vector to end of file. Build file.vector from port information, then perform WriteVector[file]. before is the DUT state before an Eval, after is the state after the Eval. Close the file, including header setup and checksum computation. Open vectors.mtsVectors using ct to describe the public. Call eachVector for each vector in the file. The file descriptor contains the current vector. TestProcs Convert base.mtsVectors into base.mtsAscii. Convert base.mtsAscii into base.mtsVectors. Specification descriptions Reads specified file (default suffix is .mtsPackage) and return the corresponding package structure. Fixture file is read on the file (it is referenced in the package file by name) Types Use the following type definitions at your own risk. Things may change... The order of bits within a CGF is strictly small-endian: byte 0: bit 7, bit 6, ... bit 0 byte 1: bit 15, bit 14, ... bit 8 and so on. The bit ordering is taken in account when reading the pin description file, and only there. The semantics of a CG are: Setup TV[i].tristate; Setup TV[i].data; Clock tester; IF TV[i].mask & TesterData = TV[i].mask & TV[i].data THEN ERROR; A test vector comprises one Channel Group per channel Test vectors are emited on the file in 16K bytes chunks Κ– "cedar" style˜codešœ™Kšœ<™