Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
12 years ago

Always block within always block

Hi guys,

Is it possible to use always@block within always block? The reason I want to do that is I try to construct multiple synchronised blocks using For loop, and you need to put loop statement in a always/initial block. My code is like:


always
begin
  for(i=0;i<5;i=i+1)begin
    always@(posedge clk)
    begin
    ...
    end
  end
end

I'm not sure whether this is synthesizable or not, please give some advice.

Cheers.

4 Replies