Giter VIP home page Giter VIP logo

bf-processor's Introduction

Brainf*ck Processor

This is project with the goal of implementing a brainf*ck interpreter in hardware, creating a processor that uses brainf*ck as its architecture.

This first version separates the memory of the program from the memory that hold the instructions, and implements a branching logic, that although simple, creates a slow runtime when the program uses too many loops.

Micro Architecture

The processor is separated in 4 main datapaths. bf_datapath

Memory Datapath

Handles the +->< instructions. memory_datapath

Intruction Datapath

Stores and decodes the instructions. It has pins (PC and Instruction) that are to be used to add external "EEPROMS" on testbenches. If the Instruction returned by the memory element isn't one of these ascii characters +-><[]., the processor will have a undefined behaviour. instruction_datapath

Jumping Datapath

Handles the []instructions. jumping_datapath

IO Datapath

Handles the ., instructions. io_datapath

Tools Used

This project was developed with Quartus Prime Lite (2020) (from this nix package) and uses VHDL as its main HDL language. The testbenches were coded for usage in the ModelSim that comes with Quartus.

Statistics

These are statistics from compiling the top entity bf_datapath on Quartus for a MAX 10 device.

Type Number
Logic Elements 2736
Registers 2120
Pins 52

Execution times of different bf programs from ModelSim simulation.

.bf file Name in Testbench Execution Time (ns)
Adding two values test01.bf 1346
Ola Mundo! test02.bf 13850

bf-processor's People

Contributors

loco-choco avatar

Stargazers

Rafael Venetikides avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.