Go Back   PACEDev Forums > Emulation > Architecture
Blogs FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply
 
Thread Tools Display Modes
  #1  
Old 26th June 2010, 08:19 PM
enliteneer enliteneer is offline
Prole
 
Join Date: May 2010
Posts: 10
Default General Porting Steps for a new Platform

So I have a DE1 (cyclone II), but I'm wondering, in general, what it would take to run it on a different platform.

For example, the bemicro, http://www.hitex.com/index.php?id=1489 has a slightly smaller device, an altera cyclone iii (EP3C16 - 15k LEs, 56 M9K blocks, 504kb memory), but I'm thinking it should be able to run at least some of the smaller games... even if with no sound.

So in general, what would targeting a new fpga entail? Obviously, a similar resistor network for the vga as found on the de1 would have to be added to the bemicro board.. but what major tasks, like memory/timing would be involved?

Thanks!
Reply With Quote
  #2  
Old 27th June 2010, 10:15 AM
RedskullDC RedskullDC is offline
Prole
 
Join Date: Sep 2008
Location: Sydney, Australia
Posts: 9
Default

Hi enliteneer,

Quote:
Originally Posted by enliteneer View Post
So I have a DE1 (cyclone II), but I'm wondering, in general, what it would take to run it on a different platform.

For example, the bemicro, http://www.hitex.com/index.php?id=1489 has a slightly smaller device, an altera cyclone iii (EP3C16 - 15k LEs, 56 M9K blocks, 504kb memory), but I'm thinking it should be able to run at least some of the smaller games... even if with no sound.

So in general, what would targeting a new fpga entail? Obviously, a similar resistor network for the vga as found on the de1 would have to be added to the bemicro board.. but what major tasks, like memory/timing would be involved?

Thanks!
Not an awful lot of work is required to get pace running on another platform.
take a look in sw/src/target/de0 and also /synth/platform/midway8080/invaders/de0
This was a quick hack I did to target the terasic DE0 board, which is quite similar to the bemicro in terms of functionality, also Cyclone3 based.

The SRAM on the bemicro should require anything fancy, just use define PACE_HAS_SRAM = true in the project_pkg file and map the pins of the SRAM in QUARTUS.

I assume you are using the companion prototyping board with it?

You may find one of these:
http://www.nkcelectronics.com/vga-br...in-head15.html
very handy in making a video interface

Hope this helps, ask if anything doesn't seem obvious.

Cheers,
Leslie
Reply With Quote
  #3  
Old 9th July 2010, 06:53 AM
enliteneer enliteneer is offline
Prole
 
Join Date: May 2010
Posts: 10
Default

Thanks a bunch! After a little tweaking of the PLL (the bemicro has a 16mhz on board), it works great, and that board from NKC was perfect!

How can I tell which other games would fit on a particular fpga?
Attached Images
File Type: jpg pic00555.jpg (13.9 KB, 11 views)

Last edited by enliteneer : 10th July 2010 at 07:19 AM. Reason: update
Reply With Quote
  #4  
Old 10th July 2010, 12:09 PM
Talus Talus is offline
Prole
 
Join Date: Jul 2009
Posts: 19
Default

Well, block RAM is probably going to be the limiting factor. As a rule of thumb, I would say that any game that uses less combined ROM+RAM than available block RAM on the FPGA should be straight forward to get up and running.

If you use the external SRAM, then bigger games can of course fit.
Reply With Quote
  #5  
Old 10th July 2010, 01:19 PM
RedskullDC RedskullDC is offline
Prole
 
Join Date: Sep 2008
Location: Sydney, Australia
Posts: 9
Default

Hi Enliteneer,
Quote:
Originally Posted by enliteneer View Post
Thanks a bunch! After a little tweaking of the PLL (the bemicro has a 16mhz on board), it works great, and that board from NKC was perfect!

How can I tell which other games would fit on a particular fpga?
Good stuff!
Thanks for posting the pic.

