Repository navigation
Getting Started
This page gives an insight on how to run the project.
To compile and run this project, you need:
- C++ compiler supporting C++11 or later (e.g., GCC/G++)
- CMake (optional for build automation)
- Basic understanding of Digital Circuits
Note: Now the Project can be compiled and run using just 2 commands and clear all the cache files in 1 command using MakeFile concept.
Tests will be implemented soon.
Make sure you have cloned the GitHub repo into your local system if you have not already:
git clone https://github.com/Prometheus052404/CIRCUIT.gitUse the below commands in Git Bash at your Project's Root Directory:
git fetch
git pullAs you have made sure that you're up-to-date, you are now ready to continue ahead!
-
Navigate to the project directory:
cd DigitalLogicSimulator -
Compile the project:
g++ src/*.cpp main.cpp -o simulator -
Run the executable:
./simulator
-
Create a 'build' directory:
mkdir build && cd build
-
Generate Makefiles from CMake:
cmake ..
-
Build using Make:
make
-
Run the program:
./bin/DigitalLogicSimulator
Note: Skip this section if make --version gives desired output in your git bash
If you are using Windows and have wsl installed, but not make, then follow the below steps:
- Go to ezwinports, i.e. https://sourceforge.net/projects/ezwinports/files/
- Download
make-4.1-2-without-guile-w32-bin.zip(get the version without guile) - Extract zip
- Copy the contents to
C:\Program Files\Git\mingw64\merging the folders, but do NOT overwrite/replace any exisiting files.
If you are using Ubuntu/Debian,
-
Open WSL and update the package list:
sudo apt update
-
Install make:
sudo apt install make
Navigate to your project directory within WSL and run make. OR
sudo apt install build-essentialbuild-essential includes make and other essential development tools like gcc and g++.
For MacOS,
- If you have Homebrew installed, you can install
makewith:brew install make
- Open a new Git Bash window to refresh your PATH.
- Run:
make --version
This should display the version of make if it’s installed correctly.
Create the Project using Makefile:
makeExecute the code:
./DCSimulatorRemove all the build / cache files:
make cleanNote: Run the above commands in git bash, at the project's root directory.