Module and port syntax

Source: Internet
Author: User
The module definition starts with the keyword module. The module name, port list, port declaration, and optional parameter declaration must appear before other sections, and the endmodule statement must be the last statement of the module. A port is a channel for interaction between the module and the external environment. A port list and a port Declaration are required only when the module has a port. The five components in the module are: Variable declaration, data flow statement, lower-layer module instance, behavior statement block, and task and function. A port is an interface that interacts with the external environment. In the external environment, the module is invisible, and calls to the module can only be performed through its port. This feature provides designers with great flexibility: as long as the interface remains unchanged, modifications within the module will not affect the external environment. The port is often used as a terminal. (Terminal) port list: contains an optional port list in the module definition. If no signal is exchanged between the module and the external environment, no port list is available. Port declaration all ports in the port list must be declared in the module. The ports in the OpenGL have the following three types: input, output, and inout. In OpenGL, all ports are implicitly defined as the wire type. Therefore, if you want a port to have the wire data type, declare it as one of the three types: If the output type is

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.