amiga.org
     
iconAll times are GMT -6. The time now is 11:26 AM. | Welcome to Forum, please register to access all of our features.

» Amiga.org » Amiga computer related discussion » Amiga Hardware Issues and discussion » FPGA Programming

Amiga Hardware Issues and discussion This forum is dedicated to the discussion and resolution of issues related to Classic and Next Generation Amiga hardware. Got a problem with a piece of hardware? Click to speak.

Reply
 
Thread Tools Display Modes
Old 03-10-2008, 08:43 AM   #1
BinoX
Technoid
Points: 6,059, Level: 50 Points: 6,059, Level: 50 Points: 6,059, Level: 50
Activity: 4% Activity: 4% Activity: 4%
 
BinoX's Avatar
 
Join Date: Oct 2005
Posts: 452
Default FPGA Programming

(Sorry if this is in the wrong forum)

I am looking into learning to program FPGAs... (I know that's probably a general and bad statement, but I dunno how else to phrase it)

But I'm not sure where to start or what equipment I should get?
I'd quite like a nice tutorial if anyone has a link to one and a reccomendation on what kind of hardware to start with.

I have a background in C, pascal and basic (as well as web scripting languages) if that helps anyone to suggest a good starting point.

Thanks in advance.
__________________
Back to action!
BinoX is offline   Reply With Quote
Old 03-10-2008, 09:05 AM   #2
SamuraiCrow
Premium Member
Points: 13,276, Level: 75 Points: 13,276, Level: 75 Points: 13,276, Level: 75
Activity: 2% Activity: 2% Activity: 2%
 
SamuraiCrow's Avatar
 
Join Date: Feb 2002
Location: South Dakota, USA
Posts: 2,018
Blog Entries: 2
Send a message via Yahoo to SamuraiCrow Send a message via Skype™ to SamuraiCrow
Default Re: FPGA Programming

You'll need to know Boolean logic very well to program an FPGA. Also Verilog is a good logic programming language to learn if you can find the documentation.
SamuraiCrow is offline   Reply With Quote
Old 03-10-2008, 09:57 AM   #3
countzero
Defender of the Faith
Points: 10,900, Level: 69 Points: 10,900, Level: 69 Points: 10,900, Level: 69
Activity: 4% Activity: 4% Activity: 4%
 
countzero's Avatar
 
Join Date: Mar 2005
Location: Tokyo
Posts: 1,937
Blog Entries: 1
Default Re: FPGA Programming

Welcome onboard BinoX ! :-D I'm no expert when it comes to verilog but I've gotten myself into it little recently. Yes, the language itself is not the problem at all, but you'll need to understand the boolean-logic lying behind to be able to design what you want. FPGA-for-fun site is one of the best places to get a quick look into some interesting projects I guess. As for the device, I'll recommend you Terasic's Max II micro kit for starters. It's actually not an FPGA but a CPLD, but the idea is the same. And it's very affordable. If you enjoy playing with it you can get a full DE1 board and build your own softcore minimig :-D (check TobiFlex's tg68k project).
There's also xilinx boards, but I have to say I find altera software more easy to use and trouble free. I also have a Spartan3 development board but the parallel dongle gives a lot of trouble if you have a 'modernish' system (>= winxp sp2). Try to get one which you can use with a USB cable (altera's kits work with USB, for xilinx you have to purchase a seperate cable for 200$ ! :getmad: )
anyway, I hope you get rollin and we see your projects soon :lotsacoffee: (<--- you'll need this )
__________________
I believe in mt. Fuji
countzero is offline   Reply With Quote
Old 03-10-2008, 10:09 AM   #4
alexh
Desperately needs a life
Points: 13,977, Level: 76 Points: 13,977, Level: 76 Points: 13,977, Level: 76
Activity: 2% Activity: 2% Activity: 2%
 
alexh's Avatar
 
Join Date: Apr 2005
Location: Oxford, UK
Posts: 3,638
Send a message via ICQ to alexh Send a message via MSN to alexh Send a message via Yahoo to alexh
Default Re: FPGA Programming

The most difficult concept to get your head round in HDL is the infinite parallelism nature of hardware.

It is unlike anything you will be familiar with having only programmed sequential languages.

The closest thing is multi-threaded programming and even then there is little commonality.

When you design at the RTL (Register Transfer Level) using a HDL (Hardware description language) you can create two distinct types of logic.

1) combinatorial
2) clocked / registered

You have to get the nomenclature of "register" out of your head. While they have the same roots, it doesn't really have anything to do with a CPU register we are all familiar with.

You register signals hold their value for set periods of time allowing you to READ-MODIFY-WRITE the signals without getting a feedback loop.

Combinatorial signals can be created in two distinct ways.

1) Sequential
2) Concurrent

