集成电路技术分享

 找回密码
 我要注册

QQ登录

只需一步,快速开始

搜索
查看: 747|回复: 0

求解;让大家帮忙看看吧 !

[复制链接]
zhiweiqiang33 发表于 2013-4-16 09:27:44 | 显示全部楼层 |阅读模式
请问有没有人用过 task ?我写的 task 的参数address 怎么带不进去?
程序如下:
        //像素计数
        task IncMap; //mem[address] <= mem[address] + 1;
                input [7:0] 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 下一条

QQ|小黑屋|手机版|Archiver|fpga论坛|fpga设计论坛 ( 京ICP备20003123号-1 )

GMT+8, 2025-6-27 12:53 , Processed in 0.092117 second(s), 19 queries .

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表