A Digital Circuit Simulator | ![]() |
The digsim project is designed to introduce electrical/computer engineering students to the Object-Oriented paradigm.
Goals
The goals for this project are mainly educational. In particular, a specific problem that electrical engineering students can relate to—digital circuit simulation—is used to explore the following four phases of Object-Oriented practice.
- Analysis:
-
The behaviour of digital circuits is analyzed. In particular, the event-driven model for simulating ideal digital circuits is examined (leveraging a student's knowledge of digital circuits and Boolean algebra). The analysis phase focuses on understanding the problem with scant reference to software issues.
- Design:
-
Once the problem is understood in enough depth, the design of an Object-Oriented architecture—i.e. the classes, interfaces, etc.—can procede. Unlike the analysis phase, software concerns arise here. However, insofar as possible, these software issues should be teated generically at this level. It should be possible for a competent programmer to implement the design in any object-oriented language.
- Implementation:
-
The design can then be impelemented in a some progamming language. I have chosen to use Java. (However, many of my students have also been subjected to an implementation in C. Yes, in C, not C++; although C is not an object-oriented language, it is possible to use it in an object-oriented way.)
- Testing and deployment:
-
The implementation should also be rigorously tested and some strategy for deploying (e.g. packaging, distribution, documentation, etc.) the software product.
How to use this web page
A good starting point is the digsim package description which includes a basic analysis of the digital circuit simulation problem, an overview of the design and links to detailed design documents and implementation.
More intrepid readers can jump directly to the javadocs page.
Background
I believe that the Object-Oriented paradigm is best learned from examples that are relevant to the student. Otherwise, generic examples which are often so simple that a student may say “So what!”.
User interfaces
Although the main goal was and remains the analysis, design and implementation of an event-driven simulation engine, a basic user-interface has been added that allows digital circuits to be simulated without knowledge of the internal workings of the event-driven engine.