Sequential is very similar to normal programming, the hardware is created sequentially (going down the process), but concurrent is quite different. You might have lots of concurrent logic all "running" in parallel. (A sequential logic can be concurrent with other sequential logic if that makes sense?)

If you are familiar with C-code you might want to learn VERILOG, it's syntax has it's roots in C. I prefer VHDL, the strong types means it's very hard to accidentally screw up by writing valid typo's.

What example would you like? I'll make you one.

I wouldnt buy an FPGA devkit yet if I were you. I would buy a good HDL book and see if you can download the tools to compile and simulate your code.
alexh is offline   Reply With Quote
Old 03-10-2008, 11:34 AM   #5
bloodline
Master Sock Abuser
Points: 37,111, Level: 100 Points: 37,111, Level: 100 Points: 37,111, Level: 100
Activity: 10% Activity: 10% Activity: 10%
 
bloodline's Avatar
 
Join Date: Mar 2002
Location: London, UK
Posts: 11,656
Blog Entries: 3
Default Re: FPGA Programming

Wow, reading up on FPGA programming... looks pretty horrific... :-(
__________________
My iPhone Game: Puny Humans -
http://itunes.apple.com/gb/app/puny-...362230281?mt=8
bloodline is offline   Reply With Quote
Old 03-10-2008, 12:54 PM   #6
freqmax
Defender of the Faith
Points: 12,435, Level: 72 Points: 12,435, Level: 72 Points: 12,435, Level: 72
Activity: 40% Activity: 40% Activity: 40%
 
Join Date: Mar 2006
Posts: 1,788
Default Re: FPGA Programming

One needs to understand the nature of logic gates basicly.

Boolean algebra which is simple to understand for any bright person. Metastability setup/hold times knowledge doesn't hurt either.

Then forget the sequential thinking, it doesn't exist in the fpga world. I have noticed some HDL languages seduce you to formulate in sequential manner. Which leads to bad abstraction.

VHDL gives you the most control. But is a bit messy.
Verilog have strong C roots, but tend to limit you when doing advanced stuff like with combinatorial edge triggering etc.

I would really recommend to buy/borrow a book. And read it before going to the next step. Maybe even start with a book on logical gates.

On the practical side you simple write your HDL file(s). Start a software program from the fpga vendor and out comes a binary file. Which you then transfer to your fpga chip via the parallell port or usb port.
An adapter connects the parallell/usb port to a few pins on the fpga chip.

Have a look here:
http://en.wikipedia.org/wiki/Field-programmable_gate_array
freqmax is offline   Reply With Quote
Old 03-10-2008, 01:44 PM   #7
giturox
Merely Curious
Points: 4,192, Level: 41 Points: 4,192, Level: 41 Points: 4,192, Level: 41
Activity: 1% Activity: 1% Activity: 1%
 
Join Date: May 2007
Posts: 15
Default Re: FPGA Programming

Before you buy a board, download Xilinx's WEBise (it is a big download!). It is free and you can try out stuff you find in the books you desperately need for this.

Both Altera and Xilinx have affordable FPGA boards (i use a board from Xilinx - Spartan 3E ($149))

And as with anything else: try it! It doesn't kill you and you just might like it.

But drink plenty of coffee, cause it might take some getting used to!

:lotsacoffee: :-)
giturox is offline   Reply With Quote
Old 03-10-2008, 02:28 PM   #8
alexh
Desperately needs a life
Points: 13,977, Level: 76 Points: 13,977, Level: 76 Points: 13,977, Level: 76
Activity: 2% Activity: 2% Activity: 2%
 
alexh's Avatar
 
Join Date: Apr 2005
Location: Oxford, UK
Posts: 3,638
Send a message via ICQ to alexh Send a message via MSN to alexh Send a message via Yahoo to alexh
Default Re: FPGA Programming

Quote:
freqmax wrote:
Then forget the sequential thinking, it doesn't exist in the fpga world.
Of course it does. Sequential is just one circuit after another, instead of parallel.

Quote:
freqmax wrote:
I have noticed some HDL languages seduce you to formulate in sequential manner. Which leads to bad abstraction.
It is true that you should always think gates and not code, but you'd be shafted without sequential processes.

I dare you to write anything (meaningful) in VHDL without them.
alexh is offline   Reply With Quote
Old 03-10-2008, 04:17 PM   #9
mikej
Cult Member
Points: 7,537, Level: 57 Points: 7,537, Level: 57 Points: 7,537, Level: 57
Activity: 11% Activity: 11% Activity: 11%
 
Join Date: Dec 2005
Posts: 654
Default Re: FPGA Programming

Hello,

Look at www.fpgaarcade.com for some example code for some fun stuff. Most of the code will run on the Xilinx Spartan3e board which is pretty cheap, and there are scripts in all the projects to compile using the free Webpack toolset you can download from Xilinx.

