Array passing through module

  • Thread starter Farhana Sharmin Snigdha
  • Start date
F

Farhana Sharmin Snigdha

Guest
Hi,
I have a module named dct_8p where I have an input array of 8 elements, where each element is a 4 bit number and 8 element output array each contains 5 bit number.
I want to pass each 4bit number input through the module.

I was trying to read the design through design vision. It generates an error

/scratch/Farhana/Synopsys/dct_8p.v:56: Illegal reference to memory xin. (VER-253)

I guess I am doing very silly mistakes in array declaration which I cannot get.Please let me know what I am missing.

Thanks
Farhana


input [3:0] xin [0:7];
input cin;
output [4:0] xout[0:7];

input add,sub;



//layer 1
RCA3 #(.n(4), .approx(0)) l10(.p(xin[0]),.q(xin[]),.ci(cin),.op(add),.r(xout[0])); [ line 56]
.....
...




module RCA3(p,q,ci,op,r);
parameter n=4;
input[n-1:0]p,q;
input ci,op;
output [n:0] r;
 
In article <ab719a4c-46a6-4f97-adb8-80b6499e1609@googlegroups.com>,
Farhana Sharmin Snigdha <sarmin6@gmail.com> wrote:
Hi,
I have a module named dct_8p where I have an input array of 8
elements, where each element is a 4 bit number and 8 element
output array each contains 5
bit number.
I want to pass each 4bit number input through the module.

I was trying to read the design through design vision. It generates
an error

/scratch/Farhana/Synopsys/dct_8p.v:56: Illegal reference to memory xin. (VER-253)

I guess I am doing very silly mistakes in array declaration which I cannot
get.Please let me know what I am missing.

Thanks
Farhana


input [3:0] xin [0:7];
input cin;
output [4:0] xout[0:7];

input add,sub;

<snip>

Farhana,

You need SystemVerilog to pass multi-dimensional array's through ports.
I don't recall what "Design Vision" is, but try just renaming your module
to "dct_80.sv" and see if that does the trick. Else, your tool's documentation
to see how to enable SystemVerilog.

I also suggest using Ansi-C style Verilog headers instead of the old-style
Verilog-1995 headers you're using.

Regards,

Mark
 
Thanks a lot. Saving the script as .sv extension helped.

Regards
Farhana
 

Welcome to EDABoard.com

Sponsor

Back
Top