UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
Visitor jaless
Visitor
3,642 Views
Registered: ‎06-26-2017

Spartan 6: How to use the MIG (external memory)

Hi I am fairly new to work with FPGAs. For my final project for my FPGA course, I decided to recreate the classic game, Space Invaders. However, I quickly ran into memory constraint issues (as I was only using the on-board RAM). My professor said that there is external memory that can be used (via the MIG and MCB); however, as this was only an introductory FPGA course never showed how to use it.

 

Could someone tell me how to make use of external memory for projects with the Spartan 6? Or link me to some useful tutorials? I have seen the MIG User Guide, but it is quite dense for someone new to the game. Any help would be very much appreciated.

 

Thank you for your time.

 

- Jason

0 Kudos
4 Replies
Moderator
Moderator
3,635 Views
Registered: ‎05-02-2017

Re: Spartan 6: How to use the MIG (external memory)

HI jason ,

 

I think you're looking out for the reference for the HOW to use MIG  with spartan 6 device .

 

Can have SP605  evaluation kit example 

 

 

https://www.xilinx.com/support/documentation/boards_and_kits/sp605_MIG_pdf_xtp060_13.4_c.pdf

 

or 

 

for reference

 

 

https://www.xilinx.com/support/documentation/application_notes/xapp858.pdf

 

 

 

 

Regards,
Sekhar 
----------------------------------------------------------------------------------------------
Kindly note- Please mark the Answer as "Accept as solution" if information provided is helpful.
Give Kudos to a post which you think is helpful and reply oriented.
----------------------------------------------------------------------------------------------

Regards
Chandra sekhar
----------------------------------------------------------------------------------------------
Kindly note- Please mark the Answer as "Accept as solution" if solution provided is helpful.

Give Kudos to a post which you think is helpful and reply oriented.
----------------------------------------------------------------------------------------------
Highlighted
Scholar u4223374
Scholar
3,616 Views
Registered: ‎04-26-2015

Re: Spartan 6: How to use the MIG (external memory)

Could I ask a bit more about the project?

 

The original Space Invaders had a 256*224 monochrome display, which would only need 3.5 18K block RAMs - not a problem for even the very smallest Spartan 6. Even if you're doing it in colour at higher resolution, it should be possible to just store the shapes of each object rather than a complete framebuffer - I'd be pretty surprised if it didn't fit into on-chip RAM.

 

Using the MIG is certainly do-able (assuming the board has off-chip RAM; if it's only got off-chip flash then this will be extremely unsuitable as a framebuffer) - but it might not be the best or easiest approach.

 

 

Visitor jaless
Visitor
3,602 Views
Registered: ‎06-26-2017

Re: Spartan 6: How to use the MIG (external memory)

The exact FPGA board used: Spartan-6 Nexys-3 

 

The project consisted of using a standard 640-480 VGA display (and some on-board buttons) to recreate Space Invaders. I coded the project using Verilog, and the code can be found here: https://github.com/jless97/CSM152A/tree/master/Lab_4.

 

I know that the code isn't the best, and can be quite memory wasteful (as the course didn't really teach us how to use Verilog, but I only had a month or so to get up to speed with it). 

 

Latest implementation that I have: which only includes 3 alien ships that fire lasers (not the actual sprites), 4 barriers, a "score" system (just a blue bar at the top), and the user spaceship (which can move left, right, fire lasers). When the aliens are all killed, then they reset (as a typical Space Invaders level goes). I will try to include a video link of the game play

 

I intended to have the full 55 aliens, and the flying saucer, etc., but only had 2 weeks to work on the project, so just had a simplified version for the demo day. In addition, I felt like I was running into memory constraints. For example, if I were to add 11 alien spaceships the game would start to lag out. By this I mean that the alien spaceships would start to move out of sync, or some would not move at all. The implementation for the aliens is exactly the same, so I assumed that the board just wasn't capable of creating the full game (this is what the Teaching Assistant told me as well). 

 

Any suggestions for the next steps to take? or how to improve the code? Or also how to use the off-board memory (thank you to the user who posted some links!)?

 

Thanks again

0 Kudos
Explorer
Explorer
3,562 Views
Registered: ‎05-31-2015

Re: Spartan 6: How to use the MIG (external memory)

Hello,

 

I am working in xilinx ISE. In ISE you can create a Xilinx MIG core as normally as how would you create cores. An example project will be created hand in hand. Refer that for further proceeding. I am posting a link that I used with my numato board aout interfacing to DDR.

 

https://blog.numato.com/spartan6-and-ddr-sdram-memory-your-first-ddr-interfacing-project/

 

With regards

Shalini

0 Kudos