The big thing to remember is you are not writing software, you are really writing gates and it helps imagine how the underlying hardware looks.

For example

Q <= A and B; -- this produces a two input AND gate

Out <= In + "1"; -- this produces a physical adder circuit etc.

When I release the new dev board I am working on (which will run a variant of Dennis' Minimig) I will put together a tutorial on using it.

Good luck..
Cheers,
MikeJ
mikej is offline   Reply With Quote
Old 03-10-2008, 04:19 PM   #10
alexh
Desperately needs a life
Points: 13,977, Level: 76 Points: 13,977, Level: 76 Points: 13,977, Level: 76
Activity: 2% Activity: 2% Activity: 2%
 
alexh's Avatar
 
Join Date: Apr 2005
Location: Oxford, UK
Posts: 3,638
Send a message via ICQ to alexh Send a message via MSN to alexh Send a message via Yahoo to alexh
Default Re: FPGA Programming

Quote:
mikej wrote:
When I release the new dev board I am working on
How long has it been since you first told me about that dev board? 2 years? If there is anything I can do to help, email me at work.
alexh is offline   Reply With Quote
Old 03-10-2008, 05:19 PM   #11
BinoX
Technoid
Points: 6,059, Level: 50 Points: 6,059, Level: 50 Points: 6,059, Level: 50
Activity: 4% Activity: 4% Activity: 4%
 
BinoX's Avatar
 
Join Date: Oct 2005
Posts: 452
Default Re: FPGA Programming

Thanks for all the help and suggestions.

I can see that this is going to require a lot of research and time (Not a bad thing) so it should keep me busy.

It's one of those things that I've always wanted to do, but never had the time or knowledge.
__________________
Back to action!
BinoX is offline   Reply With Quote
Old 03-10-2008, 05:22 PM   #12
alexh
Desperately needs a life
Points: 13,977, Level: 76 Points: 13,977, Level: 76 Points: 13,977, Level: 76
Activity: 2% Activity: 2% Activity: 2%
 
alexh's Avatar
 
Join Date: Apr 2005
Location: Oxford, UK
Posts: 3,638
Send a message via ICQ to alexh Send a message via MSN to alexh Send a message via Yahoo to alexh
Default Re: FPGA Programming

Now you have the time?
alexh is offline   Reply With Quote
Old 03-10-2008, 06:16 PM   #13
freqmax
Defender of the Faith
Points: 12,435, Level: 72 Points: 12,435, Level: 72 Points: 12,435, Level: 72
Activity: 40% Activity: 40% Activity: 40%
 
Join Date: Mar 2006
Posts: 1,788
Default Re: FPGA Programming

Digilent have a an developer board for 59 USD

Btw, to anyone else.. seems digilent has refreshed their sortiment. 16M PSRAM.. ie just add m68k.. :-D

@alexh:
Btw.. do you happend to know if 1000BASE-T ethernet PHY will accept DC/DC switched regulator as power source?, esp of the AVDD inputs.
freqmax is offline   Reply With Quote
Old 03-11-2008, 03:32 AM   #14
alexh
Desperately needs a life
Points: 13,977, Level: 76 Points: 13,977, Level: 76 Points: 13,977, Level: 76
Activity: 2% Activity: 2% Activity: 2%
 
alexh's Avatar
 
Join Date: Apr 2005
Location: Oxford, UK
Posts: 3,638
Send a message via ICQ to alexh Send a message via MSN to alexh Send a message via Yahoo to alexh
Default Re: FPGA Programming

Which one? I could ask the PCB dept. they make Gigabit NAS boards.
alexh is offline   Reply With Quote
Old 03-12-2008, 09:06 AM   #15
mikej
Cult Member
Points: 7,537, Level: 57 Points: 7,537, Level: 57 Points: 7,537, Level: 57
Activity: 11% Activity: 11% Activity: 11%
 
Join Date: Dec 2005
Posts: 654
Default Re: FPGA Programming


It's true, just couldn't settle on a spec!
I'll mail you the placement at the weekend, I would appreciate your input.
(If I forget, harass me)
Cheers,
Mike.
mikej is offline   Reply With Quote
Reply

Bookmarks

Tags
fpga , programming

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
FPGA programming! Palm Amiga Hardware Issues and discussion 11 01-23-2009 03:20 AM
C64 FPGA trekiej Alternative Operating Systems 12 03-17-2008 02:24 PM
NatAmi AGA FPGA Relais Amiga Hardware Issues and discussion 22 01-21-2008 10:58 PM
Does anyone know of a supplier for MiniMigs FPGA (UK) AJCopland Amiga Hardware Issues and discussion 5 11-29-2007 07:20 PM
First Start Minimig with FPGA-CPU!!! TobiFlex Amiga Hardware Issues and discussion 35 10-14-2007 09:22 AM