Technologies: FPGA, C, Vivado, Quartus
Field: Computer Vision, Digital Signal Processing, Software Engineering
Completed: May 2018
Connect 4 was a first-year group project as part of EE Engineering & Design module.
The project was designed to introduce us to a powerful electronic device called Field Programmable Gate Array (FPGA).
As well as learning how the device operates and runs, we had to apply our learning within a short period of time to show how we understood the key concepts of image overlay
and computer vision techniques. We were given full autonomy to research, execute and deliver the project in our groups. We evaluated our strengths and implemented the famous game
Connect 4. We used numerous technologies including our first exposure to Vivado, Quartus.
The game is played in real time using a live camera feed from a phone which is used by the FPGA to detect the position of the starting game grid and colours of the coins placed.
The game has two players: the human and the FPGA, with the former starting the game by placing a coloured coin on the game grid.
The FPGA logic board detects the colour of the coin placed and then communicates with the CPU to obtain the best possible next move (calculated using MiniMax).
This position is displayed on the screen so that the human can play the move on behalf of the FPGA.
The aim of the game is to place four coins in a line: horizontally, vertically or diagonally.
The aim of this project was to develop a smooth system that supports two-way interaction between human and FPGA. The FPGA device was the core of the project as it can perform the relevant detection algorithms and provide real-time feedback to the human player.
The algorithms are dependent upon each other and so it was vital that the FPGA correctly performed the detection. The FPGA was then able to communicate with its ARM chip to run the software code to obtain its move.
We mutually decided to incorporate both hardware and software algorithms in this project to demonstrate ability in understanding the communication between the two.
This way the team was able to show the FPGA board's full capability.
I learned several transferable personal and technical skills from this project. This was a short group project which required precise planning, collaboration and deligation to achieve project objectives. Working effectively under strict deadlines
were some personal skills I developed in this project. Communication and leadership were shown by taking account for the testing and review phase of the project where I created a suitable test bench to run our code. We were also able to measure performance metrics.
The technical skills were learning how to synthesise C code in Vivado, especially creating a high-level description language understandable by FPGA logic board. We were not given lectures on Computer Vision, so this area was complete self-taught
and we learned to work as a unit when tackling image overlay problems. Overall it was an excellent project to put all our year learning together and create a low latency C code able to run on hardware.
A link to the project source code on GitHub can be accessed here.