The guiding principle of always language

Source: Internet
Author: User

1, each always has only one @ (event-expression).

2. Always blocks can represent timing logic and combinatorial logic.

3, with the Posedge and Negedge keyword is the timing logic that represents the trigger along, there is no signal combination logic or level-sensitive latch. Or they both say.

4. Each signal assigned in always fast must be defined as a Reg or integer[<msb>:<lsb>] identifier. The reshape variable defaults to 32 bits.

5, always block the combined feedback loop should be avoided, always the assignment in the block must be clear. Otherwise, the designer is required to include a level-sensitive latch in the design to maintain the last value before the assignment. The explanations are as follows:

We don't recommend it, you know, it's easy to make mistakes.

Input a,b,c;

Reg D,e;

[Email protected] (A or B or c)//level-sensitive list is a,b,c

Begin

E=d & A & b;//because there is no d in the level-sensitive list, when D changes, E cannot change immediately, until the a,b,c changes. This is equivalent to the existence of a level-sensitive transparent latch in the staging D data.

D=e|c;

End

6, the value of a signal is assigned to the ' BX, the integrated device to interpret it as an unrelated state, the synthesis of the hardware circuit to do simple.

Excerpt from: Verilog Digital system Design Tutorial (Charlie Xia)

The guiding principle of always language

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.