模块例化端口问题

[复制链接]
1788|4
 楼主| ywert000 发表于 2012-12-30 21:35 | 显示全部楼层 |阅读模式
假如代码如下:
错误在于top定义的cmd_in为input,data_out为output;
     而子模块定义的cmd_in为output,data_in为output;
这种问题仿真不报错,语法检查工具:leda或debussy也查不出来。
上FPGA平台会有问题。
不知道有没有什么方法查此类问题。
module top(clk,
                  cmd_in,
                  data_out);
input clk;
input cmd_in;
output data_out;

sd u_sd(.clk(clk),
             .cmd_in(cmd_in),
             .data_out(data_out));
endmodule


module sd(clk,
                cmd_in,
                data_out);
input    clk;
output  cmd_in;
input     data_out;
..........
..........
..........
endmodule
 楼主| ywert000 发表于 2012-12-30 21:35 | 显示全部楼层
求指教
GoldSunMonkey 发表于 2012-12-31 21:56 | 显示全部楼层
没问题么?
GoldSunMonkey 发表于 2012-12-31 21:56 | 显示全部楼层
不应该啊
gaochy1126 发表于 2013-1-1 23:59 | 显示全部楼层
不对吧 怎么可能检查不出来呢?
您需要登录后才可以回帖 登录 | 注册

本版积分规则

10

主题

155

帖子

0

粉丝
快速回复 在线客服 返回列表 返回顶部