UVM

I am writing complete uvm testbench for fsm. My sequence isnt driving at all. I have completely checked my testbench and still not able to find whats wrong. Could you please help me out if I send you my code?

In reply to Muthamizh:

hi muthamizh ,

send me …

regards samy

In reply to samy:

//Sequence item class

class seq_item extends uvm_sequence_item;

//Randomizing the transaction fields

  rand bit in;
       bit out;
       bit [1:0] state;

//Object and utility macros

 `uvm_object_utils_begin(seq_item)
    `uvm_field_int(in,UVM_ALL_ON)
    `uvm_field_int(out,UVM_ALL_ON)
    `uvm_field_int(state,UVM_ALL_ON)
 `uvm_object_utils_end

//Constructor

 function new(string name="seq_item");
   super.new(name);
 endfunction

endclass


//Sequence class

class seq extends uvm_sequence#(seq_item);

//Utility macro

  `uvm_object_utils(seq)

//constructor

 function new(string name="seq");
   super.new(name);
 endfunction

//Body task

 virtual task body();

  repeat(40)
    begin
      `uvm_create(req);
       req.randomize();
      `uvm_send(req);
    end

 endtask

endclass

//Sequencer class

class sequencer extends uvm_sequencer#(seq_item);

//Utility macro

  `uvm_component_utils(sequencer)

//Constructor

 function new(string name="sequencer",uvm_component parent);
   super.new(name,parent);
 endfunction

endclass

//Driver class

class driver extends uvm_driver#(seq_item);

  virtual intf vif; //Virtual Interface handle

//Utility Macro

  `uvm_component_utils(driver)

//Constructor

  function new(string name="driver",uvm_component parent);
    super.new(name,parent);
  endfunction

