I was trying to create arrays of parameter approx and approx1 for dct8p_v5 module in system verilog. 'kcn' module has size of 6 parameter array named 'approx'. I want to pass 3 variable from 'approx' and 3 variable from 'approx1'. I tried to concatenate these two but parameter values are not propagating into kcn module. Is the syntax is correct for passing parameter array? Please let me know!
Thanks,
Farhana
module dct_8p_v5 #(parameter nb=18) (input [nb-1:0] xin [0:7] ,
output [nb-1:0] xl2 [0:7]);
localparam integer approx [0:28]={3,1,1,3,0,0,0,0,3,3,1,2,0,7,7,0,7,7,3,
3,3,10,9,9,7,7,10,9,9};
localparam integer approx1 [0:10]={8,8,8,8,8,8,9,8,8,16,16};
wire [nb-1:0] xl1 [0:7];
...
..
kcn #(.n(nb), .approx({approx[12:14],approx1[0:2]})) kcn11(.x0(xl1[4]),.x1(xl1[7]),
.y0(xl2[4]),.y1(xl2[7]));
...
..
module kcn (x0,x1,y0,y1);
parameter n=10 ;
input [n-1:0] x0;
input [n-1:0] x1;
output [n-1:0] y0;
output [n-1:0] y1;
parameter integer approx [0:5]='{0,7,7,8,8,8};