Coder Social home page Coder Social logo

ardis196658 / lispmicrocontroller Goto Github PK

View Code? Open in Web Editor NEW

This project forked from jbush001/lispmicrocontroller

0.0 1.0 0.0 355 KB

A microcontroller that natively executes a simple LISP dialect

Makefile 0.71% Python 33.09% NewLisp 15.71% Verilog 32.34% Common Lisp 18.15%

lispmicrocontroller's Introduction

Build Status

This is a simple microcontroller that runs a compiled LISP dialect. Details of operation are in the wiki.

Running in simulation

This has been tested with Icarus Verilog (http://iverilog.icarus.com/), although other tool flows are probably similar. Tests can be run as follows:

Automated tests

    make test 

Tests are located in the tests/ directory. The test runner will search files for 'CHECK:'. The output of the program will be compared to whatever comes after this declaration. If they do not match, an error will be flagged.

Manually running a program

  • Compile the LISP sources.
    This will produce two files: program.hex, which has the raw program machine code and is loaded by the simulator, and program.lst, which is informational and shows details of the generated code. For example:
    ./compile.py tests/test1.lisp

Note that any writes to register index 0 will be printed to standard out by the simulation test harness, which is how most simulation tests work.

  • Run simulation.
    The simulator will read rom.hex each time it starts.
    vvp sim.vvp

Running in hardware

This has only been tested under Quartus/Altera with the Cyclone II starter kit. There are a couple of projects located under the fpga/ directory:

  • 7seg: simple program that displays numbers on the 4-digit, 7 segment display
  • game: a little arcade-style demo with animated sprites

To build:

  • Compile the LISP sources.
    These are located in the project directory, but must be compiled from the top directory. For example, from LispMicrocontroller/

      ./compile.py fpga/game/game.lisp
    

    rom.hex will be created in the top level LispMicrocontroller/ directory.

  • Synthesize the design Open the program file (for example, fpga/game/game.qpf). Note that the synthesis tools will read rom.hex to create the values for program ROM. If you recompile the LISP sources (thereby changing rom.hex), the design must be re-synthesized.

  • Run using the programmer included with Quartus.

lispmicrocontroller's People

Contributors

jbush001 avatar ardis196658 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.