DIRECTORY Core USING [CellType], IO USING [STREAM], Ports USING [Port], RefTab USING [Ref], Rope USING [ROPE], RosemaryUser USING [TestProc], RosemaryVector USING [Target]; MTSVector: CEDAR DEFINITIONS ~ BEGIN CreateCapture: PROC [ct: Core.CellType] RETURNS [capture: Capture]; CaptureAndWrite: PROC [capture: Capture]; CloseCapture: PROC [capture: Capture]; ReadPort: PROC [ct: Core.CellType, p: Ports.Port, eachVector: PROC[]]; Create: PROC [ct: Core.CellType, fileBase: Rope.ROPE] RETURNS [file: File]; WriteVector: PROC [file: File]; WriteVectorFromPort: PROC [file: File, port: Ports.Port]; Close: PROC [file: File]; Read: PROC [ct: Core.CellType, fileBase: Rope.ROPE, eachVector: PROC [File]]; MTSCaptureTP: RosemaryUser.TestProc; MTSReplayTP: RosemaryUser.TestProc; MTSToAscii: PROC [base: Rope.ROPE]; AsciiToMTS: PROC [base: Rope.ROPE]; 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]; Pin: TYPE ~ REF PinRep; PinRep: TYPE ~ RECORD [ name: Rope.ROPE, -- name of the pin notConnected: BOOL _ FALSE, hasPullup: BOOL _ FALSE, group: [0..8), -- board number where this pin is located pinNum: [0..64), -- pin number on the MTS board rank: [0..64) -- index within CG data structure, differs from pinNum due to bit ordering ]; File: TYPE ~ REF FileRep; FileRep: TYPE ~ RECORD [ id: Rope.ROPE, -- title of the simulation dut: Core.CellType, -- the device under test pins: LIST OF Pin, -- all pins stored in the file, including unconnected wireToPins: RefTab.Ref, -- public atomic wire to pin mapping vector: Vector, -- vector currently read or written nGroups: PRIVATE CARD32 _ 0, -- number of groups (boards) to be put in the file nVects: PRIVATE CARD32 _ 0, -- number of vectors in file 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 port: Ports.Port, -- into which captured data are stored target: RosemaryVector.Target -- describing target CT and associated info ]; END. NMTSVector.mesa Copyright Σ 1987 by Xerox Corporation. All rights reserved. Jean-Marc Frailong January 25, 1988 5:07:34 pm PST 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 the vector for the target flatcell & append it to the vector file 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 pin information is taken from fileBase.mtsPins and the vectors are written into fileBase.mtsVectors Append file.vector to end of file. Build file.vector from port information, then perform WriteVector[file]. Close the file, including header setup and checksum computation. Open fileBase.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. Binary <--> Ascii conversions Convert base.mtsVectors into base.mtsAscii. Convert base.mtsAscii into base.mtsVectors. Types 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 Description of a test pin in the MTS tester Κψ– "cedar" style˜codešœ™Kšœ<™