00001 // $Id: ovm__sequence__builtin_8svh-source.html,v 1.1 2008/10/07 21:54:34 alex.marin Exp $ 00002 //---------------------------------------------------------------------- 00003 // Copyright 2007-2008 Mentor Graphics Corporation 00004 // Copyright 2007-2008 Cadence Design Systems, Inc. 00005 // All Rights Reserved Worldwide 00006 // 00007 // Licensed under the Apache License, Version 2.0 (the 00008 // "License"); you may not use this file except in 00009 // compliance with the License. You may obtain a copy of 00010 // the License at 00011 // 00012 // http://www.apache.org/licenses/LICENSE-2.0 00013 // 00014 // Unless required by applicable law or agreed to in 00015 // writing, software distributed under the License is 00016 // distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 00017 // CONDITIONS OF ANY KIND, either express or implied. See 00018 // the License for the specific language governing 00019 // permissions and limitations under the License. 00020 //---------------------------------------------------------------------- 00021 00022 `ifndef OVM_SEQUENCE_BUILTIN_SVH 00023 `define OVM_SEQUENCE_BUILTIN_SVH 00024 00025 `include "methodology/ovm_meth_defines.svh" 00026 00027 00028 //----------------------------------------------------------------------------- 00029 // 00030 // CLASS: ovm_random_sequence 00031 // 00032 //----------------------------------------------------------------------------- 00033 00034 class ovm_random_sequence extends ovm_sequence; 00035 00036 rand protected int unsigned l_count; 00037 local int unsigned l_exhaustive_seq_kind; 00038 local int unsigned max_kind; 00039 rand local int unsigned l_kind; 00040 protected bit m_success; 00041 00042 extern function new (string name="ovm_random_sequence", 00043 ovm_sequencer_base sequencer=null, 00044 ovm_sequence parent_seq=null); 00045 00046 extern virtual task body (); 00047 00048 //Implement data functions 00049 extern function void do_copy (ovm_object rhs); 00050 extern function bit do_compare (ovm_object rhs, ovm_comparer comparer); 00051 extern function void do_print (ovm_printer printer); 00052 extern function void do_record (ovm_recorder recorder); 00053 00054 function ovm_object create (string name=""); 00055 ovm_random_sequence i; i=new(name); 00056 return i; 00057 endfunction 00058 00059 virtual function string get_type_name(); 00060 return "ovm_random_sequence"; 00061 endfunction 00062 00063 // Macro for factory creation 00064 `ovm_object_registry(ovm_random_sequence, ovm_random_sequence) 00065 00066 endclass 00067 00068 00069 //----------------------------------------------------------------------------- 00070 // 00071 // CLASS: ovm_exhaustive_sequence 00072 // 00073 //----------------------------------------------------------------------------- 00074 00075 class ovm_exhaustive_sequence extends ovm_sequence; 00076 00077 rand protected int unsigned l_count; 00078 local int unsigned l_exhaustive_seq_kind; 00079 local int unsigned max_kind; 00080 randc local bit[9:0] l_kind; 00081 protected bit m_success; 00082 00083 extern function new (string name="ovm_exhaustive_sequence", 00084 ovm_sequencer_base sequencer=null, 00085 ovm_sequence parent_seq=null); 00086 00087 extern virtual task body (); 00088 00089 //Implement data functions 00090 extern function void do_copy (ovm_object rhs); 00091 extern function bit do_compare (ovm_object rhs, ovm_comparer comparer); 00092 extern function void do_print (ovm_printer printer); 00093 extern function void do_record (ovm_recorder recorder); 00094 00095 function ovm_object create (string name=""); 00096 ovm_exhaustive_sequence i; i=new(name); 00097 return i; 00098 endfunction 00099 00100 virtual function string get_type_name(); 00101 return "ovm_exhaustive_sequence"; 00102 endfunction 00103 00104 // Macro for factory creation 00105 `ovm_object_registry(ovm_exhaustive_sequence, ovm_exhaustive_sequence) 00106 00107 endclass 00108 00109 00110 //----------------------------------------------------------------------------- 00111 // 00112 // CLASS: ovm_simple_sequence 00113 // 00114 //----------------------------------------------------------------------------- 00115 00116 class ovm_simple_sequence extends ovm_sequence; 00117 00118 // constructor 00119 extern function new (string name="ovm_simple_sequence", 00120 ovm_sequencer_base sequencer=null, 00121 ovm_sequence parent_seq=null); 00122 00123 // defines the behavior of this core sequence. 00124 extern virtual task body(); 00125 00126 protected rand ovm_sequence_item item; 00127 00128 extern function void do_print (ovm_printer printer); 00129 00130 function ovm_object create (string name=""); 00131 ovm_simple_sequence i; i=new(name); 00132 return i; 00133 endfunction 00134 00135 virtual function string get_type_name(); 00136 return "ovm_simple_sequence"; 00137 endfunction 00138 00139 // Macro for factory creation 00140 `ovm_object_registry(ovm_simple_sequence, ovm_simple_sequence) 00141 00142 endclass 00143 00144 00145 `endif // OVM_SEQUENCE_BUILTIN_SVH 00146
![]() Intelligent Design Verification Project: OVM, Revision: 1.1.0 |
Copyright (c) 2008 Intelligent Design Verification. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license is included here: http://www.intelligentdv.com/licenses/fdl.txt |
![]() Doxygen Version: 1.4.6 Mon Sep 29 14:20:12 2008 |