Code21: Set_Timeout.sv - EDA Playground
Warning! This exercise has been opened in another tab; autosave has been disabled. Close this tab or refresh to reactivate.

 Languages & Libraries

 Tools & Simulators

 Examples

203


47
 
1
`include "uvm_macros.svh"
2
import uvm_pkg::*;
3
///default : 9200sec
4
 
5
 
6
class comp extends uvm_component;
7
  `uvm_component_utils(comp)
8
  
9
 
10
  function new(string path = "comp", uvm_component parent = null);
11
    super.new(path, parent);
12
  endfunction
13
  
14
  task reset_phase(uvm_phase phase);
15
    phase.raise_objection(this);
16
    `uvm_info("comp","Reset Started", UVM_NONE);
17
     #10;
18
    `uvm_info("comp","Reset Completed", UVM_NONE);
19
    phase.drop_objection(this);
20
  endtask
21
  
22
  task main_phase(uvm_phase phase);
23
    phase.raise_objection(this);
24
    `uvm_info("mon", " Main Phase Started", UVM_NONE);
25
    #100;
26
    `uvm_info("mon", " Main Phase Ended", UVM_NONE);
27
    phase.drop_objection(this);
28
  endtask
29
  
30
  
31
  function void build_phase(uvm_phase phase);
32
    super.build_phase(phase); 
33
  endfunction
34
  
35
  
36
endclass
37
 
38
///////////////////////////////////////////////////////////////////////////
39
module tb;
40
  
41
  initial begin
42
 
43
    uvm_top.set_timeout(100ns, 0);
44
    run_test("comp");
45
  end
46
endmodule
47
xxxxxxxxxx
1
 
1
// Code your design here
2
62 views and 0 likes     
A short description will be helpful for you to remember your playground's details
 
100:0