System Verilog: Sequential execution in an always block

In reply to Bhaskar44:
The answer is YES. However, good coding practice would be more something like:


always @(posedge clk) begin
  static int x; // stays on in value throughout simulation 
  automatic int y; // in life at every entry till end of always statement 
 
  if () begin
  .....
    count <= coun+1; // nonblocking assignment
    x= ..;
    y= ..;
  end
 
 if () begin
   ....
   count <= count + x +y;
  end
end 

Ben Cohen
http://www.systemverilog.us/ ben@systemverilog.us