Well, i thought i might get some time during the Christmas/New Year break to do some more, but that wasn't the case, what with travelling, and taking the family out almost every day.
So no real progress, how-ever, i did do some thinking/planning & reading.
Firstly, i want to mount the board into some sort of enclosure, to give it some
protection, rather than just having it floating around on the desk, potentially
shorting out on something.
I'll just gut some old piece of equipment for a suitable box, although i haven't yet
found something i'm perfectly comfortable with.
I intend to mount the FPGA board on a piece of scrap blank fiberglass PCB, and then
attach that into the box, i've got the PCB, but no plastic PCB stands to mount the
FPGA board on, despite searching through my essential stock of parts* at home.
I'll get some this week, and get that sorted.
I've also been reading the Xilinx Datasheet for the Spartan 3E, which is something i
probably should have done sooner.
It's a lot more than just a large array of un-committed gates like the old GAL chips
were from when i first studied electronics.
Here's what a typical logic cell in a GAL of that era (mid 1980's) looked like:
And there may have been only 8 of these in a chip (such as a 16V8)
Now compare that to a sample section of the Xilinx Spartan3E:
And there's "only" 4,656 of these in the Spartan 3E (XC3S500E) on my FPGA board.
No wonder i could put an entire VIC-20 in this chip!
http://fpgaarcade.com/vic20_main.htm
Next post, i'll go into some details about re-writing the vga test code, to make
use of the extra bits i've added to my vga adapter.
* essential stock of parts, is a euphemism for what my wife would call "junk"
FPGA programming
Thursday, 5 January 2012
Thursday, 22 December 2011
Programming, first attempt(s)
I've actually had the board for a couple of weeks, before starting this blog, so i need
to catch up with my actual progress.
So here goes....
My first step was to download the Xilinx ISE design suite, the software needed to compile the HDL code, it's a hefty download, but quite good actually,
and is available for windows and Linux (not MacOSX unfortunately but maybe
if i tried it with X11 installed, and i feel like a challenge....).
Once i had design suite installed, like any good techie, i immediately ignored all
of the documentation, downloaded a moderately complicated project,
tried to install it, and failed!
(i tried to get PACMAN going on the board)
Then some commonsense re-asserted itself, and i decided i should take some smaller steps, so i looked for the FPGA equivalent of a "Hello World" program.
Which is actually just to make a LED blink.
After just a small amount of searching, i found this youtube video
Which is a run-through of starting a new project in ISE design suite, entering the code, compiling, and programming it.
I've got two monitors hooked up to my system (i'm a big fan of having two monitors), so i was able to watch the tutorial on one screen, and type in the other.
So i quickly learnt the initial baby steps of how use ISE, compile (is that the right word?), customize the ucf file (user constraints file, which pins connect to what actual physical devices, etc), and get the counter going!
Next task i decided to tackle, was testing VGA output.
Some more searching led me to this page:
Which simply generates some colour bars on a VGA screen.
After realising that the clock on my board was 32Mhz, and in the VGA demo they were using a 50Mhz clock, i was able to get this working also!
So some reasonable progress.
This is only 1 bit for each of R,G,B, (giving a whole EIGHT colours!)
since then i've added some extra resistors to my VGA interface, for 2 bits
for each colour channel, and i should be able to get a huge 64 colours!
That's the next thing i'll tackle, and will be for the next post.
In the meantime, i had another go at PACMAN (but without the copyrighted PACMAN roms)
and i was more successful than my first attempt.
Just a quick edit: yes this isn't PACMAN, but apparently it's an accurate rendition of the hardware of the original PACMAN arcade game, all i would need to run PACMAN, would be the roms (which can be added into the code in the FPGA)
but seeing as how my goal was to take a project, and get it running on my board, then i've met my goal, if i REALLY want PACMAN, then apparently the roms can be "found", but that's not a big goal, for me, so i'll leave this now, and move on.
to catch up with my actual progress.
So here goes....
My first step was to download the Xilinx ISE design suite, the software needed to compile the HDL code, it's a hefty download, but quite good actually,
and is available for windows and Linux (not MacOSX unfortunately but maybe
if i tried it with X11 installed, and i feel like a challenge....).
Once i had design suite installed, like any good techie, i immediately ignored all
of the documentation, downloaded a moderately complicated project,
tried to install it, and failed!
(i tried to get PACMAN going on the board)
Then some commonsense re-asserted itself, and i decided i should take some smaller steps, so i looked for the FPGA equivalent of a "Hello World" program.
Which is actually just to make a LED blink.
After just a small amount of searching, i found this youtube video
Which is a run-through of starting a new project in ISE design suite, entering the code, compiling, and programming it.
I've got two monitors hooked up to my system (i'm a big fan of having two monitors), so i was able to watch the tutorial on one screen, and type in the other.
So i quickly learnt the initial baby steps of how use ISE, compile (is that the right word?), customize the ucf file (user constraints file, which pins connect to what actual physical devices, etc), and get the counter going!
Next task i decided to tackle, was testing VGA output.
Some more searching led me to this page:
Which simply generates some colour bars on a VGA screen.
After realising that the clock on my board was 32Mhz, and in the VGA demo they were using a 50Mhz clock, i was able to get this working also!
So some reasonable progress.
This is only 1 bit for each of R,G,B, (giving a whole EIGHT colours!)
since then i've added some extra resistors to my VGA interface, for 2 bits
for each colour channel, and i should be able to get a huge 64 colours!
That's the next thing i'll tackle, and will be for the next post.
In the meantime, i had another go at PACMAN (but without the copyrighted PACMAN roms)
and i was more successful than my first attempt.
Just a quick edit: yes this isn't PACMAN, but apparently it's an accurate rendition of the hardware of the original PACMAN arcade game, all i would need to run PACMAN, would be the roms (which can be added into the code in the FPGA)
but seeing as how my goal was to take a project, and get it running on my board, then i've met my goal, if i REALLY want PACMAN, then apparently the roms can be "found", but that's not a big goal, for me, so i'll leave this now, and move on.
Tuesday, 20 December 2011
A quick pic of my FPGA development board
Here's the board i purchased, you can see i also purchased some of the "wings" as they call them.
I have a VGA wing (which i've already done some modifications to), LED/Button wing, joystick wing, sound output wing, SD card wing, and 5V tolerant I/O buffer wing.
I should have bought the PS/2 keyboard/mouse wing, and i'd like to get ethernet also, but they aren't offering that for sale yet, so i may have to make my own.
Which FPGA and development board?
There seems to be two big players in the FPGA area, ALTERA and XILINX
I actually agonized for a couple of weeks which way to go, Altera or Xilinx?
But after lots of googling, i came to the conclusion that it doesn't really matter!
Both vendors have extremly capable devices, with limits far beyond what i will probably ever need.
Also, projects written in VHDL or Verilog (the two main programming languages for FPGA development), can be written so that they can be successfully compiled for either.
Opencores.org is a great site, with open source projects for FPGA's that helped a lot, even at this early stage.
So if vendor doesn't matter so much, what else could i base my decision on?
Well i browsed around on ebay, and a few other places to see what was available, there's plenty of Altera and Xilinx development boards available, but most of the cheaper ones required an external programmer for the chip (known as a JTAG programmer) which increases the cost a bit, but obviously can be used for multiple chips.
I did how-ever come across one small development board, that had an on-board programmer, which was at the right price for me also.
It does of course have the dis-advantage that if i get seriously into this, that i'll probably have to buy a JTAG programmer eventually anyway.
The board i chose?
It's called the "Papilio one", to see and read about the board i ended up getting,
have a look at gadgetfactory.net
I also found this brief and nice video review on youtube by Jeri Ellsworth.
If you're into electronics check out her channel also.
So the Papilio one, from gadgetfactory was the one i chose, i did how-ever choose the larger 500K chip, rather than the 250K, the few dollars difference is well worth the extra capability.
I actually agonized for a couple of weeks which way to go, Altera or Xilinx?
But after lots of googling, i came to the conclusion that it doesn't really matter!
Both vendors have extremly capable devices, with limits far beyond what i will probably ever need.
Also, projects written in VHDL or Verilog (the two main programming languages for FPGA development), can be written so that they can be successfully compiled for either.
Opencores.org is a great site, with open source projects for FPGA's that helped a lot, even at this early stage.
So if vendor doesn't matter so much, what else could i base my decision on?
Well i browsed around on ebay, and a few other places to see what was available, there's plenty of Altera and Xilinx development boards available, but most of the cheaper ones required an external programmer for the chip (known as a JTAG programmer) which increases the cost a bit, but obviously can be used for multiple chips.
I did how-ever come across one small development board, that had an on-board programmer, which was at the right price for me also.
It does of course have the dis-advantage that if i get seriously into this, that i'll probably have to buy a JTAG programmer eventually anyway.
The board i chose?
It's called the "Papilio one", to see and read about the board i ended up getting,
have a look at gadgetfactory.net
I also found this brief and nice video review on youtube by Jeri Ellsworth.
If you're into electronics check out her channel also.
So the Papilio one, from gadgetfactory was the one i chose, i did how-ever choose the larger 500K chip, rather than the 250K, the few dollars difference is well worth the extra capability.
first post, why FPGA?
I've heard a lot about FPGA's, i've been in the electronics field for quite a few years, and always
was curious about these devices and their capabilities.
Recently i came across several youtube videos, and was amazed at how versatile these things are!
You may have heard of MAME (http://mamedev.org/) which emulates classic video arcade games.
Well an FPGA can BE that hardware of that classic video arcade game.
There was a Z80 or 6509 cpu in that old arcade game? Well there can be one in that FPGA chip also.
Sound chips, memory, video controllers? Yep, they can all be accurately programmed into the FPGA, not just emulated, that hardware (as in the actual logic elements) can be accurately programmed into an FPGA!
And it's not just just old-school applications on these things, FPGAs are most of the logic "glue" in modern systems, and a lot more besides, check out this link for a clue as to the capability of FPGAs:
http://www.computerworlduk.com/news/it-business/3290494/jp-morgan-supercomputer-offers-risk-analysis-in-near-real-time/
So i decided it was time that i finally got hold of an FPGA and saw for myself what they can do.
was curious about these devices and their capabilities.
Recently i came across several youtube videos, and was amazed at how versatile these things are!
You may have heard of MAME (http://mamedev.org/) which emulates classic video arcade games.
Well an FPGA can BE that hardware of that classic video arcade game.
There was a Z80 or 6509 cpu in that old arcade game? Well there can be one in that FPGA chip also.
Sound chips, memory, video controllers? Yep, they can all be accurately programmed into the FPGA, not just emulated, that hardware (as in the actual logic elements) can be accurately programmed into an FPGA!
And it's not just just old-school applications on these things, FPGAs are most of the logic "glue" in modern systems, and a lot more besides, check out this link for a clue as to the capability of FPGAs:
http://www.computerworlduk.com/news/it-business/3290494/jp-morgan-supercomputer-offers-risk-analysis-in-near-real-time/
So i decided it was time that i finally got hold of an FPGA and saw for myself what they can do.
Subscribe to:
Comments (Atom)



