//-----SDA 数据线上的数据存入寄存器,数据在SCL的高电平有效------------- 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; @ (negedge scl) begin #`timeslice ; out_flag = 1; //应答信号输出 sda_buf = 0; end @(negedge scl) #`timeslice out_flag = 0; end endtask
@ (negedge scl) 在任务里面怎么用,编译的时候出现错误
eeprom.v" line 140: Unsupported Event Control Statement. ERROR:Xst:850 - "eeprom.v" line 141: Unsupported Event Control Statement. ERROR:Xst:850 - "eeprom.v" line 142: Unsupported Event Control Statement. ERROR:Xst:850 - "eeprom.v" line 143: Unsupported Event Control Statement. ERROR:Xst:850 - "eeprom.v" line 144: Unsupported Event Control Statement. ERROR:Xst:850 - "eeprom.v" line 145: Unsupported Event Control Statement. ERROR:Xst:850 - "eeprom.v" line 146: Unsupported Event Control Statement. ERROR:Xst:850 - "eeprom.v" line 147: Unsupported Event Control Statement. ERROR:Xst:850 - "eeprom.v" line 148: Unsupported Event Control Statement. 那位老兄帮帮忙啊?谢谢,这是夏宇闻书里I2C总线那章的一个例子?
随便问一下 系统函数DISABLE怎么也不可以用啊? |