From the course: Learning Verilog for FPGA Development
Unlock the full course today
Join today to access over 22,600 courses taught by industry experts or purchase this course individually.
Instantiating modules - FPGA Tutorial
From the course: Learning Verilog for FPGA Development
Instantiating modules
- [Male] Instantiating a Verilog module is very similar to calling a constructor method, in an object oriented programming language. You simply declare a new element, with the module's name as it's type, and you need to specify the wires you want to connect to its ports. Now, for the port connections, you may simply specify the connections by ordered list, meaning in the order you specified when you wrote your module's code. You may be okay with this option, if you're used to writing code in C, or Java, like myself. However, Verilog also supports port connections by name. This is a very nice feature you may find in programming languages like Python, C#, or Kotlin. It consists in using the names of the ports when you instantiate, without having to rely on the order in their declaration, let me show you what I mean. At the left, we have the same full adder module we saw earlier, and at the right, we have the half adder,…
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
-
-
-
-
-