Giter VIP home page Giter VIP logo

olafv2-cpu's Introduction

OLAFv2 Processor

OLAFv2 is a virtual CPU, emulated over a program called Logisim, running a custom Operating System that compiled with a special Assembler.

This project is an educational project, which is used to give an intuition on how CPUs could work. Note: this chip is differently from other (and real) CPUs. when I did my research around this project, I tried to only get an intuition about how a processor could work, and I tried to design a CPU that will work internally different from other real life CPUs.

I hope you will find this project entertaining and educational as much as I did.

OLAFv2CPU

Overview

The code is divided to 3 parts:

  • The CPU itself
  • Am assembler for OLAFv2's assembly
  • Basic Operating System written in OLAFv2's assembly

How to run

Compile the OS

from the top folder, run python3 ./Assembler/assembler.py the output should go to OS/BOOT.rom and OS/initram.ram

Loading the OS into the machine

To emulate the CPU, you should download Logisim. Once downloaded, load the CPU/olaf2.circ to Logisim with File->Open.

Then, press with the right click on the ROM (the block behind the CPU) and press Load Image... and select the newly compiled OS/BOOT.rom. The rom should be filled with hexadecimal numbers. Load the RAM (the block behind the ROM) the same way, but now load the file OS/initram.ram

Starting the CPU

So everything is loaded now and it's time to start the simulation. In Logisim, under Simulate (on the top bar), change the Tick frequency to 256Hz or above.

Then Press Ctrl+K or Simulation -> Ticks Enabled

Good Luck!

olafv2-cpu's People

Contributors

itaysaadia 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.