Skip to content

VLSIFacts

Let's Program the Transistors

  • Home
  • DHD
    • Digital Electronics
    • Fault Tolerant System Design
    • TLM
    • Verification
    • Verilog
    • VHDL
    • Xilinx
  • Embedded System
    • 8085 uP
    • 8086 uP
    • 8051 uC
  • VLSI Technology
    • Analog Electronics
    • Memory Devices
    • VLSI Circuits
  • Interview
    • Interview Experience
    • Training Experience
    • Question Bank
  • Notifications
  • QUIZ
  • Community
  • Job Board
  • Contact Us

Ports in Verilog Module

Posted on February 23, 2016June 17, 2025 By vlsifacts No Comments on Ports in Verilog Module

Port_list is an important component of verilog module. Ports provide a means for a module to communicate with the external world through input and output. Every port in the port list must be declared as input, output or inout. All ports declared as one of the above is assumed to be a wire by default, to declare it otherwise it is necessary to declare it again. For example in the D-type flip flop we want the output to hold on to its value until the next clock edge so it has to be a register.

module d_ff(q,d,reset,clock); // all ports must be declared as input or output
  output q;
  input d, reset, clock;
  reg q; // the ports can be declared again as required

....... 

endmodule

Note: by convention, outputs of the module are always first in the port list. This convention is also used in the predefined modules in Verilog.

A different way ports can be declared as below other than the above one:

module d_ff(
  output reg q,
  input d,reset,clock);

....... 

endmodule

Spread the Word

  • Click to share on Facebook (Opens in new window) Facebook
  • Click to share on X (Opens in new window) X
  • Click to share on LinkedIn (Opens in new window) LinkedIn
  • Click to share on Pinterest (Opens in new window) Pinterest
  • Click to share on Tumblr (Opens in new window) Tumblr
  • Click to share on Pocket (Opens in new window) Pocket
  • Click to share on Reddit (Opens in new window) Reddit
  • Click to email a link to a friend (Opens in new window) Email
  • Click to print (Opens in new window) Print

Like this:

Like Loading...

Discover more from VLSIFacts

Subscribe to get the latest posts sent to your email.

Related posts:

  1. Module Definition in Verilog
  2. Verilog vs VHDL
  3. Case and Conditional Statements Synthesis CAUTION !!!
  4. Synopsys – Interview Questions – based on Synthesis and Simulation
Verilog Tags:inout, input, Module, output, Ports, reg, Verilog, wire

Post navigation

Previous Post: Module Definition in Verilog
Next Post: Module Instantiation in Verilog

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Top Posts & Pages

  • NAND and NOR gate using CMOS Technology
  • Circuit Design of a 4-bit Binary Counter Using D Flip-flops
  • AND and OR gate using CMOS Technology
  • Truth Tables, Characteristic Equations and Excitation Tables of Different Flipflops
  • Understanding the 4-bit Ripple Carry Adder: Verilog Design and Testbench Explained

Copyright © 2025 VLSIFacts.

Powered by PressBook WordPress theme

%d