Signal value is not same on terminal with waveform

lsu_full_signal is “0” at 28ns on Questa waveform. But when I display the signal value at 28ns it seems “1” at 28ns. Why is it working like that? I am checking this signal in a task.

In console:

Thanks,
Omer

You need to show some code on how your signal gets assigned and the timing of your display statement. If it’s being updated with a non-blocking assignment then it’s possible the display is the old value and the waveform is showing you the new value.

1 Like
task test_00;
  reset_dinstr();
  test_id                       = test00;
  stim_instr_cnt_in_one_test    = 0;
  $display("\n--> %0s: [TIME=%0t]", test_id.name(), $time);
  $display("--> Description: Checking multiple issues (%0d) with random test which includes LOAD + STORE instructions", LSUIssueWidth);

  while(stim_instr_cnt_in_one_test<STIM_INSR_NUM) begin
    if(stop_stim_dinstr_f) break;
    void'(dinstr_trans_0.randomize());
    void'(dinstr_trans_1.randomize()); 
    timeout_cnt = 0;
    while(timeout_cnt < TIMEOUT_WHEN_ACTIVE_HIGH_FULL_SIGNAL) begin
      @(posedge clk_i) #0;
      if(stop_stim_dinstr_f) 
        break;
      if(timeout_cnt == (TIMEOUT_WHEN_ACTIVE_HIGH_FULL_SIGNAL-1)) begin
        $display("   +---------------------------+-----+");
        $display("   | iqlsu_space_iqlsu_o (d:2) | %3b |", dut_iqlsu_space_iqlsu_o);
        $display("   |---------------------------+-----|");
        $display("   | laq_space_o (d:2)         | %3b |", dut_laq_space_eulsu_o);
        $display("   |---------------------------+-----|");
        $display("   | saq_space_o (d:2)         | %3b |", dut_saq_space_eulsu_o);
        $display("   |---------------------------+-----|");
        `uvm_fatal("[FATAL-01]", "It is timeout error. It could be related with YONCA-CORE full signals. Follow the table above.")
      end
      // if(!dut_lsu_full_o && !(dut_fenced_o && (dinstr_transaction_0.opcode==OPC_MISC_MEM || dinstr_transaction_1.opcode==OPC_MISC_MEM))) begin // *?
      if($time < 30)
        $display("lsu_full_f %0b time %0t", lsu_full_f, $time);
      if(!lsu_full_f) begin
        dinstr[0]                         = dinstr_trans_0.dinstr;
        dinstr[1]                         = dinstr_trans_1.dinstr;
        dinstr[0].valid                   = YES;
        dinstr[1].valid                   = YES;
        if(dinstr[0].valid == YES)
          stim_instr_cnt_in_one_test++;
          stim_instr_cnt++;
        if(dinstr[1].valid == YES)
          stim_instr_cnt_in_one_test++;
          stim_instr_cnt++;
        break;
      end else begin
        reset_dinstr();
        timeout_cnt++;
      end
    end
  end
  @(posedge clk_i) reset_dinstr();
endtask

It’s my task that stimulus to dut with generating random transactions. The problem is related with “if(!lsu_full_f) begin”