ECE 5760: Laboratory 1
2-dimensional Game of Life.
Introduction.
In this assignment you will build a device using the FPGA and HPS which runs a state machine to compute and display a Cellular automaton (CA) on a VGA monitor. The operation of the CA solver for Conway's Game of Life will be controlled by interaction with the USB mouse attached to the HPS.
Procedures.
- Read Linux on DE1-SoC
- Read University Program DE1-SoC_Computer_15_1
- When you load the unmodified sof file of the better chopped down system onto the fpga:
- download the zip
- open the project
- open the programmer and click start
- You are going to be programming C to run the Conway CA state machine and mouse.
Therefore you are expected to be able to program in Linux/GCC. Read about:
- /dev/mem for i/o mapping, e.g. simtec and local
- Debian Linux. We are using a Debian variant, I believe.
- GCC on Linux, e.g. die.net
- USB on DE1-SoC Note that the demo mouse code on this page is blocking.
You will probably need to add code to make the device non-blocking.
//needed for nonblocking mouse read()
int flags = fcntl(fd, F_GETFL, 0);
fcntl(fd, F_SETFL, flags | O_NONBLOCK);
- You are going to connect the VGA controller using Qsys tools. Read about:
- Qsys
- VGA on DE1-SoC
- University video core
- Put the Linux image on a SDcard
- Configure Linux as you see fit, but at least follow the steps on Linux on DE1-SoC
- Get PuTTY and PSFTP installed on your Windows machine
--or--
SSH and SFTP on Mac OS X
- I prefer to edit C in Notepad++ on the Windows machine, then PSFTP the code to the HPS SDcard directory to compile.
- Edit Verilog/Qsys in QuartusII/Qsys and download to the FPGA using the Quartus loader
(assuming the DE1-SoC config switch 0-5 is 010101)
Use QuartusII v15.1
- I suggest that you start with a running Quartus project based on the VGA game of life on the
University Program DE1-SoC_Computer_15_1 page.
Assignment
Be prepared to demo your design to your TA in lab.
Your written lab report should include the sections mentioned in the policy page, and :
- A state-transition diagram for the main CA update state machine.
- A video of the VGA screen showing the evolution of an interesting CA configuration.
- Comment and speculate on Conway's game of life and
Turing machines.
- A heavily commented listing of your C and Verilog design.
Copyright Cornell University
February 2, 2017