Skip to content

fgarci03/pylectronics

Repository files navigation

Forks Stargazers Issues MIT License


Pylectronics

Reproduce digital electronics in Python

Report Bug · Request Feature

Table of Contents

  1. About The Project
  2. Getting Started
  3. Usage
  4. Coding Guidelines
  5. Roadmap
  6. Contributing
  7. License
  8. Contact

About The Project

This project is an attempt to reproduce digital electronics in Python. Its ultimate goal is to be able to build an actual CPU by simulating the core components of a real, physical, processor (using Transistors to build Logic Gates, using Logic Gates to build a Half Adder, using Half Adders to build Full Adders, and so on and so forth...).

By adding more components to the project, you will be helping achieve that goal!

Getting Started

Prerequisites

Make sure you have virtualenv and Poetry installed.

Installation

  1. Clone the repo
    git clone https://github.com/fgarci03/pylectronics.git
  2. Create the virtualenv
    virtualenv venv
  3. Use it
    source venv/bin/activate
  4. Install packages
    poetry install

Usage

The project is yet in its infancy, so there is not much to show for apart from some components.

Coding Guidelines

This project uses Black, Prospector, and Pytest. It is set to enforce all the linting rules and 100% test coverage when running:

./run_tests.sh

Roadmap

See the open issues for a list of proposed features (and known issues).

It's tough to provide a real roadmap at this stage, since I'm still learning about digital electronics. Nonetheless, there are a few concepts that should be thought about to allow the project to grow:

  • Memory: All computers need memory. Whether D-Type FlipFlops, or SR Latches, we will need these components to build more complex components...
  • Unified Interfaces: It would be nice to have some utilities baked into all the components that can give us some stats:
    • Number of Transistors in this component
    • Total Number of Transistors,
    • Timing functions to measure performance
    • Etc
  • and more!

Contributing

Any contributions you make are greatly appreciated.

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Do your magic
  4. Make sure tests pass with 100% coverage, as well as static validation (./run_tests.sh)
  5. Commit your Changes (git commit -m 'Add some AmazingFeature')
  6. Push to the Branch (git push origin feature/AmazingFeature)
  7. Open a Pull Request

License

Distributed under the MIT License. See LICENSE for more information.

Contact

Filipe Garcia - https://filipe-garcia.com

Project Link: https://github.com/fgarci03/pylectronics

About

Reproduce digital electronics in Python

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published