Skip to content

NanoTekSpice is a logic simulator that builds a graph (the nodes of which will be simulated digital electronic components, inputs or outputs) from a configuration file, and injects values into that graph to get results done in C++.

Notifications You must be signed in to change notification settings

xRozzo/LogicCraft-Simulator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NanoTekSpice: A Digital Logic Simulation Tool

Overview

LogicCraft Simulator is a powerful digital logic simulation tool designed for educational and engineering purposes. It allows users to build and analyze the behavior of digital electronic components through a configurable graph. This simulator is capable of handling various digital components, including logic gates (AND, OR, XOR, etc.), special components like clocks, memory, and even supports undefined states beyond the basic boolean logic to more accurately mimic real digital electronics.

Project Structure

NanoTekSpice/
|
├── build/                  # Compiled binaries and main executable
|
├── sources/                # Source files for the simulator
|   ├── components/         # Digital components (logic gates, memory, etc.)
|   ├── parser/             # Configuration file parser
|   ├── simulator/          # Simulation engine
|   └── main.cpp            # Main entry point
|
├── include/                # Header files
|   ├── components/         # Component headers
|   ├── parser/             # Parser headers
|   ├── simulator/          # Simulator headers
|   └── nanotekspice.hpp    # Main header
|
├── examples/               # Example configuration files and circuits
|
├── tests/                  # Inputs files for tests
|
├── Makefile                # Compilation script
|
└── README.md               # This file

Usage

To use LogicCraft Simulator, first compile the source code using CMake and then run the simulator with a circuit configuration file as an argument.

./build/NanoTekSpice examples/basic_and_gate.nts

Compilation with CMake

mkdir build
cd build
cmake ..
make

Example configuration for a basic AND gate circuit

.chipsets:
input a
input b
and_gate and0
output s

.links:
a:1 and0:1
b:1 and0:2
and0:3 s:1

Output

> a=1
> b=0
> simulate
> display
tick: 1
input(s):
a: 1
b: 0
output(s):
s: 0

About

NanoTekSpice is a logic simulator that builds a graph (the nodes of which will be simulated digital electronic components, inputs or outputs) from a configuration file, and injects values into that graph to get results done in C++.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published