Hello all UVM geeks,
I am working on SIPO(serial in parallel out) in monitor class. Its not working properly and data is not being shifted in the shift registers. Can someone please guide me how to correct this problem so that I can make 10 bits byte out of SIPO. Following is the code for sipo part.
task sipo(serialin); // task sipo(dut_vi.data); reg [9:0] pout; // automatic logic [9:0] temp = 0; //reg replaced by logic reg [9:0] temp; reg [4:0] counter_m = 0; //repeat(2) //always @(posedge dut_vi.clock) //removed posedge // for (int i = 0; i < 10 ; i++) begin // temp[9:0] <= {temp[8:0], serialin}; //THIS LINE DOESNT WORK, GIVES ERROR: Error: monitor.sv(167): LHS in non-blocking assignment may not be an automatic variable //temp[9:0] <<<= {temp[8:0], serialin}; //compiles but dont give any result //@(posedge dut_vi.clock) temp[0] = serialin; //temp[8]; $display("san480- Display of the temp %b",temp); temp[1] = temp[0]; $display("san481- Display of the temp %b",temp); temp[2] = temp[1]; $display("san482- Display of the temp %b",temp); // @(posedge dut_vi.clock) temp[3] = temp[2]; $display("san483- Display of the temp %b",temp); // @(posedge dut_vi.clock) temp[4] = temp[3]; $display("san484- Display of the temp %b",temp); // @(posedge dut_vi.clock) temp[5] = temp[4]; $display("san485- Display of the temp %b",temp); // @(posedge dut_vi.clock) temp[6] = temp[5]; $display("san486- Display of the temp %b",temp); // @(posedge dut_vi.clock) temp[7] = temp[6]; $display("san487- Display of the temp %b",temp); // @(posedge dut_vi.clock) temp[8] = temp[7]; $display("san488- Display of the temp %b",temp); // @(posedge dut_vi.clock) temp[9] = temp[8]; $display("san489- Display of the temp %b",temp); // repeat(10)@( dut_vi.clock) // $display("san489- Display of the temp %b",temp); counter_m = counter_m + 1; $display("san490- Display of the counter_m %d",counter_m); //%h end @(posedge dut_vi.clock) //assign pout = temp; $display("san466- Display of the Paralled data out of SIPO %b",pout); //%h uvm_report_info(get_full_name(),"Display of SIPO output parallel data.....",UVM_NONE); bq.push_back(pout); @( dut_vi.clock); $display("san467- Display of the queue contents %h",bq.size()); bytes = new[bq.size()] (bq); $display("san453- Display of the bytes array contents %p",bytes); //%h endtask: sipo
Any help is appreciated. Thanks