From the course: Learning Verilog for FPGA Development
Unlock the full course today
Join today to access over 24,000 courses taught by industry experts.
Solution: You run the show - FPGA Tutorial
From the course: Learning Verilog for FPGA Development
Solution: You run the show
(bright upbeat music) - [Instructor] So now let me show you my solution. It's pretty straightforward actually. In lines 27 and 28, we have the input and output for the device under test. Speaking of which, in line 29, you can see the declaration of the triple module instance. As I said before, I like to use a naming format for the devices under test. This one is called DUT_triple. Now, as for displaying the results for the requested values, I did it in one line. The monitor task call in line 31 works every time there's a change in the module's input. And finally, I'm assigning all values sequentially with pauses of 10 nanoseconds. Why nanoseconds? Let's look at line 1. Here's the timescale directive showing a unit of one nanosecond and a resolution of one picosecond. Now let me start the simulation. And here we have the timing diagram. Let me resize it so that all of the values are visible. First, I'll maximize…
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
-
-
-
-
-
(Locked)
Simulation basics53s
-
(Locked)
Test bench modules2m 30s
-
(Locked)
Stimulus variables1m 1s
-
(Locked)
Clock generation58s
-
(Locked)
Initial and always blocks3m 25s
-
(Locked)
A simple simulation4m 6s
-
(Locked)
Timing directives2m 48s
-
(Locked)
Display tasks2m 54s
-
(Locked)
Challenge: You run the show1m 56s
-
(Locked)
Solution: You run the show1m 38s
-
(Locked)
-
-
-