Skip to content

roshan0282/ttsky-asic-rayforge

 
 

Repository files navigation

How to build the c-implementation of the raytracer

Option 1: Windows (build.bat)

  1. Ensure MSYS2 UCRT64 is installed at C:\msys64\ucrt64 with SDL2 installed
  2. Navigate to c-implementation/ folder
  3. Run build.bat to compile and launch the raytracer

Option 2: CMake (cross-platform)

  1. Install CMake (3.16+) and SDL2
  2. Navigate to c-implementation/ folder
  3. Create a build directory:
    mkdir build && cd build
    cmake ..
    cmake --build . --config Release
    ./raytracer  # or raytracer.exe on Windows

The raytracer renders a 640×480 scene using Q8.4 fixed-point math and displays it in an SDL2 window.

How to use verilator-bench to see proper-implementation-no-uart in action

  1. Edit verilator-bench/config.sh:
    • Set VERILATOR_SOURCE_FOLDER to proper-implementation-no-uart
    • Set VERILATOR_TOP_MODULE to raytracer_simple
  2. In an MSYS2 UCRT64 terminal, navigate to verilator-bench/
  3. Run bash run.sh to build and launch the raytracer in an SDL window
  4. Make sure you have dependencies installed: Verilator, CMake, SDL2, etc.

How to generate more scenes for the proper-implementation-no-uart

  1. go to rayforge.ayannali.net to generate a new scene
  2. copy this .sv file and place into scene_lut.sv in proper-implementation-no-uart
  3. re-run verilator-bench to see the new scene in action

Presentation

3601180f-01 3601180f-02 3601180f-03 3601180f-04 3601180f-05 3601180f-06 3601180f-07 3601180f-08 3601180f-09 3601180f-10 3601180f-11 3601180f-12

About

No description, website, or topics provided.

Resources

License

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors