Project ideas for beginners - Page 1
Forum section: electronics / beginners

author: player42
author_rank: Newbie
timestamp: April 05, 2016, 06:15:04 pm
content: HiI want to learn how to program FPGAs and Verilog. But I have no clue which training project to start, nor how to proceed(which hardware components I need to order, some good tutorials for beginners, etc).I did some net browsing, but without satisfactory results.I know C well and I also know some basic stuff about microcontrollers.Can anyone please help with advice?Sorry if there is a similar thread and I missed it, in this case just please send me a link.

author: rstofer
author_rank: Super Contributor
timestamp: April 05, 2016, 06:52:10 pm
content: This is a difficult question to answer. There are development boards all over the place. Some are modesty priced, others, not so much.Here is a link:http://electronics.stackexchange.com/questions/4962/most-affordable-fpga-dev-kit-for-learning-vhdl-and-fpga-theoryI started with Digilent boards, notably the Spartan 3 Starter Board which is no longer available. Of their more modern boards, this is probably the least expensive entry level board:http://store.digilentinc.com/basys-3-artix-7-fpga-trainer-board-recommended-for-introductory-users/This is a very nice board:http://shop.ztex.de/product_info.php?cPath=25&products_id=87and the debug board:http://shop.ztex.de/product_info.php?products_id=81These are important because of the USB chip on-board. This allows for very fast programming as well as project IO. There are a number of sample projects included.Terasic makes boards and this one is my next purchase:http://www.terasic.com.tw/cgi-bin/page/archive.pl?Language=English&CategoryNo=165&No=941You can run Linux on this thing!As to which HDL, both work well but I started with VHDL and see no reason to change. In fact, I just don't 'get' Verilog. Had I started with it, I would probably prefer it. But I didn't... In any event, there is a lot of training stuff on the web and several good texts. In the end, there are only a few structures that you need to know: Finite State Machines being the most complex but things like multiplexers, de-multiplexers, D-flops, block memory and various gate arrangements just about cover it. You wind up with a toolbox full of blocks that you combine to make things.There are also some completed project at OpenCores.org that might be interesting. Registration is free.Here's a booklet I have read but probably should:http://www.xilinx.com/txpatches/pub/documentation/xactstep6/hdlsynth.pdfDigilent has a Real Digital course re: FPGAshttps://learn.digilentinc.com/classroom/The first step with FPGAs is exactly the same as with any other programming enviornment: Hello World!. For the FPGA, this means setting up a divider to divide the incoming clock and connecting the output to an LED. Once that is working, everything else just follows.

author: rstofer
author_rank: Super Contributor
timestamp: April 05, 2016, 08:21:22 pm
content: If you have any interest in soft-core computers, the ZPU project is very interesting. It is also written in Verilog...Here is one page discussing the project implementation on a Spartan 3 board.http://embdev.net/articles/ZPU:_Softcore_implementation_on_a_Spartan-3_FPGAThis project is important because, once the CPU runs, it can be programmed in 'C'. Your programs can't be very large due to BlockRAM constraints but, still, a CPU with a compiler is a nice project. At heart, it is a simple stack oriented CPU with single cycle operations between registers and between registers and memory.Google around for other references to ZPU. FWIW, I haven't had the best luck in getting this to run but it's probably something I'm doing wrong. And I ran out of timebefore moving across town. It may be awhile before I get back to it.In Caxton C Foster's "Computer Architecture", he discussed a very rudimentary CPU called Blue. That's the color of the box... It is estimated to be similar to a $5k minicomputer of the day but this is a very old book.http://www.alibris.com/Computer-Architecture-Caxton-C-Foster/book/1255656?qsort=p&matches=13The project has been upgraded and is available in Verilog on OpenCoreshttp://opencores.org/project,blueThere is an assembler and 'monitor' program available for this CPU so it is generally useful. The author has wildly extended the instruction set - all for the better. It makes for a very capable CPU with 4k 16-bit words. Nice! The board is one of Digilent's and is no longer available. The Basys 3 board would work and you can download a free version of the Vivado tool sethttp://store.digilentinc.com/basys-3-artix-7-fpga-trainer-board-recommended-for-introductory-users/If you use Xilinx Vivado, get a VERY FAST computer. The process is SLOW! I would actually buy the Basys 2 because it is supported by Xilinx ISE 14.7 which I understand better and it runs a lot faster.That little Ztex.com 2.01b board has 32k 16 bit words of BlockRam (actually 18 bits wide but I'm only using 16) which is far more than enough for the Foster Blue project and it works with ISE 14.7.I'm not real familiar with the Altera and Lattice offerings. At one time Altera had a clause in their 'free' license to the effect that they could take it away whenever they wanted. This reminded me of UCSD cancelling all the licenses for UCSD Pascal so I never used their products. I have read somewhere that they took out this clause. As to Lattice, I have no idea what they do. A brief look shows they license at least one of their toolchains on a year-by-year basis. No cost, but no guarantee of an extended license.I think I'm going to stay over in the Xilinx house. I understand some of the toolchain and the license terms haven't jumped up and bit me. Yet...

