OpenCores
URL https://opencores.org/ocsvn/lpffir/lpffir/trunk

Subversion Repositories lpffir

[/] [lpffir/] [trunk/] [uvm/] [rca_uvm/] [generated_tb/] [tb/] [top/] [sv/] [top_seq_lib.sv] - Blame information for rev 5

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 5 vladimirar
// You can insert code here by setting file_header_inc in file common.tpl
2
 
3
//=============================================================================
4
// Project  : generated_tb
5
//
6
// File Name: top_seq_lib.sv
7
//
8
//
9
// Version:   1.0
10
//
11
// Code created by Easier UVM Code Generator version 2016-04-18-EP on Tue Mar 19 21:50:30 2019
12
//=============================================================================
13
// Description: Sequence for top
14
//=============================================================================
15
 
16
`ifndef TOP_SEQ_LIB_SV
17
`define TOP_SEQ_LIB_SV
18
 
19
class top_default_seq extends uvm_sequence #(uvm_sequence_item);
20
 
21
  `uvm_object_utils(top_default_seq)
22
 
23
  rca_agent  m_rca_agent;
24
 
25
  // Number of times to repeat child sequences
26
  int m_seq_count = 8;
27
 
28
  extern function new(string name = "");
29
  extern task body();
30
  extern task pre_start();
31
  extern task post_start();
32
 
33
`ifndef UVM_POST_VERSION_1_1
34
  // Functions to support UVM 1.2 objection API in UVM 1.1
35
  extern function uvm_phase get_starting_phase();
36
  extern function void set_starting_phase(uvm_phase phase);
37
`endif
38
 
39
endclass : top_default_seq
40
 
41
 
42
function top_default_seq::new(string name = "");
43
  super.new(name);
44
endfunction : new
45
 
46
 
47
task top_default_seq::body();
48
  `uvm_info(get_type_name(), "Default sequence starting", UVM_HIGH)
49
 
50
 
51
  repeat (m_seq_count)
52
  begin
53
    fork
54
      if (m_rca_agent.m_config.is_active == UVM_ACTIVE)
55
      begin
56
        rca_default_seq seq;
57
        seq = rca_default_seq::type_id::create("seq");
58
        seq.set_item_context(this, m_rca_agent.m_sequencer);
59
        if ( !seq.randomize() )
60
          `uvm_error(get_type_name(), "Failed to randomize sequence")
61
        seq.set_starting_phase( get_starting_phase() );
62
        seq.start(m_rca_agent.m_sequencer, this);
63
      end
64
    join
65
  end
66
 
67
  `uvm_info(get_type_name(), "Default sequence completed", UVM_HIGH)
68
endtask : body
69
 
70
 
71
task top_default_seq::pre_start();
72
  uvm_phase phase = get_starting_phase();
73
  if (phase != null)
74
    phase.raise_objection(this);
75
endtask: pre_start
76
 
77
 
78
task top_default_seq::post_start();
79
  uvm_phase phase = get_starting_phase();
80
  if (phase != null)
81
    phase.drop_objection(this);
82
endtask: post_start
83
 
84
 
85
`ifndef UVM_POST_VERSION_1_1
86
function uvm_phase top_default_seq::get_starting_phase();
87
  return starting_phase;
88
endfunction: get_starting_phase
89
 
90
 
91
function void top_default_seq::set_starting_phase(uvm_phase phase);
92
  starting_phase = phase;
93
endfunction: set_starting_phase
94
`endif
95
 
96
 
97
// You can insert code here by setting top_seq_inc in file common.tpl
98
 
99
`endif // TOP_SEQ_LIB_SV
100
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.