VHDL-based Implementation of Simon's Memory Game

GitHub Repo View the code on GitHub


Welcome to the Simon’s Memory Game project! This project is a VHDL-based implementation of the classic memory-testing game, on Cyclone V GX FPGA. Let’s have a quick Demo of the Game in video below.

Watch my video on youtube (click on the picture below):

Watch the video

Why do I Build games?
In the spring of 2026, I decided that I wanted to truly master RTL design, and I asked myself: what could be more joyful than building games in hardware?=)))
That idea became the start of my FPGA game‑development adventure. The Simon-Memory-Game was my second serious milestone (first one was Pong Game), and through it I practiced real RTL design, timing, video output, and hardware‑driven game logic. This project represents the moment where my learning turned into something creative, fun, and fully my own.


Project Overview

The goal of this project is to create an interactive Memory Game where the player must observe and repeat a randomly generated sequence of lights and sounds. As the player progresses, the sequences become longer and more challenging. The game features a full graphical user interface displayed on a HDMI monitor, audio feedback for every action, and melodies for both winning and losing scenarios.


System Architecture

The system follows a hierarchical design, where the Top-Level Module (top/game_top) connects various specialized sub-systems.

The Memory Game’s Block Diagram:

The Memory Game's Diagram

State Machine(FSM):

The top/game_SM.vhd module acts as the central controller for the Simon’s Memory Game, managing the logic and flow of the game through a structured state machine.

The Memory Game's FSM

The state machine transitions through the following core phases:

Throughout these states, the module uses the o_page_En signal to tell the visual system which specific page (Start, GameOn, LevelUp, Victory, or GameOver) to “paint” on the screen.


Detailed Module Explanation

Core Logic Modules

Display & Visual Modules

Audio & Sound Modules

Utility Modules


Setup

The project is tested on Altera Cyclone V GX FPGA.

For the Cyclone V GX FPGA, I have used the follwing Pinout table:
Click here to open the Pinout-Table.CSV