veriloghdlicarus

Icarus Verilog: Multibit array parse error


What is the proper multibit array declaration in Icarus Verilog? I'm getting a parse error in this code input [19:0] array [0:9]; but when I tried input [20*10-1] array;, there's no parse error but there are errors in my input/output.


Solution

  • Verilog, not just Icarus, does not allow declaring IOs as multidimensional arrays. It just doesn't. SystemVerilog does. People doing different things for working this problem around, like declaring multidimensional wires, and then connecting them to the flat-defined input.