Always Procedures - 2023.2 English

Vivado Design Suite User Guide: Synthesis (UG901)

Document ID
Release Date
2023.2 English

There are four always procedures:

  • always
  • always_comb
  • always_latch
  • always_ff

The procedure always_comb describes combinational logic. A sensitivity list is inferred by the logic driving the always_comb statement.

For always you must provide the sensitivity list. The following examples use a sensitivity list of in1 and in2:

always@(in1 or in2) 
out1 = in1 & in2;
always_comb out1 = in1 & in2;

The procedure always_latch provides a quick way to create a latch. Like always_comb, a sensitivity list is inferred, but you must specify a control signal for the latch enable, as in the following example:

if(gate_en) q <= d;

The procedure always_ff is a way to create Flip-Flops. Again, you must specify a sensitivity list:

always_ff@(posedge clk) 
out1 <= in1;