top of page

9.3 Module Port Mapping

Understanding Port Mapping

​

Port mapping is the process of connecting signals between parent and child modules during instantiation. Proper port mapping is critical for correct design functionality and avoiding synthesis issues.

​​

Port Mapping Techniques

​

9.3.1. Direct Mapping

​

Simplest form where signal names match:

Verilog

9.3.2. Width Mismatch Handling

​

When port widths don't match, proper handling is essential:

Verilog

9.3.3. Concatenation in Port Mapping

​

Combining multiple signals:

Verilog

9.3.4. Bit Selection and Slicing

​Extracting specific bits:

Verilog

9.3.5. Unconnected Ports

Handling unused ports:

Verilog

9.3.6. Constant Connection

Connecting ports to fixed values:

Verilog

Advanced Port Mapping Examples

Bi-directional Port Mapping

Verilog

Interface-Based Mapping (SystemVerilog)

Verilog

Common Port Mapping Pitfalls

1. Width Mismatch Without Warning

Verilog

2. Floating Inputs

Verilog

3. Output Contention

Verilog

Port Mapping Best Practices
 

1. Always use named port connections for clarity
 

2. Handle width mismatches explicitly with concatenation or slicing
 

3. Tie off unused inputs to known values (0 or 1)
 

4. Document unusual mappings with comments
 

5. Check synthesis warnings for unconnected ports
 

6. Use parameters for configurable widths
 

7. Group related signals using SystemVerilog interfaces

Module Instantiation

Design module fundamentals

© Copyright 2025 VLSI Mentor. All Rights Reserved.©

Connect with us

  • Instagram
  • Facebook
  • Twitter
  • LinkedIn
  • YouTube
bottom of page