Skip to content
master
Switch branches/tags
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 
 
 

A circuit description language and simulator intended for making a CPU from nand gates.

This post describes the motivation and some internals.

Running (the default CPU with the sample preloaded into ROM)

pip install -r requirements.txt
python parse.py

Running your own CPU

from parse import make_gates, rom, cpu_cycle
program = "# Your CPU description here"
gates = make_gates(program)
rom[:] = [0b00, 0b10, ...] # Format this for your CPU
while True:
    cpu_cycle(gates['CPU'])

Tests for gates used in the default CPU

python test.py

The default CPU is based on Nand game which itself is based on Nand to Tetris.

About

A circuit description language and simulator, intended for making a CPU from nand gates.

Resources

Releases

No releases published

Packages

No packages published

Languages