Question

Hello everyone.

 

I'm a student at UTSA and we're working on our final project for Digital system design. My major is for Computer Engineer and focusing hasn't been established just yet. 

My group and I are working on making a "game" using the VGA port on the Nexys ddr 4 board.

I joined in hopes of being pointed in the right direction on where to find more reading material on how the VGA port works, constraint file/pin setup for the VGA; and any information on how to program the pixels individually (if possible or if i have to upload a image and work around that process).

Thank you

-Aaron Cantu

ps If everything turns out right I'll share the game with everyone.

Share this post


Link to post
Share on other sites

2 answers to this question

Recommended Posts

  • 0

@Aaron Cantu,

Welcome to the forums!

I write a blog dealing with all kinds of FPGA topics, from beginners all the way up to formally verifying AXI interfaces.  On that blog, you'll find an article on how to verify a VGA controller, as well as examples of how a VGA emulator could be used to debug many of the issues you might have.  Many video controllers also require some kind of asynchronous FIFO, so you can find an article discussing how to build and verify one of those as well.  One of the things I have yet to write about is how to build a core to read from memory in order to display it on a screen.  I can point you to examples of that code if you'd like.  Likewise I haven't yet written any sprite code, such as adding a game image to an already built video stream--so I don't have examples of my own to offer you there, but I imagine you might find some if you look around hard enough.

Feel free to check that out to see if its useful to you at all,

Dan

Share this post


Link to post
Share on other sites
  • 0

Hi,

just an opinion: You'll find that FPGA is an inconvenient medium for game development because the time scale (say, 16 ms for typical 60 Hz framerate) is so far off from where FPGAs are good at (say, 16 ns => a factor of 1 000 000). Bridging that gap leads either to an absurdly inefficient implementation (game logic) or towards conventional sequential programming on a softcore CPU.

You can use FPGA to build the gaming platform (or emulate a legacy one). But watch out for scope creep - expect that the interesting "hobbyist" projects that you encounter have consumed ridiculous amounts of time by people who didn't learn FPGA on this project. Especially in a group, plan for the worst when it comes to motivation...

One link you could check out is this, the "J1" CPU. I love it for its simplicity - doesn't mean I actually use it (might consider it if I needed a very large and very slow FSM but that would probably give me reason to not use a FPGA in the first place).

This is not to kill your motivation or enthusiasm, but be aware that most likely, anything you come up with on an FPGA will be blown out of the water by a first-generation Raspberry PI (the above factor of 1e6 is the main reason). What I'd do is find a project that is better suited for FPGA.

One idea is to program "game of life" in a full parallel ("systolic") implementation to run at MHz frequencies. Use FFs for the game state. You can use BRAMs to take periodic snapshots of the game state, then clock it out at VGA pixel frequency to show as image on a monitor. One way to do the copying from game state to BRAM is to combine rows into ring shift registers, then do one cyclic shift of the game matrix for every update of the monitor picture (trying to come up with something that utilizes the FPGA efficiently. Obviously, this can be simplified at the expense of performance in terms of evolutions / second). The same shift register connectivity can also be used to load an initial state into the game e.g. from a UART interface.

Another thought would be to abandon the game idea and do something more FPGA-ish. For example, you should be able to implement lowest-level BASE10 Ethernet. I think it needs some external hardware (a scavenged socket with magnetics might be enough) but the topic has not been hacked-to-death yet like most others. You'll find a proof-of-concept design on fpga4fun.

 

Edited by xc6lx45
added the promised link :-)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now