author: player42
author_rank: Newbie
timestamp: April 06, 2016, 04:33:44 pm
content: Thank you.

author: alexanderbrevig
author_rank: Frequent Contributor
timestamp: April 06, 2016, 05:47:28 pm
content: There's also this guyhttps://www.nandland.com/goboard/introduction.html(forum member) and he makes a series on youtube where you start from the very beginning. If I were to start now I'd go that route for sure.

author: rstofer
author_rank: Super Contributor
timestamp: April 06, 2016, 09:26:45 pm
content: Quote from: alexanderbrevig on April 06, 2016, 05:47:28 pmThat is a neat little board for $60. The tutorials are quite good and available in both VHDL and Verilog.It would be great as a starter board but the chip is much too small to be very useful for a full CPU with peripherals. The ZPU project will probably fit since the entire CPU is less than 100 lines of Verilog. Adding a UART will probably work as well. I'm not so sure about adding VGA as BlockRAM is a little constrained.Everybody has to start somewhere!

author: player42
author_rank: Newbie
timestamp: April 06, 2016, 10:04:10 pm
content: I agree, the nandland guy explains very well for beginners. I started with that, I think I will order the board also (hope it will not take 1 month to get from USA to here..).I think the fund raiser he organized to make production of his little board possible was a very nice idea.Also I like the practical examples, they are very straightforward, as simple as it gets.After I get the basics I move on to more complex stuff, but it's critical that the first one is very simple so that I don't get discouraged.Thank you both very much for the helpful replies.I look forward to my first LED on.

author: rstofer
author_rank: Super Contributor
timestamp: April 06, 2016, 11:16:03 pm
content: Quote from: player42 on April 06, 2016, 10:04:10 pmThe first FPGA board I bought was quite expensive, this was back about 12 years ago. I was using the T80 core (opencores.org) and wanted to add a disk drive. Somehow, things quit working and I thought I had fried the board so I got disgusted and set it aside for a couple of years. When I went back to it, everything was fine but I had learned what could have been an expensive lesson: Put current limiting resistors in every input and output signal. My Digilent Nexsys 2 board has those built in! BTW, they also eliminate reflections caused by the very fast rise/fall times. This seemed critical when I was adding a Compact Flash to my Spartan 3 Starter Board (no longer available).You're right, it is easy to get discouraged and the learning curve for FPGAs is high and steep. Taking it one step at a time makes a lot of sense.

author: stmdude
author_rank: Frequent Contributor
timestamp: April 07, 2016, 07:45:50 pm
content: Quote from: rstofer on April 06, 2016, 11:16:03 pmThat bears repeating. I come from a similar background as Player42. I can make anything with a CPU obey my every command. I'm the darned Pan Piper when it comes to software.However, I've just started dabbling with FPGAs, and while it seems to have similarities (it's instructions you type, which gets compiled, and then "run" on the target), it really isn't like "normal" programming at all. And I keep falling into traps because of it, which is sort of frustrating..I have a feeling that HDL isn't for _all_ software guys. Actually, very few, would be my guess. Now, it's very possible that you are one of them (since you have the interest), but I'd recommend heeding rstofers advice, and start simple (read: cheap), and work your way up..I've gotten to the point where I can (with quite a bit of effort) get something basic running with clocks, basic logic and shift-registers, and actually do something useful. This is nowhere close to where I _want_ to be, but I've come to the realization of the absolutely tremendous amount of effort I would have to put in to get where I want to be, and I've yet to decide if I'm prepared to do that.It sounds gloomy, but in actuality, it's not. I've gotten to the point where I can program and useCPLDsas an extra tool in my electronics endevours, which is very, very nice. So, I wouldn't consider the time I've spent so far a waste at all.Oh, and another thing. If you want to "debug" or test your actual physical FPGA, a decent scope is a must (in my not-very-informed opinion). Your other option would be to debug and test your stuff in the simulator instead, but that gets a bit tricky when you're trying to (for example) interface with an ADC or output VGA.My (short) FPGA history:Language: VHDLMain source of information and tutorials:http://hamsterworks.co.nz/mediawiki/(Forum member)First dev-board: Lattice iCEstick ( Very cheap )Second and current dev-board: miniSpartan6+ fromwww.scarabhardware.com( Nice board, cheap, took forever to get )