阻塞和非阻塞区别重点.doc

a=1; b=1; c=1; d=1; #40 a=0; b=0; c=0; d=0; // -- end #100 $stop; module sum(y,a,b,c,d); input a,b,c,d; output y; reg y; reg temp1=1; reg temp2=1; always @(a,b,c,d) begin temp1=ab; temp2=cd; y=temp1temp2; end endmodule module sum(y,a,b,c,d); input a,b,c,d; output y; reg y; reg temp1=1; reg temp2=1; always @(a,b,c,d) begin temp1=ab; temp2=cd; y=temp1temp2; end endmodule 在1非阻塞赋值中将temp1和temp2加入到敏感列表 原则:   #1: 当为时序逻辑建模,使用“非阻塞赋值”。   #2: 当为锁存器(latch)建模,使用“非阻塞赋值”。   #3: 当用always块为组合逻辑建模,使用“阻塞赋值”   #4: 当

文档评论(0)

1亿VIP精品文档

相关文档