Learn how to design digital circuits with FPGAs, the devices that reconfigure themselves to become the very hardware circuits you program. In this concise ebook, author Justin Rajewski teaches you hands-on how to create your first FPGA project.
While FPGAs (Field Programmable Gate Arrays) and microcontrollers such as Arduino and Raspberry Pi are often compared, FPGAs are ideal for projects that can be broken down into parallel stages, need to operate at high speeds with low latency, or need custom logic not otherwise available. If you understand the basics of electricity as well as binary, hexadecimal, and decimal number systems, you’re ready to start your journey toward digital hardware mastery.
- Learn how hardware designs are broken into modules, comparable to functions in a software program
- Set up your environment by installing Xilinx ISE and the Mojo IDE
- Build a high level understanding of digital designs that can be implemented on an FPGA
- Build your project with Lucid, a hardware description language with syntax similar to C/C++, Verilog, and Java
- Use the Mojo IDE to design, build, and load your FPGA designs
Preface |
|
vii | |
|
|
1 | (18) |
|
|
1 | (2) |
|
FPGAs Versus Microcontrollers: A Comparison |
|
|
3 | (4) |
|
Setting Up Your Environment |
|
|
7 | (12) |
|
|
8 | (6) |
|
|
14 | (1) |
|
|
15 | (4) |
|
2 Your First FPGA Project |
|
|
19 | (14) |
|
|
19 | (2) |
|
|
21 | (1) |
|
|
22 | (1) |
|
|
23 | (2) |
|
|
25 | (1) |
|
|
26 | (1) |
|
|
27 | (3) |
|
|
30 | (1) |
|
|
30 | (1) |
|
|
30 | (1) |
|
|
31 | (2) |
|
|
33 | (22) |
|
|
33 | (3) |
|
|
36 | (3) |
|
|
39 | (1) |
|
|
40 | (1) |
|
|
41 | (3) |
|
|
44 | (11) |
|
|
44 | (2) |
|
|
46 | (1) |
|
|
47 | (1) |
|
|
47 | (3) |
|
Decoder, Encoder, and Arbiter Example |
|
|
50 | (5) |
|
|
55 | (20) |
|
Feedback Loops and Flip-Flops |
|
|
56 | (5) |
|
|
57 | (4) |
|
|
61 | (14) |
|
|
66 | (1) |
|
|
67 | (2) |
|
|
69 | (2) |
|
|
71 | (1) |
|
|
72 | (1) |
|
|
73 | (2) |
|
5 Seven-Segment LED Displays and Finite-State Machines |
|
|
75 | (16) |
|
|
76 | (3) |
|
|
79 | (4) |
|
|
83 | (4) |
|
|
87 | (1) |
|
|
87 | (4) |
|
|
91 | (10) |
|
|
91 | (1) |
|
Sending and Receiving Data |
|
|
92 | (1) |
|
|
92 | (1) |
|
|
93 | (2) |
|
Getting Personal with RAM |
|
|
95 | (6) |
|
7 Mixing Colors with an RGB LED |
|
|
101 | (16) |
|
|
103 | (2) |
|
|
105 | (6) |
|
|
111 | (6) |
|
|
117 | (4) |
|
|
117 | (2) |
|
|
119 | (2) |
|
|
121 | (12) |
|
|
122 | (1) |
|
|
122 | (1) |
|
|
122 | (1) |
|
|
123 | (2) |
|
|
123 | (1) |
|
|
123 | (1) |
|
|
124 | (1) |
|
|
124 | (1) |
|
|
124 | (1) |
|
|
124 | (1) |
|
|
125 | (1) |
|
|
125 | (5) |
|
|
128 | (2) |
|
|
130 | (3) |
|
|
133 | (12) |
|
General Fabric and Routing Resources |
|
|
133 | (2) |
|
|
135 | (10) |
|
|
135 | (5) |
|
|
140 | (1) |
|
|
140 | (3) |
|
|
143 | (2) |
|
11 Advanced Timing and Clock Domains |
|
|
145 | (10) |
|
Breaking Timing and Fixing It with Pipelining |
|
|
145 | (5) |
|
|
150 | (5) |
|
12 Sound Direction Detection: An Advanced Example |
|
|
155 | (28) |
|
|
156 | (6) |
|
|
162 | (2) |
|
|
164 | (19) |
|
|
164 | (4) |
|
|
168 | (3) |
|
|
171 | (3) |
|
|
174 | (1) |
|
|
175 | (2) |
|
|
177 | (3) |
|
|
180 | (3) |
|
|
183 | (22) |
|
|
184 | (1) |
|
|
185 | (10) |
|
|
185 | (1) |
|
|
186 | (1) |
|
|
187 | (8) |
|
|
195 | (6) |
|
|
195 | (1) |
|
|
196 | (1) |
|
|
197 | (1) |
|
|
197 | (1) |
|
|
197 | (1) |
|
|
197 | (1) |
|
|
197 | (1) |
|
|
198 | (1) |
|
|
198 | (1) |
|
|
198 | (1) |
|
|
198 | (1) |
|
|
198 | (1) |
|
|
199 | (1) |
|
|
199 | (1) |
|
|
199 | (1) |
|
|
200 | (1) |
|
|
200 | (1) |
|
|
200 | (1) |
|
|
201 | (1) |
|
|
201 | (1) |
|
|
201 | (1) |
|
|
201 | (1) |
|
Array Size and Bit Selection |
|
|
202 | (2) |
|
|
202 | (1) |
|
|
203 | (1) |
|
|
204 | (1) |
A Full Modules and Proof |
|
205 | (8) |
Index |
|
213 | |
Justin Rajewski first got started with FPGAs over a summer internship with Northrop Grumman before his senior year of high school. Before this, a SparkFun blog post had piqued his interested in FPGAs, but he was frustrated with the lack of information available for beginners. After a few summers working with FPGAs as an intern, and some formal classes at Stanford University, Justin created the Mojo, an FPGA development board targeted specifically for beginners. He then launched a hugely successful Kickstarter for the Mojo. Justin continued to work on the Mojo and has even gone so far as to create an IDE with a new beginner-friendly language, Lucid.