Giter Site home page Giter Site logo

danodus / graphite Goto Github PK

View Code? Open in Web Editor NEW
6.0 2.0 3.0 5.86 MB

FPGA based system with 2D/3D graphics acceleration

License: MIT License

SystemVerilog 3.64% Makefile 0.27% C++ 0.95% C 93.91% Python 0.30% Verilog 0.85% Assembly 0.07%
fpga graphics

graphite's Introduction

Graphite

Graphite is a FPGA based open source system with 2D/3D graphics acceleration.

Utah Teapot

Documentation

The documentation is available here: https://danodus.github.io/graphite/

Features

The system has the following features:

  • RISC-V (RV32I + Graphite extension)
  • UART (2000000-N-8-1)
  • SDRAM (32MiB shared between CPU and video)
  • Set associative cache (4-way with LRU replacement policy)
  • VGA (60 Hz), 480p (60Hz), 720p (60Hz) or 1080p (30Hz) HDMI video output with framebuffer (RGB565)
  • 2D/3D graphics accelerator (textured triangles)
  • PS/2 keyboard
  • PS/2 mouse
  • SD Card with hardware SPI

Requirements

(*) Extract and add the bin directory to the path.

Note: Tested with oss-cad-suite-darwin-arm64-20240515 and xpack-riscv-none-elf-gcc-13.2.0-2-darwin-arm64.

Getting Started on ULX3S

cd soc/src/bios
make
cd ../../rtl/ulx3s
make clean;make VIDEO=<video mode> CPU_SPEED=<cpu speed> prog
cd ../../src/examples/test_graphite
make run SERIAL=<serial device>
picocom -b 2000000 <serial device>

and press 'h' for help.

The following video modes are available:

Video Mode Description
vga (default) 640x480 60Hz
480p 848x480 60Hz
720p 1280x720 60Hz
1080p 1920x1080 30Hz

The following CPU speeds are available:

CPU Speed Description
slow (default) 40MHz
fast 50MHz

System Simulation

cd soc/src/examples/test_video
make
cd ../../../../soc/rtl/sim
make run PROGRAM=../../src/examples/test_video/program.hex

Graphics Accelerator Simulation

cd rtl/sim
make run
  • Press 1 to select the cube model;
  • Press 2 to select the teapot model;
  • Press W/A/S/D and arrows to move the camera;
  • Press SPACE to start/stop the rotation of the model;
  • Press TAB to enable/disable the wireframe mode;
  • Press T to enable/disable texture mapping;
  • Press L to increase the number of directional lights;
  • Press G to enable/disable Gouraud shading.

Acknowledgements

graphite's People

Contributors

danodus avatar

Stargazers

Will Green avatar sh4 avatar Robert Winkler avatar  avatar WENJUN ZHANG avatar

Watchers

 avatar  avatar

graphite's Issues

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.