【发布时间】:2014-04-06 07:08:12
【问题描述】:
我正在尝试定义我的 4 线 JD 和 JC 阵列,其中两根用作输入,两根用作输出。但是,如代码所示,我收到一条错误消息,指出声明是非法的。
错误提示:
错误:HDLCompilers:27 - “top.v”第 38 行非法重新声明 'JC' 错误:HDLCompilers:27 - “top.v”第 41 行非法重新声明 'JD'
解决这个问题的最佳方法是什么?
代码示例
module top
(
input wire mclk, //50 MHz by default
input wire rcclk, //
output wire [7:0] seg,
output wire dp,
output wire [3:0] an,
output wire [7:0] Led,
input wire [7:0] sw,
input wire [3:0] btn,
//I/O pins
input wire [3:0] JA,
input wire [3:0] JB,
//input wire [3:0] JC,
input wire [3:2] JC, //<< this is where I get the error
output wire [1:0] JC, //<< this is where I get the error
input wire [3:2] JD, //<< this is where I get the error
output wire [1:0] JD //<< this is where I get the error
);
【问题讨论】:
标签: input io output verilog bus