page 1  (4 pages)
2to next section

Using C++ to Model Digital Circuit Design Data

Colin Charlton, Paul Leng and Mark Rivers Department of Computer Science, University of Liverpool, P. O. Box 147, Liverpool L69 3BX, U. K. Telephone: +44 51 794 3679

Integration of circuit CAD activities into a single design framework requires that CAD data of widely differing forms be integrated into a single design database. This results in data which is highly structured, multidimensional and very complex; most current database models (for example the relational model) lack the expressive power to efficiently represent such data. The authors have developed an object-oriented model for digital circuit CAD data. This paper describes an ongoing project to build a digital circuit design framework in C++, using the object-oriented features of the language to implement this model.


Digital circuit CAD data involves several forms, such as schematic, board layout, functional or timing information, or documentation. The CAD activity centres around the use of tools to perform operations on data from one or more of these forms | for example editing a schematic, deriving an IC mask layout from a schematic, or verifying a schematic against a functional specification. Many existing CAD systems consist of independent tools that act upon data files of different formats. Often, programs are also required to translate between formats. Invocation of the tools and translators, and organisation of the data files, is left to the designer. Such management of design data is inconvenient, confuses the design process and wastes the designer's time.

Recent research has tended towards an integrated approach to CAD data management, where tools function as applications over a single design database[4, 5]. This database must model all the concepts represented in the previous set of independent formats; hence the model becomes highly structured, multi-dimensional and very complex. It is widely recognised that the conventional relational database model falls short of the requirements for representing such data, primarily due to its poor modelling expressiveness. The complex multi-dimensional design data has to be mapped onto a flat" relational structure and, worse still, this mapping has to be explicitly coded into every application that uses the database[7].

This paper describes the current state of an ongoing implementation of an object-oriented database for digital circuit design data. In a previous paper[3], the authors proposed an object-oriented model for circuit design information, which had been partially specified in Smalltalk. Although Smalltalk was originally to be used as the implementation language for the prototype system, a number of reasons led to C++ being chosen instead. These reasons were mostly practical, such as for compatibility with existing software and to take advantage of the better local support for C++ programming. Although there have been some advantages in using the C++

language for this project, there have also been problems. This paper considers, in particular, the use of

C++ for the implementation.

The aim of this research is to use this implementation to evaluate the advantages and disadvantages of the object-oriented paradigm for modelling circuit design data in an integrated CAD system.

The Object Base

To avoid having to translate the CAD data to a linearised form for storage in files, a persistent objectbase is used to provide the same basic mechanism for representing the data structure in storage as is employed in the memory space of an application program | that is, a net of objects linked by pointers. The dereferencing of pointers is used as a logical interface to the object-base; within an application program the objects are virtual" (they may or may not actually be in local memory), and the pointers are smart" (they ensure that their subject is in local memory before access). This logical interface hides the implementation of the object-base storage layer from the applications; although the prototype system uses a simple store based on a UNIX dbm file, this could be invisibly upgraded to a distributed store with concurrency control | provided the logical interface is not modified.

The class Object provides the properties concerned with persistence. An object cannot be persistent unless its class inherits from Object. Class Object serves three purposes:{

ffl Object identification. A C++ pointer is not suitable as an object identifier (OID) since it is only valid in the memory and lifetime of one program execution. When a new persistent object is created, it is given an integer OID unique throughout the object-base.

ffl Storage capabilities. Object defines a virtual member function save(), and every derived class of Object redefines save() as a call to save() on the base class followed by code to save members added by the derived class. One of the constructors is used similarly to load objects.

ffl Class identification. The virtual function classID() is redefined in every derived class to return an identifier integer unique to that class.