How raster-gpu/raster-ii works
• A Scala-based “core” located in src/main/scala. This contains:
– General processing modules (e.g., PatternGenerator.scala and Raster.scala)
– A display submodule (under src/main/scala/display) that implements key functionalities such as block handling (Bc1Block.scala), compression/decompression (Bc1Compressor.scala and Bc1Decompressor.scala), display control (DisplayController.scala) and video generation (VideoGenerator.scala)
• A simulation environment found in the sim directory that includes a C++ file (sim/sim.cpp) and a Makefile. This is likely used to test, validate, or benchmark the behavior of the design components.
• A hardware synthesis section in the synth folder—specifically tailored for the ULX3S FPGA board (as seen by the tmds_encoder.v, top.v, and associated constraint file ulx3s.lpf). This indicates that the project not only simulates raster processing but is also meant to be synthesized and deployed on actual hardware.
• Ancillary files and configurations such as build.sbt, Makefiles, and infrastructure files (flake.lock, flake.nix, etc.) that support building, formatting, and deploying both the Scala and hardware design components.
Main Components
a. Scala Software Core:
• Core logic modules (Raster.scala, PatternGenerator.scala) that drive the overall functionality.
• Submodule components (Bc1Block, Bc1Compressor, Bc1Decompressor, DisplayController, VideoGenerator) responsible for handling and processing display data.
b. Simulation Environment:
• The simulation module (sim/sim.cpp and associated Makefile) for testing and verification.
c. Hardware Synthesis Components:
• Verilog-based modules (top.v, tmds_encoder.v) along with the supporting FPGA synthesis scripts (raster.tcl, ulx3s.lpf) present in the synth/ulx3s directory.
d. Build and Deployment Infrastructure:
• Build scripts and configuration files (build.sbt, Makefile, flake.lock, flake.nix, etc.) that enable consistent project builds and integration.
Component Relationships and Data Flows
• That these display modules may feed into hardware modules (for instance, video generation might translate into signals handled by the tmds_encoder in the hardware block).
• Simulation environment as a parallel testing or verification pathway that consumes/compares outputs from the core components.
• A build/integration pipeline showing how configuration files, build scripts, and documentation support both the simulation and synthesis flows.
Architectural Patterns and Technologies
• Separation of concerns between software (Scala) and hardware (Verilog-based synthesis).
• Implicit MVC or modular patterns within the Scala codebase where core logic (model) and display control (view/controller) interact.
• Recognize the cross-domain integration: while software simulates and orchestrates display logic, hardware synthesis ensures deployment on an FPGA (in this case, ULX3S).