From the course: Learning Verilog for FPGA Development
Unlock the full course today
Join today to access over 22,700 courses taught by industry experts or purchase this course individually.
Solution: From schematic to code - FPGA Tutorial
From the course: Learning Verilog for FPGA Development
Solution: From schematic to code
(bouncy music) - [Instructor] Did you get it to work? Did you run into trouble? Either way, give yourself a pat on the back. You have accomplished so much. Let me show you my solution. Now, in order to show you the freedom you have in Verilog, I'll show you three implementations. The first one is a gate implementation, which I've named is_prime_gates. As you can see in the code, it consists of three intermediate wires and four gates. Notice that I've included where these wires, w1, w2, and w3 are located in the schematic. You may want to pause the video and take a minute to verify that the connections are correctly implemented. My second implementation uses a continuous assignment. We can find it under sources, and design sources. I've named this one is_prime_boolean. This is my favorite implementation because it uses just one line of code. The module is called is_prime_boolean because it's implemented with…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
Verilog modules4m 13s
-
(Locked)
Instantiating modules4m 49s
-
(Locked)
Gates and primitives3m 3s
-
(Locked)
Registers and wires1m 46s
-
(Locked)
Range specification4m 30s
-
(Locked)
Numbers and constants4m 53s
-
(Locked)
Always blocks52s
-
(Locked)
The if-else statement2m 2s
-
(Locked)
Case statements2m 24s
-
(Locked)
Boolean algebra expressions56s
-
(Locked)
Continuous assignments2m 23s
-
(Locked)
Blocking assignments3m 20s
-
(Locked)
Nonblocking assignments3m 49s
-
(Locked)
Challenge: From schematic to code2m 16s
-
(Locked)
Solution: From schematic to code4m 31s
-
-
-
-
-