Giter Club home page Giter Club logo

cscv2's Introduction

Crazy Small CPU, version 2

This repository holds the files associated with Warren's crazy small breadboard CPU built with only eleven chips. For more details on the design of the CPU itself, see the Crazy Small CPU website.

The files are:

  • crazycpu.circ, a version of the CPU that runs in Logisim
  • Schematic.pdf, a PDF version of the CPU's breadboard design done in Kicad
  • cas, the assembler for the CPU
  • clc, a very crude compiler that outputs assembly that can be given to cas
  • csim, a simulator that can run assembled programs. This allows you to test programs without loading them into Logisim or burning ROMs
  • gen_alu, a program to generate the contents of the ALU ROM
  • notes, my journal and notes as I went through the design and implementation stages
  • Makefile, to help make some of the ROM files. make all will build the ALU ROM contents, assemble fibminsky.s and produce the top and bottom control ROM images

Some example programs in the Examples directory include:

  • fibminsky.s, a program that calculates Fibonacci numbers and then draws a sine wave using Minsky's circle algorithm.
  • genfibn, a Perl program that generates the assembly code for the Fibonacci program. You tell it what size Fibonacci number to generate, up to 24 digits.
  • minsky.cl. This is a reimplementation of the Minsky's circle algorithm program in the high-level language, just to test the compiler. Use the Makefile to build minsky, then run csim by hand.
  • bubblesort.s, sort an array of numbers with Bubblesort.
  • circle.s, draw a circle using Minsky's circle algorithm and VT100 escape sequences.
  • decimal.s, print out numbers in decimal.
  • enumttt.s, enumerate winning tic-tac-toe boards.
  • firstfunction.s, an example of function calls and returns.
  • genascii.s, generate all the printable ASCII characters.
  • hanoi.s, perform the Towers of Hanoi algorithm.
  • hexbench2.s, a CPU speed testing program.
  • mel.s, print two stanzas of "Mel the Programmer".
  • printdecs.s, print out numbers in decimal.
  • printhex.s, print one number out in hexadecimal.
  • printhexes.s, print numbers out in hexadecimal.
  • stack.s, an example of a stack and its operations.

The Verilog directory holds an implementation of the CPU in Icarus Verilog. A description of the CPU's instruction set can be found in Instructions.md. A description of the cas assembler and the csim simulator can be found in Usage.md.

If you want to leave any comments, feel free to use the GitHub issues page for this purpose.

cscv2's People

Contributors

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