我在用QuartusII模拟I2C总线的时候,写了一个任务
task shift_in;
output [7:0] shift;
begin
@(posedge scl) shift[7] = sda;
@ (posedge scl) shift[6] = sda;
@ (posedge scl) shift[5] = sda;
@ (posedge scl) shift[4] = sda;
@ (posedge scl) shift[3] = sda;
@ (posedge scl) shift[2] = sda;
@ (posedge scl) shift[1] = sda;
@ (posedge scl) shift[0] = sda;
for(i=7;i>0;i=i-1)
begin
@(posedge scl) shift
=sda;
end
@ (negedge scl)
begin
#`timeslice ;
out_flag = 1; //应答信号输出
sda_buf = 0;
end
@(negedge scl)
#`timeslice out_flag = 0;
end
endtask
在编译的时候,出现了错误
Error (10856): Verilog HDL error at EEPROM.v(152): multiple event control statements not supported for synthesis
,请问该怎么解决呢?
此帖出自小平头技术问答
task是仿真语句,综合器不支持该语言的饿
一周热门 更多>