搜索
bottom↓
回复: 6

QuartusII警告 Removed fan-outs from the following always-disabled I/O buffe...

[复制链接]

出0入0汤圆

发表于 2012-12-30 10:59:49 | 显示全部楼层 |阅读模式
本帖最后由 orange-208 于 2012-12-30 11:00 编辑

如题,Quartus II的警告,这个怎么解决?

Warning (13027): Removed fan-outs from the following always-disabled I/O buffers
        Warning (13028): Removed fan-out from the always-disabled I/O buffer "dataout[0]" to the node "dataout[0]"
        Warning (13028): Removed fan-out from the always-disabled I/O buffer "dataout[1]" to the node "dataout[1]"
        Warning (13028): Removed fan-out from the always-disabled I/O buffer "dataout[2]" to the node "dataout[2]"
        Warning (13028): Removed fan-out from the always-disabled I/O buffer "dataout[3]" to the node "dataout[3]"
        Warning (13028): Removed fan-out from the always-disabled I/O buffer "dataout[4]" to the node "dataout[4]"
        Warning (13028): Removed fan-out from the always-disabled I/O buffer "dataout[5]" to the node "dataout[5]"
        Warning (13028): Removed fan-out from the always-disabled I/O buffer "dataout[6]" to the node "dataout[6]"
        Warning (13028): Removed fan-out from the always-disabled I/O buffer "dataout[7]" to the node "dataout[7]"

有请高手!

阿莫论坛20周年了!感谢大家的支持与爱护!!

知道什么是神吗?其实神本来也是人,只不过神做了人做不到的事情 所以才成了神。 (头文字D, 杜汶泽)

出0入0汤圆

 楼主| 发表于 2012-12-30 11:01:09 | 显示全部楼层
代码如下:

module ram( dataout, addr, wr, rd, cs, datain );
        output[7:0] dataout;
        input[4:0] addr;
        input[7:0] datain;
        input cs, wr, rd;
       
        reg[7:0] datastore[31:0];
        reg[7:0] dataout;
       
        //write data
        always @ ( wr, cs, addr, datastore, datain )
        begin
                if( cs == 0 )
                        begin
                                if( wr )
                                        begin
                                                datastore[addr] = datain;
                                        end
                                else
                                        begin
                                                dataout = 8'bz;
                                        end
                        end
        end
       
        //read data
        always @ ( rd, cs, addr, datastore )
        begin
                if( cs == 0 )
                        begin
                                if( rd )
                                        begin
                                                dataout = datastore[addr];
                                        end
                                else
                                        begin
                                                dataout = 8'bz;
                                        end
                        end
        end
       
endmodule       

出0入0汤圆

发表于 2012-12-30 11:23:50 | 显示全部楼层
说实在这个代码问题很多

出0入0汤圆

 楼主| 发表于 2012-12-30 16:07:23 | 显示全部楼层
Fourier00 发表于 2012-12-30 11:23
说实在这个代码问题很多

能指点下吗?谢了!

出0入0汤圆

发表于 2012-12-30 16:30:00 | 显示全部楼层
1.ram的读写操作必须用到时序逻辑;
2.状态机有3种实现,你写的这种不在这三者之一;
3.你没有控制读写之间的冲突问题,有潜在的读的同时又在写;
4.最后一点,最为重要:自己的写的ram如果写的好的话软件会帮你用片上m4k综合,没写好的话就会用le综合。前者的话什么事都没有,后者的话如果你定义深度大的话就会出现灾难。所以建议ip实现。

出0入0汤圆

 楼主| 发表于 2012-12-30 17:43:13 | 显示全部楼层
wuyuehang 发表于 2012-12-30 16:30
1.ram的读写操作必须用到时序逻辑;
2.状态机有3种实现,你写的这种不在这三者之一;
3.你没有控制读写之间 ...

受教了!

出0入0汤圆

 楼主| 发表于 2012-12-30 22:32:35 | 显示全部楼层
这个代码貌似靠谱!

/*******************************************************************
** Creation date        : 2012-12-30
** Function Description : ram
** Hardware platform    : DE2-115
*******************************************************************/
`timescale 1 ns/ 1 ns
`define delay 10                         //Clock-to-output delay,
                                                                //Zero time delays can be confusing
                                                                //and sometimes cause problems

`define ram_width 8                 //Width of ram (number of bits)
`define ram_depth 16                //Depth of ram (number of bytes)

`define addr_size 4                 //Number of bits required to
                        //represent the RAM address

module ram( clk, wr, rd, addr, datain, dataout );

        output[`ram_width-1:0] dataout;                                        //Data output
        input[`ram_width-1:0] datain;                                                //Data input
        input[`addr_size-1:0] addr;                                                //Menory address       
        input clk;
        input wr, rd;                                                        //Low active
       
        wire[`ram_width-1:0] datain, dataout;
        wire[`addr_size-1:0] addr;
        wire wr, rd;
       
        reg[`ram_width-1:0] mem[`ram_depth-1:0];                //Define RAM
       
        assign #`delay dataout = rd ? `ram_width'bz : mem[addr];
       
        always @ ( posedge clk )
        begin
                if( !wr )
                        begin
                                mem[addr] = datain;
                        end
        end
       
endmodule

回帖提示: 反政府言论将被立即封锁ID 在按“提交”前,请自问一下:我这样表达会给举报吗,会给自己惹麻烦吗? 另外:尽量不要使用Mark、顶等没有意义的回复。不得大量使用大字体和彩色字。【本论坛不允许直接上传手机拍摄图片,浪费大家下载带宽和论坛服务器空间,请压缩后(图片小于1兆)才上传。压缩方法可以在微信里面发给自己(不要勾选“原图),然后下载,就能得到压缩后的图片。注意:要连续压缩2次才能满足要求!!】。另外,手机版只能上传图片,要上传附件需要切换到电脑版(不需要使用电脑,手机上切换到电脑版就行,页面底部)。
您需要登录后才可以回帖 登录 | 注册

本版积分规则

手机版|Archiver|amobbs.com 阿莫电子技术论坛 ( 粤ICP备2022115958号, 版权所有:东莞阿莫电子贸易商行 创办于2004年 (公安交互式论坛备案:44190002001997 ) )

GMT+8, 2024-7-24 07:20

© Since 2004 www.amobbs.com, 原www.ourdev.cn, 原www.ouravr.com

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