Giter VIP home page Giter VIP logo

fx2-sim's Introduction

FX2 simulation

FX2 SoC simulation using Migen and Litex. The 8051 CPU implementation uses Verilog sources from turbo8051.

Development state

The project is still a work in progess. Some part of the implementation is in other repositories. See notes in DEVELOPMENT.md for more information.

Setup

To install required dependencies run the script setup.sh. It should be run from withing a Python virtual environment (python -m venv). All required git repositories are downloaded to INSTALL_DIR, defaults to ../fx2-sim-env. Some dependencies may not be installed automatically, setup.sh will list those at the end.

Running

First build example binaries by invoking make -C firmware.

To run the simulation specify binary file to be loaded, e.g.

python -m fx2.sim firmware/8051/clkspd.bin

Results can be viewed using GTKWave gtkwave build/dut.vcd, or starting from an already prepared GTKWave save gtkwave gtkwave/sim.gtkw.

Docker

The simulation can be also run using the Dockerfile provided. First build the image, e.g.

docker build -t fx2-sim:v1 .

Then run a container:

docker run -it --rm fx2-sim:v1
# inside container
python3 -m fx2.sim firmware/main.bin

To store results locally:

mkdir -p build-docker
docker run -it --rm -v $(pwd)/build-docker:/fx2-sim/build fx2-sim:v1 python3 -m fx2.sim firmware/main.bin

Note that running docker may require root privilages if user is not in the docker group.

fx2-sim's People

Contributors

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