always_ff 或 always_comb 用于简单 TestBench 中的时钟生成

always_ff or always_comb for clock generation in a simple TestBench

哪个用于简单测试平台的时钟生成? 例如:

always #20 clk <= ~clk

如果我将其更改为 always_ff 或 always_comb 都会给出错误

Statements in an always_comb shall not include those that block, have 
  blocking timing or event controls, or forkjoin statements. The always_ff 
  procedure imposes the restriction that it contains one and only one event 
  control and no blocking timing controls.

都没有。坚持普通的alwaysalways_combalways_ff 适合您的设计。