I am trying to take input/output data from my FFT and pass it into my checker function (which I have imported), but I am getting the following error:
Cannot assign a packed type ‘bit[31:0]’ to an unpacked type 'bit[31:0] []
module tb_top;
...
bit [31:0] data_in_real [$];
bit [31:0] data_in_imag [$];
bit [31:0] data_out_real [$];
bit [31:0] data_out_imag [$];
initial begin : tester
bit [63:0] data_out_queue [$];
bit [63:0] data_in_queue [$];
bit [63:0] in_data_fq;
bit [63:0] out_data_fq;
bit [63:0] in_real;
bit [63:0] in_imag;
bit [63:0] out_real;
bit [63:0] out_imag;
...
@(posedge clk);
repeat (128) begin : random_data_loop
@(posedge clk);
s_axis_data_tdata = get_data();
data_in_queue.push_back(s_axis_data_tdata);
if(i == 127) begin
s_axis_data_tlast = 1'b1;
i = 0;
@(posedge clk);
s_axis_data_tlast = 1'b0;
end
data_out_queue.push_back(m_axis_data_tdata);
i++;
in_data_fq = data_in_queue.pop_front();
out_data_fq = data_out_queue.pop_front();
data_in_real = in_data_fq[31:0];
data_in_imag = in_data_fq[63:32];
data_out_real = out_data_fq[31:0];
data_out_imag = out_data_fq[63:32];
DPI_fft_checker(dpic_h, data_in_real, data_in_imag, data_out_real, data_out_imag, nrms);
end : random_data_loop
#1000
$stop;
end : tester
Any help would be massively appreciated!