next up previous contents
Next: C++ and Object-Oriented Programming Up: Circuit Description and Previous: List of Figures


As high-level computer programming languages become increasingly more powerful and abstract, there is a tendency amongst the computing society to use such general purpose languages for the benefit of their own fields of research and study. Instead of using highly specific languages, which are usually restricted in their scope and availability, members of both the software and hardware community are tempted to use higher level languages that are more accessible and flexible. This report will show how one such high-level language and its support for the object-oriented programming paradigm can be used for both the description and simulation of hardware modules.

Using general purpose languages for hardware description is by no means a novel concept. Several attempts have been made to use languages such as LISP [10], Flavors [21], LOOPS [2], Mainsail [4],[15] and even Ada [7] for the purpose of hardware description and simulation. The underlying theme of nearly all these attempts is to treat hardware devices as a collection of abstract, interconnected objects which pass messages, in the form of signals, to one another. This, of course, is a very natural and intuitive way to think about hardware and, as will be discussed later, the very heart of the object-oriented programming paradigm.

The advantages of using a popular general purpose language for hardware description and simulation are multifold. Firstly, if the hardware designer is already familiar with the language from software development, then all he or she has to do is to apply the language to the problem of hardware description and simulation. This means that the designer does not have to learn an entirely new language with its own peculiar syntax rules and idiosyncrasies. Secondly, general purpose languages have a much greater population of users than do languages which specifically support hardware description. Therefore, translators, compilers and/or interpreters for such high-level languages are usually more readily available, efficient and reliable. Thirdly, using the same language to both describe and simulate hardware creates a more uniform and consistent environment for the user. This uniform environment results in more control, since the designer does not have to keep track of one language for circuit description and an entirely different language for parsing the circuit description and simulating it.

Obviously, some high-level languages are better suited for hardware description and simulation than others. A language which can be used for hardware description and simulation must permit the designer to specify the hardware in an intuitive and hierarchical manner, consistent with how the designer thinks. In addition, such a language must be easily extensible so that new modules can be easily added without any modifications being made to the simulation code. Ideally, such a language must also provide support for circuit designs at several levels of abstraction and should also give the designer the choice of either using a ``bottom-up'' or a ``top-down'' approach to circuit description.

The several languages mentioned satisfy most, but not all, of these requirements. Languages such as LOOPS and Flavors are LISP-like in their structure and are cumbersome and unintuitive to use due to syntactic deficiencies, such as the gratuitous use of parenthesis. Also, these languages appear to lack a standard which is acceptable by all. Other high-level languages commonly used to describe hardware, such as Ada, are more standardized and also somewhat more popular. However, these languages are usually object-based rather than object-oriented. This report will attempt to demonstrate that languages which provide support for object-oriented programming are very amicable to the description and simulation of computer hardware.

One language which appears to satisfy all the requirements for a hardware description and simulation language is C++. In addition to providing support for object-oriented programming, this language is also undergoing standardization by ANSI, which means that the language mechanisms and features used by this report should be portable across most C++ compilers. Since use of the language is undergoing exponential growth, C++ compilers and translators have be written for a variety of platforms. Therefore, C++ is available to a wide community of programmers.

This dissertation is separated into three major sections dealing with C++ and the object-oriented paradigm, circuit description and circuit simulation using C++. The first section serves as an introduction to the basic mechanics and techniques associated with the object-oriented paradigm and how C++ provides support for this paradigm. The remainder of the dissertation will discuss ways to describe and simulate circuits using this paradigm. It will be shown how concepts of object-oriented programming map cleanly into the problem of hardware description. In addition, an argument will be made against the traditional approach of using a so-called global event queue for simulating hardware and an attractive alternative, namely the concept of a distributed event queue, will be introduced and discussed.

next up previous contents
Next: C++ and Object-Oriented Programming Up: Circuit Description and Previous: List of Figures

Donald Craig
Sat Jul 13 16:02:11 NDT 1996