//Build phase

  function void build_phase(uvm_phase phase);
    super.build_phase(phase);
    if(uvm_config_db#(virtual intf)::get(this,"","vif",vif))
      `uvm_info("VIF",$sformatf("virtual interface handle has been set for:",get_full_name(),".vif"),UVM_LOW);
  endfunction

//Run phase

  virtual task run_phase(uvm_phase phase);
    reset;
    forever
      begin
        seq_item_port.get_next_item(req);
        drive();
        seq_item_port.item_done();
      end
 endtask

  task reset;
    wait(vif.rst);
     `uvm_info("INITIATION",$sformatf("Initialization has started"),UVM_LOW);
     vif.in=0;
    wait(!vif.rst);
     `uvm_info("DONE",$sformatf("Intialization is done"),UVM_LOW);
  endtask

//Drive task

  task drive();

     @(posedge vif.clk);
  
        vif.in<=req.in;
        req.state<=vif.state;
        req.out<=vif.out;
       `uvm_info("DRIVER",$sformatf("Input=%d\tState=%2b\tOutput=%d",vif.in,req.state,req.out),UVM_LOW);
        $display($time,"input=%d",vif.in,"State=%2b",vif.state,"Output=%d",vif.out);
  endtask

endclass

//Monitor class

class monitor extends uvm_monitor;

//Virtual Interface handle

  virtual intf vif;

  uvm_analysis_port #(seq_item) pkt_obtained_port;

//Handle to store transaction information

  seq_item trans;

//Utility Macro

  `uvm_component_utils(monitor);

//Constructor

 function new(string name="monitor",uvm_component parent);
   super.new(name,parent);
   trans=new;
   pkt_obtained_port=new("pkt_obtained_port",this);
 endfunction

//Build phase

 function void build_phase(uvm_phase phase);
   super.build_phase(phase);
 if(uvm_config_db#(virtual intf)::get(this,"","vif",vif))
     `uvm_info("VIF",$sformatf("virtual interface handle has been set for:",get_full_name(),".vif"),UVM_LOW);
 endfunction

//Run phase

 virtual task run_phase(uvm_phase phase);
    forever
      begin
        @(negedge vif.clk);

        trans.in=vif.in;
        trans.state=vif.state;
        trans.out=vif.out;
        `uvm_info("MONITOR",$sformatf("Input=%d\tState=%2b\tOutput=%d",trans.in,trans.state,trans.out),UVM_LOW);  
      end
       
        pkt_obtained_port.write(trans);

 endtask

endclass

In reply to Muthamizh:

//Scoreboard class

class scoreboard extends uvm_scoreboard;

//Utility macro

`uvm_component_utils(scoreboard)

uvm_analysis_imp #(seq_item,scoreboard) pkt_obtained_export;

 seq_item trans;

//Constructor

 function new(string name="scoreboard",uvm_component parent);
   super.new(name,parent);
 endfunction

//Build phase

 function void build_phase(uvm_phase phase);
   super.build_phase(phase);
   pkt_obtained_export=new("pkt_obtained_export",this);
 endfunction

//Write function

 virtual function void write(seq_item pkt);
   $display("Packets received");
   pkt.print();

 endfunction
endclass


//Agent class

class agent extends uvm_agent;
  
  sequencer seqcr;
  driver dri;
  monitor moni;

//Utility macro 

 `uvm_component_utils(agent)

//Constructor

 function new(string name, uvm_component parent);
   super.new(name,parent);
 endfunction

//Build phase

 function void build_phase(uvm_phase phase);
   super.build_phase(phase);
   if(get_is_active()==UVM_ACTIVE)
     begin
       dri=driver::type_id::create("dri",this);
       seqcr=sequencer::type_id::create("seqcr",this);
     end
       moni=monitor::type_id::create("moni",this);
 endfunction

//Connect phase

 function void connect_phase(uvm_phase phase);
   super.connect_phase(phase);
   if(get_is_active()==UVM_ACTIVE) 
     begin
dri.seq_item_port.connect(seqcr.seq_item_export);
     end
 endfunction

endclass


//Environment class

class environment extends uvm_env;

  agent agnt;
  scoreboard sb;
 
//Utility Macro

  `uvm_component_utils(environment)

//Constructor

 function new(string name="environment",uvm_component parent);
   super.new(name,parent);
 endfunction

//Build phase

 function void build_phase(uvm_phase phase);
   super.build_phase(phase);
   agnt=agent::type_id::create("agnt",this);
   sb=scoreboard::type_id::create("sb",this);
 endfunction

//Connect phase
 function void connect_phase(uvm_phase phase);
   super.connect_phase(phase);
   agnt.moni.pkt_obtained_port.connect(sb.pkt_obtained_export);
 endfunction

endclass


//Test class

class test extends uvm_test;

//Utility Macro

 `uvm_component_utils(test)

    environment env;
    seq seq1;

//Constructor

 function new(string name="test",uvm_component parent);
   super.new(name,parent);
 endfunction

//Build phase

 function void build_phase(uvm_phase phase);
   super.build_phase(phase);
   env=environment::type_id::create("env",this);
   seq1=seq::type_id::create("seq1",this);
 endfunction

//Run phase

 task run_phase(uvm_phase phase);
    phase.raise_objection(this);
    seq1.start(env.agnt.seqcr);
    phase.drop_objection(this);
 endtask

endclass


`include "uvm_sd_test.sv"

module tb_top;

  bit clk;
  bit rst;
  
//clock generation

  always #2 clk=~clk;

//reset generation

initial
  begin
    rst=1;
    #2 rst=0;
  end

//Interface instance

  intf vif(clk,rst);

//DUT instance

  fsm1 DUT(.clk(vif.clk),
           .rst(vif.rst),
           .in(vif.in),
           .out(vif.out),
           .state(vif.state));

//Setting configuration database
 initial
   begin
     uvm_config_db#(virtual intf)::set(uvm_root::get(),"*","vif",vif);
     $dumpfile("dump.vcd");
     $dumpvars;
   end

 initial
   begin
     run_test("test");
   end

endmodule


interface intf(input clk,rst);

  logic [1:0] state; //Indicates the 2 bit states of transition in the fsm
  logic in;
  logic out;
 
endinterface

RTL

//RTL for FSM 1001 MEALY OVERLAPPING SEQUENCE DETECTOR
//=======================================================


//Module for the input and output ports 

module fsm1(clk,rst,in,out,state);

  input clk,rst,in;
  output out;
  output [1:0] state;
  reg [1:0] state,nextstate;
  reg out;

//Clock block for resetting and state transition

always @ (posedge clk)
  begin
    if(rst)
      begin

        state=2'b00;     //The state goes to reset state when reset is 1

      end
    else
      begin

        state=nextstate; //next state becomes the current state when reset is 0

      end
  end

//Always block for state transition

always @(state or in)
 begin

   case({state,in})

     3'b000:begin
       nextstate<=2'b00;
       out<=0;
     end

     3'b001:begin
       nextstate<=2'b01;
       out<=0;
     end

     3'b010:begin
       nextstate<=2'b10;
       out<=0;
     end

     3'b011: begin
       nextstate<=2'b01;
       out<=0;
     end

     3'b100:begin
       nextstate<=2'b11;
       out<=0;
     end
  3'b101:begin
       nextstate<=2'b01;
       out<=0;
     end

     3'b110:begin
       nextstate<=2'b00;
       out<=0;
     end

     3'b111: begin
       nextstate<=2'b01;
       out<=1;             //When the sequence is detected output becomes 1
     end

endcase
end
endmodule

COMPILE LIST

import uvm_pkg::*;
`include “uvm_macros.svh”

include "fsm1.sv" include “uvm_sd_interface.sv”
include "uvm_sd_seq_item.sv" include “uvm_sd_sequence.sv”
include "uvm_sd_sequencer.sv" include “uvm_sd_driver.sv”
include "uvm_sd_monitor.sv" include “uvm_sd_agent.sv”
include "uvm_sd_scoreboard.sv" include “uvm_sd_environment.sv”
`include “uvm_sd_tbtop.sv”

In reply to samy:

In reply to Muthamizh:
hi muthamizh ,
send me …
regards samy

I have sent the complete code along with rtl. It will be very helpful if you could find out whats wrong and help me out

In reply to Muthamizh:

Can you be more descriptive beyond “My sequence isn’t driving at all”? What output are you seeing? What output do you expect to see? What do you think the issue is? An output transcript with the error(s) you are seeing is very helpful.

One simple issue is that your reset isn’t long enough. Try changing it from #2 to #20.

In reply to cgales:

In reply to Muthamizh:
Can you be more descriptive beyond “My sequence isn’t driving at all”? What output are you seeing? What output do you expect to see? What do you think the issue is? An output transcript with the error(s) you are seeing is very helpful.
One simple issue is that your reset isn’t long enough. Try changing it from #2 to #20.

             106input=1State=xxOutput=x

UVM_INFO uvm_sd_monitor.sv(48) @ 106: uvm_test_top.env.agnt.moni [MONITOR] Input=1 State=00 Output=0

UVM_INFO uvm_sd_driver.sv(58) @ 110: uvm_test_top.env.agnt.dri [DRIVER] Input=1 State=00 Output=0

110input=1State=xxOutput=x

UVM_INFO uvm_sd_monitor.sv(48) @ 110: uvm_test_top.env.agnt.moni [MONITOR] Input=1 State=00 Output=0

UVM_INFO uvm_sd_driver.sv(58) @ 114: uvm_test_top.env.agnt.dri [DRIVER] Input=1 State=00 Output=0

114input=1State=xxOutput=x

UVM_INFO uvm_sd_monitor.sv(48) @ 114: uvm_test_top.env.agnt.moni [MONITOR] Input=1 State=00 Output=0

UVM_INFO uvm_sd_driver.sv(58) @ 118: uvm_test_top.env.agnt.dri [DRIVER] Input=0 State=00 Output=0

118input=0State=xxOutput=x

UVM_INFO uvm_sd_monitor.sv(48) @ 118: uvm_test_top.env.agnt.moni [MONITOR] Input=0 State=00 Output=0

UVM_INFO uvm_sd_driver.sv(58) @ 122: uvm_test_top.env.agnt.dri [DRIVER] Input=0 State=00 Output=0

122input=0State=xxOutput=x

UVM_INFO uvm_sd_monitor.sv(48) @ 122: uvm_test_top.env.agnt.moni [MONITOR] Input=0 State=00 Output=0

UVM_INFO uvm_sd_driver.sv(58) @ 126: uvm_test_top.env.agnt.dri [DRIVER] Input=1 State=00 Output=0

126input=1State=xxOutput=x

UVM_INFO uvm_sd_monitor.sv(48) @ 126: uvm_test_top.env.agnt.moni [MONITOR] Input=1 State=00 Output=0

UVM_INFO uvm_sd_driver.sv(58) @ 130: uvm_test_top.env.agnt.dri [DRIVER] Input=1 State=00 Output=0

130input=1State=xxOutput=x

UVM_INFO uvm_sd_monitor.sv(48) @ 130: uvm_test_top.env.agnt.moni [MONITOR] Input=1 State=00 Output=0

UVM_INFO uvm_sd_driver.sv(58) @ 134: uvm_test_top.env.agnt.dri [DRIVER] Input=1 State=00 Output=0

134input=1State=xxOutput=x

UVM_INFO uvm_sd_monitor.sv(48) @ 134: uvm_test_top.env.agnt.moni [MONITOR] Input=1 State=00 Output=0

UVM_INFO uvm_sd_driver.sv(58) @ 138: uvm_test_top.env.agnt.dri [DRIVER] Input=0 State=00 Output=0

138input=0State=xxOutput=x

UVM_INFO uvm_sd_monitor.sv(48) @ 138: uvm_test_top.env.agnt.moni [MONITOR] Input=0 State=00 Output=0

UVM_INFO uvm_sd_driver.sv(58) @ 142: uvm_test_top.env.agnt.dri [DRIVER] Input=0 State=00 Output=0

142input=0State=xxOutput=x

UVM_INFO uvm_sd_monitor.sv(48) @ 142: uvm_test_top.env.agnt.moni [MONITOR] Input=0 State=00 Output=0

UVM_INFO uvm_sd_driver.sv(58) @ 146: uvm_test_top.env.agnt.dri [DRIVER] Input=0 State=00 Output=0

146input=0State=xxOutput=x

UVM_INFO uvm_sd_monitor.sv(48) @ 146: uvm_test_top.env.agnt.moni [MONITOR] Input=0 State=00 Output=0

UVM_INFO uvm_sd_driver.sv(58) @ 150: uvm_test_top.env.agnt.dri [DRIVER] Input=0 State=00 Output=0

150input=0State=xxOutput=x

In reply to Muthamizh:

In reply to cgales:
106input=1State=xxOutput=x

UVM_INFO uvm_sd_monitor.sv(48) @ 106: uvm_test_top.env.agnt.moni [MONITOR] Input=1 State=00 Output=0

UVM_INFO uvm_sd_driver.sv(58) @ 110: uvm_test_top.env.agnt.dri [DRIVER] Input=1 State=00 Output=0

110input=1State=xxOutput=x

UVM_INFO uvm_sd_monitor.sv(48) @ 110: uvm_test_top.env.agnt.moni [MONITOR] Input=1 State=00 Output=0

UVM_INFO uvm_sd_driver.sv(58) @ 114: uvm_test_top.env.agnt.dri [DRIVER] Input=1 State=00 Output=0

114input=1State=xxOutput=x

UVM_INFO uvm_sd_monitor.sv(48) @ 114: uvm_test_top.env.agnt.moni [MONITOR] Input=1 State=00 Output=0

UVM_INFO uvm_sd_driver.sv(58) @ 118: uvm_test_top.env.agnt.dri [DRIVER] Input=0 State=00 Output=0

118input=0State=xxOutput=x

UVM_INFO uvm_sd_monitor.sv(48) @ 118: uvm_test_top.env.agnt.moni [MONITOR] Input=0 State=00 Output=0

UVM_INFO uvm_sd_driver.sv(58) @ 122: uvm_test_top.env.agnt.dri [DRIVER] Input=0 State=00 Output=0

122input=0State=xxOutput=x

UVM_INFO uvm_sd_monitor.sv(48) @ 122: uvm_test_top.env.agnt.moni [MONITOR] Input=0 State=00 Output=0

UVM_INFO uvm_sd_driver.sv(58) @ 126: uvm_test_top.env.agnt.dri [DRIVER] Input=1 State=00 Output=0

126input=1State=xxOutput=x

UVM_INFO uvm_sd_monitor.sv(48) @ 126: uvm_test_top.env.agnt.moni [MONITOR] Input=1 State=00 Output=0

UVM_INFO uvm_sd_driver.sv(58) @ 130: uvm_test_top.env.agnt.dri [DRIVER] Input=1 State=00 Output=0

130input=1State=xxOutput=x

UVM_INFO uvm_sd_monitor.sv(48) @ 130: uvm_test_top.env.agnt.moni [MONITOR] Input=1 State=00 Output=0

UVM_INFO uvm_sd_driver.sv(58) @ 134: uvm_test_top.env.agnt.dri [DRIVER] Input=1 State=00 Output=0

134input=1State=xxOutput=x

UVM_INFO uvm_sd_monitor.sv(48) @ 134: uvm_test_top.env.agnt.moni [MONITOR] Input=1 State=00 Output=0

UVM_INFO uvm_sd_driver.sv(58) @ 138: uvm_test_top.env.agnt.dri [DRIVER] Input=0 State=00 Output=0

138input=0State=xxOutput=x

UVM_INFO uvm_sd_monitor.sv(48) @ 138: uvm_test_top.env.agnt.moni [MONITOR] Input=0 State=00 Output=0

UVM_INFO uvm_sd_driver.sv(58) @ 142: uvm_test_top.env.agnt.dri [DRIVER] Input=0 State=00 Output=0

142input=0State=xxOutput=x

UVM_INFO uvm_sd_monitor.sv(48) @ 142: uvm_test_top.env.agnt.moni [MONITOR] Input=0 State=00 Output=0

UVM_INFO uvm_sd_driver.sv(58) @ 146: uvm_test_top.env.agnt.dri [DRIVER] Input=0 State=00 Output=0

146input=0State=xxOutput=x

UVM_INFO uvm_sd_monitor.sv(48) @ 146: uvm_test_top.env.agnt.moni [MONITOR] Input=0 State=00 Output=0

UVM_INFO uvm_sd_driver.sv(58) @ 150: uvm_test_top.env.agnt.dri [DRIVER] Input=0 State=00 Output=0

150input=0State=xxOutput=x

This is the output am getting now. but if the signals are driven, there should be state transition happening in my output. if you see my dut rtl, u could understand the way state transition happens. And regarding output, it should become 1 when the sequence 1001 is detected. In the waveform also state and output do not show at all. This is my problem.

In reply to Muthamizh:

yes, Reset isn’t long enough. here i am attaching code after increasing reset duration to 20 and it is working as per your expectations.

Link:-

Regards,
Mitesh

In reply to mitesh.patel:

Yes its working… Thanks a lot… but still the driver doesnt change and the scoreboard isnt displayed at all… what should i do for this?

In reply to mitesh.patel:

In reply to Muthamizh:
yes, Reset isn’t long enough. here i am attaching code after increasing reset duration to 20 and it is working as per your expectations.
Link:-
Edit code - EDA Playground
Regards,
Mitesh

really, thanks a lot for helping me out. I have been checking this for the past 3 days. It will be very helpful if you are able to help me out with driver and scoreboard. Thank you again

In reply to Muthamizh:

Because, write method from monitor is called outside the forever begin. ideally when, you sampled anything from interface it should be write to analysis port.

please find the link, it is showing packet received messages from scoreboard.
Link:-

In reply to mitesh.patel:

In reply to Muthamizh:
Because, write method from monitor is called outside the forever begin. ideally when, you sampled anything from interface it should be write to analysis port.
please find the link, it is showing packet received messages from scoreboard.
Link:-
Edit code - EDA Playground

Thank you so much. It is very very helpful. Thanks a lot

In reply to mitesh.patel:

In reply to Muthamizh:
Because, write method from monitor is called outside the forever begin. ideally when, you sampled anything from interface it should be write to analysis port.
please find the link, it is showing packet received messages from scoreboard.
Link:-
Edit code - EDA Playground

The input of driver and monitor changes. Could you please help me out with that?

In reply to Muthamizh:

I am also trying to correct it. Still a help would be supportive.

In reply to Muthamizh:

Can you please elaborate more? which inputs are changes ? i didnt get your question.

In reply to mitesh.patel:

UVM_INFO uvm_sd_driver.sv(59) @ 38: uvm_test_top.env.agnt.dri [DRIVER] Input=0 State=11 Output=0

UVM_INFO uvm_sd_monitor.sv(48) @ 40: uvm_test_top.env.agnt.moni [MONITOR] Input=0 State=00 Output=0

Packets received

UVM_INFO uvm_sd_scoreboard.sv(36) @ 40: uvm_test_top.env.sb [SB] Sequence is not yet started and so stays in reset state itself

----------------------------------------------------------------------------------------------------------------------

UVM_INFO uvm_sd_driver.sv(59) @ 42: uvm_test_top.env.agnt.dri [DRIVER] Input=1 State=00 Output=0

UVM_INFO uvm_sd_monitor.sv(48) @ 44: uvm_test_top.env.agnt.moni [MONITOR] Input=1 State=00 Output=0

Packets received

UVM_INFO uvm_sd_scoreboard.sv(40) @ 44: uvm_test_top.env.sb [SB] Sequence is started and so it goes to the next state 01

UVM_INFO uvm_sd_scoreboard.sv(41) @ 44: uvm_test_top.env.sb Got expected response

----------------------------------------------------------------------------------------------------------------------

UVM_INFO uvm_sd_driver.sv(59) @ 46: uvm_test_top.env.agnt.dri [DRIVER] Input=0 State=00 Output=0

UVM_INFO uvm_sd_monitor.sv(48) @ 48: uvm_test_top.env.agnt.moni [MONITOR] Input=0 State=01 Output=0

Packets received

UVM_INFO uvm_sd_scoreboard.sv(45) @ 48: uvm_test_top.env.sb [SB] Sequence continues and it goes to next state 10

UVM_INFO uvm_sd_scoreboard.sv(46) @ 48: uvm_test_top.env.sb Got expected response

----------------------------------------------------------------------------------------------------------------------

UVM_INFO uvm_sd_driver.sv(59) @ 50: uvm_test_top.env.agnt.dri [DRIVER] Input=1 State=01 Output=0

UVM_INFO uvm_sd_monitor.sv(48) @ 52: uvm_test_top.env.agnt.moni [MONITOR] Input=1 State=10 Output=0

Packets received

UVM_INFO uvm_sd_scoreboard.sv(60) @ 52: uvm_test_top.env.sb [SB] Sequence is broken and so goes to state 01

UVM_INFO uvm_sd_scoreboard.sv(61) @ 52: uvm_test_top.env.sb Got expected response

----------------------------------------------------------------------------------------------------------------------

UVM_INFO uvm_sd_driver.sv(59) @ 54: uvm_test_top.env.agnt.dri [DRIVER] Input=1 State=10 Output=0

UVM_INFO uvm_sd_monitor.sv(48) @ 56: uvm_test_top.env.agnt.moni [MONITOR] Input=1 State=01 Output=0

Packets received

UVM_INFO uvm_sd_scoreboard.sv(50) @ 56: uvm_test_top.env.sb [SB] Sequence is broken and so stays in 01 state itself

UVM_INFO uvm_sd_scoreboard.sv(51) @ 56: uvm_test_top.env.sb Got expected response

----------------------------------------------------------------------------------------------------------------------

UVM_INFO uvm_sd_driver.sv(59) @ 58: uvm_test_top.env.agnt.dri [DRIVER] Input=0 State=01 Output=0

UVM_INFO uvm_sd_monitor.sv(48) @ 60: uvm_test_top.env.agnt.moni [MONITOR] Input=0 State=01 Output=0

Packets received

In reply to Muthamizh:

In reply to mitesh.patel:
UVM_INFO uvm_sd_driver.sv(59) @ 38: uvm_test_top.env.agnt.dri [DRIVER] Input=0 State=11 Output=0

UVM_INFO uvm_sd_monitor.sv(48) @ 40: uvm_test_top.env.agnt.moni [MONITOR] Input=0 State=00 Output=0

Packets received

UVM_INFO uvm_sd_scoreboard.sv(36) @ 40: uvm_test_top.env.sb [SB] Sequence is not yet started and so stays in reset state itself

----------------------------------------------------------------------------------------------------------------------

UVM_INFO uvm_sd_driver.sv(59) @ 42: uvm_test_top.env.agnt.dri [DRIVER] Input=1 State=00 Output=0

UVM_INFO uvm_sd_monitor.sv(48) @ 44: uvm_test_top.env.agnt.moni [MONITOR] Input=1 State=00 Output=0

Packets received

UVM_INFO uvm_sd_scoreboard.sv(40) @ 44: uvm_test_top.env.sb [SB] Sequence is started and so it goes to the next state 01

UVM_INFO uvm_sd_scoreboard.sv(41) @ 44: uvm_test_top.env.sb Got expected response

----------------------------------------------------------------------------------------------------------------------

UVM_INFO uvm_sd_driver.sv(59) @ 46: uvm_test_top.env.agnt.dri [DRIVER] Input=0 State=00 Output=0

UVM_INFO uvm_sd_monitor.sv(48) @ 48: uvm_test_top.env.agnt.moni [MONITOR] Input=0 State=01 Output=0

Packets received

UVM_INFO uvm_sd_scoreboard.sv(45) @ 48: uvm_test_top.env.sb [SB] Sequence continues and it goes to next state 10

UVM_INFO uvm_sd_scoreboard.sv(46) @ 48: uvm_test_top.env.sb Got expected response

----------------------------------------------------------------------------------------------------------------------

UVM_INFO uvm_sd_driver.sv(59) @ 50: uvm_test_top.env.agnt.dri [DRIVER] Input=1 State=01 Output=0

UVM_INFO uvm_sd_monitor.sv(48) @ 52: uvm_test_top.env.agnt.moni [MONITOR] Input=1 State=10 Output=0

Packets received

UVM_INFO uvm_sd_scoreboard.sv(60) @ 52: uvm_test_top.env.sb [SB] Sequence is broken and so goes to state 01

UVM_INFO uvm_sd_scoreboard.sv(61) @ 52: uvm_test_top.env.sb Got expected response

----------------------------------------------------------------------------------------------------------------------

UVM_INFO uvm_sd_driver.sv(59) @ 54: uvm_test_top.env.agnt.dri [DRIVER] Input=1 State=10 Output=0

UVM_INFO uvm_sd_monitor.sv(48) @ 56: uvm_test_top.env.agnt.moni [MONITOR] Input=1 State=01 Output=0

Packets received

UVM_INFO uvm_sd_scoreboard.sv(50) @ 56: uvm_test_top.env.sb [SB] Sequence is broken and so stays in 01 state itself

UVM_INFO uvm_sd_scoreboard.sv(51) @ 56: uvm_test_top.env.sb Got expected response

----------------------------------------------------------------------------------------------------------------------

UVM_INFO uvm_sd_driver.sv(59) @ 58: uvm_test_top.env.agnt.dri [DRIVER] Input=0 State=01 Output=0

UVM_INFO uvm_sd_monitor.sv(48) @ 60: uvm_test_top.env.agnt.moni [MONITOR] Input=0 State=01 Output=0

Packets received

Im getting output like this now. the driver and monitor should show the same output. But only the monitor shows the correct output. There is problem with driver clock i guess. but I am not able to identify it. Could you please help me with this?

In reply to Muthamizh:

------------------------------------------------------------------------------------------------------------------------

UVM_INFO uvm_sd_monitor.sv(49) @ 94: uvm_test_top.env.agnt.moni [MONITOR] Input=1 State=00 Output=0

Packets received

UVM_INFO uvm_sd_scoreboard.sv(44) @ 94: uvm_test_top.env.sb [SB] Sequence is started and so it goes to the next state 01

UVM_INFO uvm_sd_scoreboard.sv(45) @ 94: uvm_test_top.env.sb Got expected response

UVM_INFO uvm_sd_driver.sv(58) @ 94: uvm_test_top.env.agnt.dri [DRIVER] Input=1 State=00 Output=0

------------------------------------------------------------------------------------------------------------------------

UVM_INFO uvm_sd_monitor.sv(49) @ 98: uvm_test_top.env.agnt.moni [MONITOR] Input=0 State=01 Output=0

Packets received

UVM_INFO uvm_sd_scoreboard.sv(49) @ 98: uvm_test_top.env.sb [SB] Sequence continues and it goes to next state 10

UVM_INFO uvm_sd_scoreboard.sv(50) @ 98: uvm_test_top.env.sb Got expected response

UVM_INFO uvm_sd_driver.sv(58) @ 98: uvm_test_top.env.agnt.dri [DRIVER] Input=0 State=01 Output=0

------------------------------------------------------------------------------------------------------------------------

UVM_INFO uvm_sd_monitor.sv(49) @ 102: uvm_test_top.env.agnt.moni [MONITOR] Input=1 State=10 Output=0

Packets received

UVM_INFO uvm_sd_scoreboard.sv(64) @ 102: uvm_test_top.env.sb [SB] Sequence is broken and so goes to state 01

UVM_INFO uvm_sd_scoreboard.sv(65) @ 102: uvm_test_top.env.sb Got expected response

UVM_INFO uvm_sd_driver.sv(58) @ 102: uvm_test_top.env.agnt.dri [DRIVER] Input=1 State=10 Output=0

------------------------------------------------------------------------------------------------------------------------

UVM_INFO uvm_sd_monitor.sv(49) @ 106: uvm_test_top.env.agnt.moni [MONITOR] Input=0 State=01 Output=0

Packets received

UVM_INFO uvm_sd_scoreboard.sv(49) @ 106: uvm_test_top.env.sb [SB] Sequence continues and it goes to next state 10

UVM_INFO uvm_sd_scoreboard.sv(50) @ 106: uvm_test_top.env.sb Got expected response

UVM_INFO uvm_sd_driver.sv(58) @ 106: uvm_test_top.env.agnt.dri [DRIVER] Input=0 State=01 Output=0

------------------------------------------------------------------------------------------------------------------------

UVM_INFO uvm_sd_monitor.sv(49) @ 110: uvm_test_top.env.agnt.moni [MONITOR] Input=1 State=10 Output=0

Packets received

UVM_INFO uvm_sd_scoreboard.sv(64) @ 110: uvm_test_top.env.sb [SB] Sequence is broken and so goes to state 01

UVM_INFO uvm_sd_scoreboard.sv(65) @ 110: uvm_test_top.env.sb Got expected response

UVM_INFO uvm_sd_driver.sv(58) @ 110: uvm_test_top.env.agnt.dri [DRIVER] Input=1 State=10 Output=0

------------------------------------------------------------------------------------------------------------------------

UVM_INFO uvm_sd_monitor.sv(49) @ 114: uvm_test_top.env.agnt.moni [MONITOR] Input=1 State=01 Output=0

Packets received

UVM_INFO uvm_sd_scoreboard.sv(54) @ 114: uvm_test_top.env.sb [SB] Sequence is broken and so stays in 01 state itself

UVM_INFO uvm_sd_scoreboard.sv(55) @ 114: uvm_test_top.env.sb Got expected response

UVM_INFO uvm_sd_driver.sv(58) @ 114: uvm_test_top.env.agnt.dri [DRIVER] Input=1 State=01 Output=0

------------------------------------------------------------------------------------------------------------------------

UVM_INFO uvm_sd_monitor.sv(49) @ 118: uvm_test_top.env.agnt.moni [MONITOR] Input=1 State=01 Output=0

Packets received

UVM_INFO uvm_sd_scoreboard.sv(54) @ 118: uvm_test_top.env.sb [SB] Sequence is broken and so stays in 01 state itself

UVM_INFO uvm_sd_scoreboard.sv(55) @ 118: uvm_test_top.env.sb Got expected response

UVM_INFO uvm_sd_driver.sv(58) @ 118: uvm_test_top.env.agnt.dri [DRIVER] Input=1 State=01 Output=0

------------------------------------------------------------------------------------------------------------------------

UVM_INFO uvm_sd_monitor.sv(49) @ 122: uvm_test_top.env.agnt.moni [MONITOR] Input=1 State=01 Output=0

Packets received

UVM_INFO uvm_sd_scoreboard.sv(54) @ 122: uvm_test_top.env.sb [SB] Sequence is broken and so stays in 01 state itself

UVM_INFO uvm_sd_scoreboard.sv(55) @ 122: uvm_test_top.env.sb Got expected response

UVM_INFO uvm_sd_driver.sv(58) @ 122: uvm_test_top.env.agnt.dri [DRIVER] Input=1 State=01 Output=0

------------------------------------------------------------------------------------------------------------------------

UVM_INFO uvm_sd_monitor.sv(49) @ 126: uvm_test_top.env.agnt.moni [MONITOR] Input=1 State=01 Output=0

Packets received

UVM_INFO uvm_sd_scoreboard.sv(54) @ 126: uvm_test_top.env.sb [SB] Sequence is broken and so stays in 01 state itself

UVM_INFO uvm_sd_scoreboard.sv(55) @ 126: uvm_test_top.env.sb Got expected response

UVM_INFO uvm_sd_driver.sv(58) @ 126: uvm_test_top.env.agnt.dri [DRIVER] Input=1 State=01 Output=0

------------------------------------------------------------------------------------------------------------------------

In reply to Muthamizh:

In reply to Muthamizh:

------------------------------------------------------------------------------------------------------------------------

UVM_INFO uvm_sd_monitor.sv(49) @ 94: uvm_test_top.env.agnt.moni [MONITOR] Input=1 State=00 Output=0

Packets received

UVM_INFO uvm_sd_scoreboard.sv(44) @ 94: uvm_test_top.env.sb [SB] Sequence is started and so it goes to the next state 01

UVM_INFO uvm_sd_scoreboard.sv(45) @ 94: uvm_test_top.env.sb Got expected response

UVM_INFO uvm_sd_driver.sv(58) @ 94: uvm_test_top.env.agnt.dri [DRIVER] Input=1 State=00 Output=0

------------------------------------------------------------------------------------------------------------------------

UVM_INFO uvm_sd_monitor.sv(49) @ 98: uvm_test_top.env.agnt.moni [MONITOR] Input=0 State=01 Output=0

Packets received

UVM_INFO uvm_sd_scoreboard.sv(49) @ 98: uvm_test_top.env.sb [SB] Sequence continues and it goes to next state 10

UVM_INFO uvm_sd_scoreboard.sv(50) @ 98: uvm_test_top.env.sb Got expected response

UVM_INFO uvm_sd_driver.sv(58) @ 98: uvm_test_top.env.agnt.dri [DRIVER] Input=0 State=01 Output=0

------------------------------------------------------------------------------------------------------------------------

UVM_INFO uvm_sd_monitor.sv(49) @ 102: uvm_test_top.env.agnt.moni [MONITOR] Input=1 State=10 Output=0

Packets received

UVM_INFO uvm_sd_scoreboard.sv(64) @ 102: uvm_test_top.env.sb [SB] Sequence is broken and so goes to state 01

UVM_INFO uvm_sd_scoreboard.sv(65) @ 102: uvm_test_top.env.sb Got expected response

UVM_INFO uvm_sd_driver.sv(58) @ 102: uvm_test_top.env.agnt.dri [DRIVER] Input=1 State=10 Output=0

------------------------------------------------------------------------------------------------------------------------

UVM_INFO uvm_sd_monitor.sv(49) @ 106: uvm_test_top.env.agnt.moni [MONITOR] Input=0 State=01 Output=0

Packets received

UVM_INFO uvm_sd_scoreboard.sv(49) @ 106: uvm_test_top.env.sb [SB] Sequence continues and it goes to next state 10

UVM_INFO uvm_sd_scoreboard.sv(50) @ 106: uvm_test_top.env.sb Got expected response

UVM_INFO uvm_sd_driver.sv(58) @ 106: uvm_test_top.env.agnt.dri [DRIVER] Input=0 State=01 Output=0

------------------------------------------------------------------------------------------------------------------------

UVM_INFO uvm_sd_monitor.sv(49) @ 110: uvm_test_top.env.agnt.moni [MONITOR] Input=1 State=10 Output=0

Packets received

UVM_INFO uvm_sd_scoreboard.sv(64) @ 110: uvm_test_top.env.sb [SB] Sequence is broken and so goes to state 01

UVM_INFO uvm_sd_scoreboard.sv(65) @ 110: uvm_test_top.env.sb Got expected response

UVM_INFO uvm_sd_driver.sv(58) @ 110: uvm_test_top.env.agnt.dri [DRIVER] Input=1 State=10 Output=0

------------------------------------------------------------------------------------------------------------------------

UVM_INFO uvm_sd_monitor.sv(49) @ 114: uvm_test_top.env.agnt.moni [MONITOR] Input=1 State=01 Output=0

Packets received

UVM_INFO uvm_sd_scoreboard.sv(54) @ 114: uvm_test_top.env.sb [SB] Sequence is broken and so stays in 01 state itself

UVM_INFO uvm_sd_scoreboard.sv(55) @ 114: uvm_test_top.env.sb Got expected response

UVM_INFO uvm_sd_driver.sv(58) @ 114: uvm_test_top.env.agnt.dri [DRIVER] Input=1 State=01 Output=0

------------------------------------------------------------------------------------------------------------------------

UVM_INFO uvm_sd_monitor.sv(49) @ 118: uvm_test_top.env.agnt.moni [MONITOR] Input=1 State=01 Output=0

Packets received

UVM_INFO uvm_sd_scoreboard.sv(54) @ 118: uvm_test_top.env.sb [SB] Sequence is broken and so stays in 01 state itself

UVM_INFO uvm_sd_scoreboard.sv(55) @ 118: uvm_test_top.env.sb Got expected response

UVM_INFO uvm_sd_driver.sv(58) @ 118: uvm_test_top.env.agnt.dri [DRIVER] Input=1 State=01 Output=0

------------------------------------------------------------------------------------------------------------------------

UVM_INFO uvm_sd_monitor.sv(49) @ 122: uvm_test_top.env.agnt.moni [MONITOR] Input=1 State=01 Output=0

Packets received

UVM_INFO uvm_sd_scoreboard.sv(54) @ 122: uvm_test_top.env.sb [SB] Sequence is broken and so stays in 01 state itself

UVM_INFO uvm_sd_scoreboard.sv(55) @ 122: uvm_test_top.env.sb Got expected response

UVM_INFO uvm_sd_driver.sv(58) @ 122: uvm_test_top.env.agnt.dri [DRIVER] Input=1 State=01 Output=0

------------------------------------------------------------------------------------------------------------------------

UVM_INFO uvm_sd_monitor.sv(49) @ 126: uvm_test_top.env.agnt.moni [MONITOR] Input=1 State=01 Output=0

Packets received

UVM_INFO uvm_sd_scoreboard.sv(54) @ 126: uvm_test_top.env.sb [SB] Sequence is broken and so stays in 01 state itself

UVM_INFO uvm_sd_scoreboard.sv(55) @ 126: uvm_test_top.env.sb Got expected response

UVM_INFO uvm_sd_driver.sv(58) @ 126: uvm_test_top.env.agnt.dri [DRIVER] Input=1 State=01 Output=0

------------------------------------------------------------------------------------------------------------------------

I have corrected it to this extent. But the driver is displayed after monitor and scoreboard. How to make driver to display before monitor and scoreboard?