Coder Social home page Coder Social logo

rt's Introduction

Racing the Beam Ray Tracer

This project implements a Real-Time Ray-Tracer on a small FPGA.

You can read all about it here.

I also gave a presentation about this at Bang Bang Con West (slides, video).

HW Requirements

  • A Pano Logic G1 (one with VGA port)
  • A JTAG programmer to load the bitstream into the FPGA

Loading the Bitstream

If you simply want to run the finished project on your Pano, then all you need to do is load a pre-made bitstream into the device.

The bitstream can be found here.

Changing the software

You don't to resynthesize the bitstream to change the software that runs on the MR1 RISC-V processor.

Once you have made the changes to your C code, just do the following:

cd xilinx
make update_ram

This will update the Pano.bit file with your latest binary.

Building Everything from Scratch

  • Install RISC-V GCC compiler suite.

    See the picorv32 github project on how to do that. It can take a long time to build!

  • Install SpinalHDL.

    The actual installation instructions can be found in the VexRisc project.

  • Clone this github repository to ~/projects/rt.

  • Build font binary file

cd ~/projects/rt/fonts
make
  • Build the firmware. This creates a file called ./sw/progmem8k.bin.
cd ~/projects/rt/sw
make
  • Build the Verilog for synthesis.

    When you run this, not only will you create the Pano.v file, but also a bunch of .bin file that contain RAM initialization contents, which will be loaded by Xilinx ISE during synthesis

cd ~/projects/rt
make syn
  • Fire up Xilinx ISE
cd ~/projects/rt/xilinx
make ise
  • Create the bitstream

    • File -> Open Project -> ~/projects/rt/xilinx/xilinx.xise
    • Double click on 'Generate Programming File'
  • Fire up Xilinx Impact

cd ~/projects/rt/xilinx
make impact
  • Load bitstream into the device

Simulation

I have an eye-balling-only simulation set up.

To use it, you first need to make 1 change in the RTL:

Change this line to

    val hwMulGlobal = false

After that, just do make sim.

The simulation can take quite a while because it simulates a full frame at 648x480.

To see waveforms, do make waves.

Don't forget to do the hwMulGlobal change before you generate the synthesis Pano.v, because otherwise the design won't fit in the FPGA!

rt's People

Contributors

tomverbeure avatar

Stargazers

Oleg Libin avatar Francisco Ayala Le Brun avatar  avatar Georgios Karnas avatar aitesam961 avatar Dyxn avatar Reza avatar Octatao Chen avatar Kayla Firestack avatar Seb Holzapfel avatar  avatar Julien-Ar avatar André Magoga avatar  avatar sylefeb avatar  avatar Chen Tao avatar  avatar Alexei A Smekalkine avatar  avatar  avatar fatih avatar Mtv Europe avatar Stephan Unverwerth avatar Benjamin Choy avatar Sina yeganeh avatar Edward Humes avatar  avatar splinedrive avatar Jevin Sweval avatar Sean Jensen-Grey avatar Jay Kickliter avatar Erfan Hanifezade avatar Vitaly Domnikov avatar Timothy avatar Peter Kohaut avatar Ercan Ersoy avatar Ismael Pérez R. avatar Roman Hossain Shaon avatar David Dias avatar  avatar Lin Hsu avatar David Richmond avatar Nikita avatar Javed Khan avatar Tyler Wilcock avatar Joel Kirchartz avatar Shubham Kamthania avatar Nicolas Sauzede avatar Joshua Bassett avatar  avatar  avatar David A Roberts avatar Midsage avatar Daryl Van Dyke avatar bperris avatar UnsafePointer<T> avatar  avatar Keith Legg avatar Kangmin avatar  avatar Pablo Nuñez Pölcher avatar Dan Kirkham avatar Kareem Matariyeh avatar Second Datke avatar erwin maruli tua pakpahan avatar Lsong avatar JMA avatar Mahmut Akkuş avatar Thanassis Tsiodras avatar  avatar  avatar Samuel Stauffer avatar Sven avatar sprhawk avatar Will Green avatar  avatar Skip Hansen avatar Chawit Leosrisook avatar S J avatar Owen Trueblood avatar svofski avatar Gerad Munsch avatar ryan avatar  avatar  avatar

Watchers

Jevin Sweval avatar Shepard Siegel avatar James Cloos avatar  avatar

rt'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.