DIRECTORY Core, CoreCreate, Ports, Rope, Rosemary, Sisyph; LogicUtils: CEDAR DEFINITIONS ~ BEGIN OPEN CoreCreate; CacheFetch: PROC [name: ROPE] RETURNS [CellType]; CacheStore: PROC [name: ROPE, ct: CellType]; cacheAction: TYPE ~ {leave, reload, erase, disable}; Reset: PROC [reloadDesign: BOOL _ FALSE, cache: cacheAction _ leave]; LibraryGet: PROC [lib, cell: ROPE] RETURNS [CellType _ NIL]; MakeSC: PROC [nameInLib: ROPE] RETURNS [ct: CellType]; Value: TYPE ~ RECORD [name: ROPE, val: INT]; GetLogicContext: PROC RETURNS [Sisyph.Context]; Extract: PROC [schName: ROPE, parms: LIST OF Value _ NIL] RETURNS [ct: CellType]; SCBlock: PROC [ct: CellType] RETURNS [shell: CellType]; RoseClass: PROC [name: ROPE, init: Rosemary.InitProc _ NIL, evalSimple: Rosemary.EvalProc _ NIL, copy: Rosemary.StateCopyProc _ NIL] RETURNS [roseClassName: ROPE]; SimulateGate: PROC [ct: CellType, roseClassName: ROPE]; SimulateMacro: PROC [ct: CellType, roseClassName: ROPE]; Error: PROC [msg: ROPE]; Obsolete: PROC [msg: ROPE]; END. HLogicUtils.mesa Copyright Σ 1987 by Xerox Corporation. All rights reserved. Last Edited by: Louis Monier August 26, 1987 5:43:43 pm PDT Jean-Marc Frailong September 17, 1987 6:33:15 pm PDT Bertrand Serlet June 4, 1987 2:51:40 pm PDT This module provides basic utilities for all the implementation files of Logic.mesa Caches All Logic functions try to cache their CellType results (this does not apply to wire icons). The convention is that the caching name should be "FunctionName Arg1=Value Arg2=Value ...". The cache may be disabled, cleared or reloaded from a corelib using the Reset function. Fetch an already computed cell type from the Logic cache. Returns NIL if not found. Store a new entry in the cache. Will raise an error if the entry was already there... Initialize state of LogicUtils (default arguments are NoOp): - reloadDesign TRUE => recreate the context from which Extract works and clear cache - cache leave => current state remains (but erase if reloadDesign=TRUE) reload => reload cache from core file and check dates are consistent erase => make the cache empty disable => disable the cache Accessing basic cells (with associated layout) Retrieves the cell cell from library named lib (might read a .corelib file). Avoid this function, it might become obsolete. Fetches the basic cell from the CMOSB library. Extraction utilities A value to be stored into a Sisyph context Returns the context derived from the "Logic.dale" library. If needed only to extract a schematic with INT parameters, use the Extract function. Extracts from the Logic library with the given (INT) parameters. Transforms a composite cell type into a basic element for placement. The effect of this procedure is controlled by a global switch (c.f. implementation) Rosemary sugar A thin veneer on top of Rosemary.Register so that all roseNames start with Logic... Bind cell type at gate level with specified roseClassName Bind cell type at macro level with specified roseClassName Error management Display message on Terminal Display message on Terminal, raises a signal if debug flag set (see implementation) Κ›˜codešœ™Kšœ<™