PitchHut logo
openXC7-TetriSaraj
Bringing Tetris to life with RISC-V and FPGA design.
Pitch

Explore an innovative approach to FPGA design with openXC7 and create a custom SoC featuring a RISC-V CPU and a unique Video Controller for an engaging Tetris experience. This project enhances accessibility by leveraging Windows Subsystem for Linux, making it approachable for learners of all ages.

Description

openXC7-TetriSaraj

openXC7-TetriSaraj is a pioneering project demonstrating the use of the openXC7 toolchain to achieve a real-world FPGA design. Designed specifically for the Basys3 Artix7-35T platform, this project integrates hardware implementations of a custom System-on-Chip (SoC) featuring a RISC-V CPU alongside a unique Mega-Character (MC) Video Controller, bringing a twist to the classic Tetris game inspired by traditional BiH customs.

Overview of the Project

This project stands out as an independent exploration of the openXC7 toolchain, which was previously utilized only by insiders acquainted with its intricacies. The journey involved identifying various challenges and iteratively overcoming them, sometimes through unconventional means. The compute platform of choice for development was the Windows Subsystem for Linux (WSL), ensuring broader accessibility, including for educational settings.

Acknowledgements

While the project does not directly rely on any materials from NAND-2-Tetris, it shares similarities in spirit with their comprehensive guide on creating functional applications starting from basic logical gates.

Game Concept

TetriSaraj presents a novel spin on Tetris, where tetrominoes descend from the sides of the playing field, enhancing the challenge by reducing decision-making time. Players aim to form vertical lines by strategically placing the incoming tetrominoes, introducing a unique twist to the classic gameplay.

Development Methodology

The project encompasses two primary tracks: the hardware (HW) development involving Verilog RTL for the SoC design and video controller, and the software (SW) track focusing on game logic in a Windows environment. These two tracks were developed in parallel, culminating in a successful integration of the software and hardware systems.

Game Logic and Mechanics

The core game logic is implemented in a way that is consistent across both the PC and bare-metal RISC-V environments. Key features include:

  • Dynamic Piece Management: Players can move and rotate tetrominoes, with checks in place to ensure pieces fit within the game field.
  • Scoring System: Points are awarded for completed lines, enhancing player engagement and competition.

Unique Features of the Platform

The openXC7 platform is more than just a game; it establishes a robust framework for developing various applications and retro games, utilizing the capabilities of the Mega-Character Frame Buffer.

Video and Screen Organization

  • The setup comprises a 640x480 pixel screen organized into 40x30 squares, allowing for advanced graphics rendering while maintaining a low memory footprint.

Memory Map and Graphics Rendering

The carefully designed memory map facilitates the interaction between CPU software and hardware for structured graphics rendering. Each screen element is defined, and character sets can be customized, contributing to the overall richness of the visual experience.

FPGA Design Journey

The transition from Hardware Description Language (HDL) to operational FPGA design involves a streamlined FPGA build flow that includes synthesis, implementation, and bitstream generation, guiding the project from concept to execution.

Future Prospects

The TetriSaraj project lays the groundwork for future enhancements, such as supporting additional boards, integrating sound features, and exploring new gameplay mechanics. These improvements aim to broaden accessibility and educational outreach.

Closing Thoughts

While the openXC7 toolchain reveals several limitations, it excels in ease of installation and accessibility, making it a valuable resource for hobbyists and educational platforms.

For those interested in exploring or contributing to this project, a teaser video is available, showcasing the capabilities of this unique HW/SW application.

0 comments

No comments yet.

Sign in to be the first to comment.