TRIBHUWAN UNIVERSITY
INSTITUTE OF ENGINEERING
PULCHOWK CAMPUS
A PROJECT PROPOSAL ON
APPLICATION OF OBJECT-ORIENTED PROGRAMMING IN
‘DIGISIM’ USING C++
SUBMITTED BY
Pawan Kharel (079BCT056)
Rabin Lamicchane (079BCT065)
SUBMITTED TO
DEPARTMENT OF ELECTRONICS AND COMPUTER ENGINEERING
Date:06/26/2024
Acknowledgement
We would like to express our heartfelt appreciation to our professor, Er. Daya Sagar
Baral, for his insightful lectures, encouragement, and unwavering guidance and
support. Additionally, we are grateful to the Department of Electronics and
Computer Engineering at Pulchowk Campus, Institute of Engineering, for
providing us with this opportunity to create, learn, and collaborate.
This collaborative project allows us to apply the tools and knowledge we have
acquired to build a functional application while gaining valuable skills along the
way.
Throughout this project, we look forward to learning new skills and receiving
valuable guidance and feedback from our professors.
Authors:
Pawan Kharel (079BCT056)
Rabin Lamichhane (079BCT065)
Table of Contents
1. Introduction .................................................................................................... 1
2. Objectives ........................................................................................................ 2
3. Existing System ............................................................................................... 3
4. Proposed System ............................................................................................. 4
5. Methodology .................................................................................................... 6
5.1. Requirement Analysis .............................................................................. 6
5.2. System Design ......................................................................................... 6
5.3. Development ............................................................................................ 6
5.4. Testing...................................................................................................... 7
5.5. Deployment and Documentation ............................................................. 7
6. Project Scope ................................................................................................... 8
6.1. User Interface: .......................................................................................... 8
6.2. Core Functionalities: ................................................................................ 8
6.3. Development Phases ................................................................................ 9
6.4. Constraints ............................................................................................... 9
6.5. Deliverables ........................................................................................... 10
7. Project Schedule............................................................................................ 11
References ............................................................................................................. 12
1. Introduction
As part of our BCT II/I curriculum, we have been tasked with developing a C++
program that incorporates all the major concepts of object-oriented programming.
We have decided to create a digital logic simulator, which we have named
"Digisim." Our goal is to provide an intuitive and visually pleasing interface for
digital logic circuit simulation, for which we will be utilizing the popular GUI
library GTKMM.
Taking inspiration from existing simulators, Digisim will have the capability to
create custom chips and use them to construct other chips. This feature will allow
users to design complex digital logic circuits from simpler components.
Through this project, we aim to strengthen our understanding of object-oriented
programming concepts and develop a user-friendly simulator for digital logic
circuits. Digisim will offer practical utility for engineering students, enabling them
to design digital circuits easily from the comfort of their computers.
1
2. Objectives
Our objectives with this project are as follows:
a. To apply the concepts of object-oriented programming in a practical
application.
b. To learn and implement external libraries like GTKMM for GUI
development.
c. To become familiar with the workflow of building a large-scale project.
d. To learn collaborative programming and teamwork.
By achieving these objectives, we aim to deliver a practical tool that aids students
and professionals in digital logic design while also solidifying our understanding of
object-oriented programming and software development principles.
2
3. Existing System
Our project draws significant inspiration from existing digital simulators,
particularly the simulator developed by Sebastian Lague. His program, named
"Digital Logic Sim," is an open-source application developed using the Unity
engine and is available for free on GitHub and his personal website (Sebastian
Lague, 2014).
In Digital Logic Sim, users can create and save custom chips within a designated
working area. These saved chips can then be reused to construct more complex
circuits. The interface allows for the creation of input terminals on the left side of
the window and output terminals on the right side. The simulation runs
continuously, meaning there is no need to press a "run" button to view the output;
the output updates automatically as the circuit state changes. This application offers
a well-organized system for building and saving chips across different projects.
Fig. 3.1 UI of Digital Logic Sim by Sebastian Lague
This application has many features is well built but the like basic feature of being able to
delete the selected wires and chips by pressing the delete key or the backspace key is
missing which will be implemented in our version.
3
4. Proposed System
Fig 4.1 Block diagram of Digisim
Our project will follow the general style and mechanisms of Digital Logic Sim.
The GUI components will be designed with user-friendliness and visual appeal in
mind.
4.1. Splash Screen
A splash screen will welcome us to the program which will then progress to
the start-menu.
4.2. Start Menu
This is where saved projects can be loaded, and new projects can be created.
A new project will have two pre-made chips: a NOT gate and an AND gate.
These chips were chosen because they can be combined to create the
universal NAND gate while providing enough options on their own.
4
4.3. Creation Area
The Creation Area is where chips can be designed. Initially, only the NOT
and AND gate chips are available, but custom chips can be used once they
are created. Input terminals can be added by clicking on the left edge of the
area, and output terminals can be added by clicking on the right edge.
Clicking on a terminal pin or chip pin will create a wire, which can then be
connected to other pins by clicking on them. The designed circuit can be
saved as a new chip, which can be used to create other chips.
4.4. Simulation Action Bar
It contains the menu button and chips and is located below the Creation
Area. The menu button provides additional options in the program, and the
chip buttons are used to add chips (default or user-created) to the Creation
Area.
5
5. Methodology
The Digisim project will involve the following development phases:
5.1. Requirement Analysis
a. Gather requirements and gather feedback from potential users.
b. Define the project scope and objectives
c. Identify timeframes, resource requirements, and technical constraints.
5.2. System Design
5.2.1. System Architecture Design
a. Define the flow of the program and the overall system
architecture using the flowchart.
b. Design the components required, their functions, and their
interactions.
5.2.2. User Interface Design
a. Define the overall theme and user interface.
b. Design the start menu.
c. Design the chip design area and the Action bar.
5.3. Development
5.3.1. Input Processing Module
Parse and validate user inputs for creating circuits with AND and NOT
gates.
5.3.2. Circuit Design Module
Implement drag-and-drop functionality and real-time feedback for circuit
design.
5.3.3. Custom Chip Creation Module
Enable creation, saving, and management of custom chips from basic gates.
6
5.3.4. Simulation Module
Develop real-time simulation to display accurate circuit behavior and
output.
5.4. Testing
This phase will include testing individual modules and components to ensure
proper functionality. Additionally, the application will undergo real-world
testing with volunteers to identify and resolve bugs, enhancing overall user
experience.
5.5. Deployment and Documentation
The final version of the software will be developed and uploaded to GitHub as
open source. Comprehensive documentation, including user guides, FAQs, and
technical documentation for future maintenance and upgrades, will also be
prepared.
7
6. Project Scope
This project aims to develop a user-friendly and efficient Digital Logic
Simulator using an object-oriented programming (OOP) approach. The
simulator will enable users to design, test, and visualize digital logic circuits,
and serve educational and professional needs in digital electronics and logic
design.
6.1. User Interface:
6.1.1. Design:
Develop an intuitive graphical interface that allows users to design circuits,
add various components, and visualize digital logic circuits' behavior.
6.1.2. Interaction:
Implement interactive elements such as drag-and-drop for components, real-
time circuit behavior updates, and clear logic flow representation.
6.2. Core Functionalities:
6.2.1. Basic Components:
Provide a library containing AND and NOT gates as the fundamental
building blocks.
6.2.2. Custom Chip Creation:
Allow users to create custom chips by combining AND and NOT gates.
Users can save and reuse these custom chips in their designs.
6.2.3. Circuit Design:
Enable users to create, modify, and save complex circuits by connecting
different components, including their custom chips.
6.2.4. Simulation:
Offer real-time simulation of designed circuits, displaying logical flow and
output based on inputs.
8
6.3. Development Phases
6.3.1. Requirement Analysis:
Gather detailed requirements and define the project’s scope and objectives.
6.3.2. System Design:
Design the user interface and overall system architecture, including
interaction flow as shown in the provided flowchart.
6.3.3. Development:
Implement core modules, including input processing, circuit design area,
component interaction, and real-time simulation.
6.3.4. Testing:
Conduct unit, integration, and user acceptance testing to ensure
functionality, usability, and performance.
6.3.5. Deployment and documentation:
Prepare the final version for deployment, ensuring stability and user-
friendliness and create comprehensive user manuals, help guides, and
technical documentation for future maintenance and development.
6.4. Constraints
6.4.1. Technical Constraints:
Ensure the application meets all technical requirements and constraints
identified during the requirement analysis phase.
6.4.2. Time Constraints:
Follow the project schedule to ensure timely completion of each phase,
avoiding delays in project delivery.
9
6.5. Deliverables
6.5.1. Software
A fully functional Digital Logic Simulator with an intuitive user interface
and robust simulation capabilities, including the ability to create and save
custom chips.
6.5.2. Documentation
Provide detailed user manuals, help guides, and technical documentation to
assist users and developers in understanding and maintaining the
application.
By achieving these objectives and adhering to the defined scope, the project
aims to deliver a practical and powerful tool that enhances the learning
experience for students and provides a valuable utility for professionals in
digital logic design
10
7. Project Schedule
Table 1: Schedule
PROJECT STAGE ESTIMATED SCHEDULE
Brainstorming the logics, program June 26-27
architecture and program flow.
Finalizing the system architecture and June 28-30
logic of the program
Developing Logic and Mechanism of July 1-15
the program in code
Testing and debugging July 15-20 Days
Documentation July 21
Fig 7.1 Gantt chart of proposed project schedule
11
References
Digital logic sim by Sebastian Lague. itch.io. (2023, January 30).
https://sebastian.itch.io/digital-logic-sim
12