Exercise-focused FPGA learning resource? - Page 1
Forum section: electronics / general

author: KaneTW
author_rank: Frequent Contributor
timestamp: September 19, 2019, 10:20:25 pm
content: I'm looking for an exercise focused FPGA learning resource in the vein of Software Foundations by Ben Pierce.Basically something that's tightly integrated between "learn thing" and "apply thing."Any recommendations?

author: hamster_nz
author_rank: Super Contributor
timestamp: September 20, 2019, 04:43:43 am
content: The "apply thing" part of "learn thing/apply thing" for FPGAs is really hard.The learning curve for them is very steep. Blinking your first LED is a very big step until you understand what is going on with the tooling.So when I thought about this, I had lots of side trips reusing the same techniques to do (what I thought were) interesting things.You can blink an LED. Great!- Can you blink at different speeds based on switches?- How fast can you see it blink?- Do you perceive different colors flickering at different frequencies?- How about duty cycle vs perceived brightness?- Can you blink out a pattern? (e.g. " ... ---- ... ")You can blink an LED, you can also make a speaker go "click, click, click...".- When does the 'click' turn into a 'buzz'?- How fast a buzz can you still hear?- How do different duty cycles sound at the same frequency?- What happens if you click really fast, and vary the duty cycle instead?- By varying the duty cycle you make a DAC...Leading on to delta-sigma DACs- Make delta-sigma DAC.- Can you make it play a tone using RAM?- Phase accumulatorsAccidentally radiated RF.- A short wire can radiate RF if you waggle it.- With two short wires you can transmit (very weak) AM radio, switching between 100% and 50% signal level.- Can you make it transmit a tone?- Can you make it send Morse code?Serial comms:- You can make a pin send a pattern- Can you make it change at 9600 Hz?- Can you make it send "0110011001111111" over and over?- What happens if you hook that to a serial port?- Can you make it send other characters?- Can you make it send "Hello World"?- Can you trigger it based on a Button push?...The idea was to recast the same simple problem into multiple different use-cases, and just add a little bit of sophistication with every step.

author: colorado.rob
author_rank: Frequent Contributor
timestamp: September 20, 2019, 08:12:52 pm
content: https://www.youtube.com/user/LBEbooks/playlistsThis is a series of videos containing both theory and practice. They have books (including ones newly updated) that cover either Verilog or VHDL. I had no problem following along with Verilog (I prefer that over VHDL) with a Pynq-Z2 board, modifying it as needed. A few pmods would help (switches, 7-segment LEDS, VGA, etc) to get through the entire course.

author: rstofer
author_rank: Super Contributor
timestamp: September 21, 2019, 12:49:21 am
content: Almost every book on VHDL that I have ever seen has code snippets that are realizable in hardware."HDL Chip Design", Smith - talks about various ways to code functional blocks but no end project or goal. VHDL and Verilog"FPGA Design with Verilog", Coffman _ I have this book but have never used it - I use VHDL"RTL Hardware Design Using VHDL", Chu - A VERY GOOD book on circuit design"Microprocessor Design Using Verilog HDL", Dalrymple - Complete design of a Z80. There is a lot of very clever spreadsheet usage."Digital Design and Computer Architecture, ARM Edition", Harris and Harris"Digital Design and Computer Architecture" - Harris and Harris This book (2d ed) uses a MIPS processor for the discussion"Introduction To Computing Systems" Patt & Patel - EXCELLENT!Either of the Harris and Harris books will be worth the time and effort. Plenty of code examples in Verilog, VHDL and System Verilog (ARM ed only, I believe). These are great books that cover the topic from beginning to end. There are a LOT of examples, pick either (probably the ARM version, it's a newer architecture). Great discussions on pipelining and forwarding. Most of the code is for the more limited designs.I like the last book the most simply due to the LC3 project. There isn't anything FPGA specific in the book but it does go through the entire design of a RISC flavored microcontroller. The authors use microcode, I used VHDL. Every aspect of the processors is described up to and including a worksheet for creating the microcode. The VHDL can be written directly from the state diagram. Search the Internet for LC3 or LC3b (the byte addressable version). The book comes with a CD containing a C compiler and Assembler.Above is a comment re: getting an LED to blink. This is an outstanding achievement simply due to the number of things that have to go right. Try to find a blinking LED project for your board of choice. Writing the HDL is easy compared to getting the clock into the chip and the output from the chip to an LED. These are done in the constraints file with Vivado. This is the least intuitive part of the work. In that regard, the older ISE was easier to learn. Just post back when you get hung up.Personally, I would go with Xilinx and probably the more modern Artix chips using Vivado. I would look at DigilentInc.com and buy the board with the most gadgets that was within my budget. I like the Nexys A7 board for the peripherals. I like switches, buttons, LEDs and displays. It makes it easier to debug the project. Other opinions will vary, mostly they gravitate toward boards with few or no peripherals that cost a lot less money. Your choice...https://store.digilentinc.com/nexys-a7-fpga-trainer-board-recommended-for-ece-curriculum/Vivado has a feature called "Internal Logic Analyzer" that allows you to watch your hardware actually running. This means you probably won't have to buy a scope and/or logic analyzer just to get started.