|
这种写法在一般的综合器中是可综合的,我在quartusII下试过。<br>
不过用不好会出现警告<br>
以下是我写的简单的测试是否综合<br>
module a(clock,a,b,c);<br>
input a,b,clock;<br>
output c;<br>
<br>
reg tmp;<br>
always @(a or b)<br>
begin<br>
@(posedge clock)<br>
tmp=a+b;<br>
end<br>
assign c=tmp;<br>
<br>
endmodule<br>
出现的警告为<br>
Warning (10235): Verilog HDL Always Construct warning at a.v(8): variable "clock" is read inside the Always Construct but isn't in the Always Construct's Event Control<br>
而这种情况没有警告<br>
module a(clock,a,b,c);<br>
input a,b,clock;<br>
output c;<br>
<br>
reg tmp;<br>
always @(posedge clock) <br>
begin<br>
@(posedge a or posedge b)<br>
tmp=a+b;<br>
end<br>
assign c=tmp;<br>
<br>
endmodule<br>
而且必须写在块语句中,否则综合通不过的!!
|
|