求解;让大家帮忙看看吧 !
请问有没有人用过 task ?我写的 task 的参数address 怎么带不进去?程序如下:
//像素计数
task IncMap; //mem <= mem + 1;
input address;
input av1;
begin
case(IncMapState)
stIncReadY: begin
if(iClk_100)begin
if(av1)begin
oWren1 <= 1'b0; //read data from ram to iData1
oAddress1 <= address; /t y0 灰度计数
end else begin //av2
oWren2 <= 1'b0; //read data from ram to iData1
oAddress2 <= address; /t y0 灰度计数
end
end else
IncMapState <= stIncWriteY;
end
stIncWriteY: begin
if(iClk_100)begin
if(av1)begin
oData1 = iData1 + 1; //像素计数
oWren1 <= 1'b1; //write data to ram
end else begin //av2
oData2 = iData2 + 1; //像素计数
oWren2 <= 1'b1; //write data to ram
end
end else
IncMapState <= stIncReadY;
end
endcase //(IncMapState)
end
endtask
IncMap(rAddr,1);//call it
求指教。
页:
[1]