lalala00066
lalala00066

Reputation: 59

2 consecutive nonblocking assignments

Can someone explain what it means to assign two consecutive nonblocking assignments in a sequential always block?

For example:

always @(posedge clk) begin
    a <= b <= c;
end

Upvotes: 2

Views: 184

Answers (2)

Oldfart
Oldfart

Reputation: 6269

That is not two consecutive nonblocking assignments.

That is a <= (b<=c);

b<=c evaluates to true (1) or false (0), and that value is assigned to a.

Two consecutive nonblocking assignments is not a legal Verilog syntax.

Upvotes: 2

toolic
toolic

Reputation: 62236

That can be more clearly coded as:

a <= (c >= b);

a is assigned the value of the expression "c is greater than or equal to b".

The 1st <= is the nonblocking assignment operator, whereas, the 2nd is the comparison operator.

Upvotes: 4

Related Questions