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.
Initial and always blocks - FPGA Tutorial
From the course: Learning Verilog for FPGA Development
Initial and always blocks
- [Narrator] Now let me remind you about a very important detail of Verilog test bench modules. Everything works concurrently because we are describing hardware after all. Every line of code and every block of code work concurrently. This includes gates and module instances, registers and wires, but more importantly, all initial blocks work concurrently, so you may include several of these in a single module. Always blocks also operate concurrently with everything else. Yes, procedural blocks, the ones enclosed by begin and end, may have sequential parts, but this sequence only refers to the auditor of the assignments and delays expressed with the pound operator. So in any test bench module we could have several initial blocks, some module instantiations, then an always block, then more initial blocks and so on. The order of these blocks doesn't change the behavior of the simulation or the module. Again, the order…
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)
-
-
-