GithubHelp home page GithubHelp logo

toy-8_cpu's Introduction

TOY-8 CPU in Logism

The following is a TOY-8 CPU, a simplified version of the TOY CPU.
Toy-8 CPU WS is an extended version with shifters.

PREREQUISITES

The above circuit is build using Logism-Evolution.
https://github.com/logisim-evolution/logisim-evolution

How To Use

• Open the circuit in Logism-Evolution.
• Go to the Interface circuit to view the user controls.
• To begin inputting your program, first enable Auto-Tick from the Simulate Tab.
• Ideally set the Auto-Tick Frequency to 2Hz, but faster work as well.
• Then load your program by inputting the address and the data.
• Hold the LOAD button for a second to load that value.
• Once done, disable Auto-Tick and if the clock is high, click it one to set it to low.
• Also set the data and address input to 0.
• Then click on the RUN button to enable the CPU. This will be evident by the LED turning green.
• Then just enable Auto-Tick again and watch it run.
• It will come to halt at the end of the program.

INSTRUCTION SET

Opcode Operation Pseudocode
0 Halt Halt
2 Add R = R + M[addr]
3 Left Shift R = R * 2
4 Bitwise AND R = R & M[addr]
5 Right Shift R = R / 2
6 Bitwise XOR R = R ^ M[addr]
8 Load Addr R = addr
A Load R = M[addr]
C Store M[addr] = R
E Branch if (R == 0) PC = addr

*Note: For left/right shift, the value in the address part can be anything. It does not effect the operation.

toy-8_cpu's People

Contributors

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