With the resources on the BeMicro board, most of the PACE stuff shoud work fine.
Off the top of my head, only the Coco3 and Zet targets are likely to be a tight squeeze, but don't quote me on that

Cheers,
Red
Reply With Quote
  #6  
Old 13th July 2010, 11:55 AM
tcdev's Avatar
tcdev tcdev is offline
Chief Architect
 
Join Date: Dec 2007
Posts: 256
Blog Entries: 12
Default Porting to other targets

As has already been mentioned, there's not a huge amount of work to do, especially for the Altera silicon.

In the most trivial cases, a new target_top.vhd and project_pkg.vhd are all that's required!

And please, feel free to submit the new files for inclusion in the PACE repository!
Reply With Quote
  #7  
Old 7th August 2010, 03:44 AM
enliteneer enliteneer is offline
Prole
 
Join Date: May 2010
Posts: 10
Default

It's been a while since my last visit, but I'm itchin to port a new game to the bemicro this weekend!

Attached are the modified files needed for the bemicro midway space invaders. I'm a bit embarrassed though, because I wasn't sure how to create a new platform that doesn't break all the file dependencies... in the end I just overwrote the de0 platform. Not pretty, but it should get anyone else with a bemicro up and running.

Hopefully I can get create a proper platform folder for the next bemicro game... pacman! I'll keep you posted!
Attached Files
File Type: zip Bemicro_SpaceInvaders.zip (237.0 KB, 3 views)
Reply With Quote
  #8  
Old 7th August 2010, 07:22 PM
enliteneer enliteneer is offline
Prole
 
Join Date: May 2010
Posts: 10
Default

Pacman is working with it's own bemicro platform!

Things when much smoother this time around, but I am curious as to why (in project_pkg.vhd) setting all the memory sources to false still works?

constant PACE_HAS_SDRAM : boolean := false
constant PACE_HAS_FLASH : boolean := false;
constant PACE_HAS_SERIAL : boolean := false;
constant PACMAN_ROM_IN_SRAM : boolean := false;
constant PACMAN_USE_INTERNAL_WRAM : boolean := false;

I would think one of these should have set to true in order for the video engine to know where to load the rom data from, but apparently not!

In general, what files should I look at to see how this actually works... I assume video data is updated during vsync blanking, but it has to load it from flash/sram/internal just prior, no?
Attached Images
File Type: jpg pacman_bemicro.jpg (26.3 KB, 9 views)
Attached Files
File Type: zip bemicro_pacman.zip (549.5 KB, 2 views)
Reply With Quote
  #9  
Old 9th August 2010, 08:40 AM
tcdev's Avatar
tcdev tcdev is offline
Chief Architect
 
Join Date: Dec 2007
Posts: 256
Blog Entries: 12
Default

Pacman will use external SRAM for the CPU RAM ("work" RAM or 'wram') if the platform has SRAM.

There really needs to be two constants for each memory type...
PACE_HAS_SRAM and PACE_USES_SRAM.

PACE_HAS_SRAM should be defined in target_pkg.h
PACE_USES_SRAM should be defined/derived in project_pkg.h

I'm considering re-architecting the entire PACE project - PACE_V2 if you like - at some point in the near future. I'll try to make everything "right" and "nice" and "consistent" etc from the start...
Reply With Quote
  #10  
Old 9th August 2010, 02:02 PM
tcdev's Avatar
tcdev tcdev is offline
Chief Architect
 
Join Date: Dec 2007
Posts: 256
Blog Entries: 12
Default BeMicro platform

As you may have noticed, I've added a new target - BeMicro.

Haven't had time to clean it up, but thought I'd just note that you should be able to use the existing Cyclone III 'generic' PLL in target_top, so you only need to specify the MULTIPLY & DIVIDE constants in project_pkg, rather than create a new PLL for each project.
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT. The time now is 09:29 PM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.