ovm_config.svh

Go to the documentation of this file.
00001 // $Id: ovm_config.svh 19 2009-12-28 21:40:27Z seanoboyle $
00002 //----------------------------------------------------------------------
00003 //   Copyright 2007-2009 Mentor Graphics Corporation
00004 //   Copyright 2007-2009 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_CONFIG_SVH
00023 `define OVM_CONFIG_SVH
00024 
00025 typedef class ovm_component;
00026 
00027 virtual class ovm_config_setting;
00028   typedef enum { OVM_UNDEFINED_TYPE, OVM_STRING_TYPE, OVM_INT_TYPE, OVM_OBJECT_TYPE } ovm_config_type ;
00029   extern         function                 new              (string        inst, 
00030                                                             string        field, 
00031                                                             ovm_component from);
00032   extern         function bit             component_match  (ovm_component to);
00033   pure   virtual function string          value_string     ();
00034   pure   virtual function string          type_string      ();
00035   pure   virtual function ovm_config_type get_value_type   (); 
00036   extern         function bit             field_match      (string to);
00037   extern virtual function void            print_match      (ovm_component to, 
00038                                                             ovm_component from, 
00039                                                             string        field);
00040 
00041   extern         function void            set_override     (ovm_config_setting ov);
00042   extern         function void            set_used         (ovm_component      used);
00043 
00044   extern virtual function string          convert2string    ();
00045   extern         function ovm_component   get_from_component();
00046   extern         function void            get_to_list       (ref ovm_component list[$]);
00047   extern         function void            get_override_list (ref ovm_config_setting list[$]);
00048   extern         function int             num_overrides     ();
00049   extern         function int             num_used          ();
00050 
00051   extern         function string          unused_message    ();
00052   extern         function string          overridden_message();
00053   extern         function string          applied_message   ();
00054 
00055   extern virtual function string matches_string(ovm_component to, 
00056                                                 ovm_component from);
00057 
00058   //These are private fields but ovm_component needs access to
00059   //them. Since SystemVerilog doesn't have a friend concept need to make
00060   //them public.
00061             string             m_inst;
00062             string             m_field;
00063             ovm_component      m_from;
00064             ovm_component      m_used_list[$];
00065             ovm_config_setting m_override_list[$];
00066             bit                m_inst_wildcard=0;
00067             bit                m_field_wildcard=0;
00068 endclass
00069 
00070 class ovm_int_config_setting extends ovm_config_setting;
00071   extern         function        new             (string          inst, 
00072                                                   string          field, 
00073                                                   ovm_bitstream_t value, 
00074                                                   ovm_component   from);
00075   extern virtual function string matches_string(ovm_component to, 
00076                                                 ovm_component from);
00077   extern virtual function string value_string    ();
00078   extern virtual function string type_string     ();
00079   extern virtual function ovm_config_type get_value_type (); 
00080 
00081   //Internal field but access needed by ovm_component
00082   ovm_bitstream_t m_value;
00083 endclass
00084 
00085 class ovm_string_config_setting extends ovm_config_setting;
00086   extern         function        new             (string          inst, 
00087                                                   string          field, 
00088                                                   string          value, 
00089                                                   ovm_component   from);
00090   extern virtual function string matches_string(ovm_component to, 
00091                                                 ovm_component from);
00092   extern virtual function string value_string    ();
00093   extern virtual function string type_string     ();
00094   extern virtual function ovm_config_type get_value_type (); 
00095 
00096   //Internal field but access needed by ovm_component
00097   string m_value;
00098 endclass
00099 
00100 class ovm_object_config_setting extends ovm_config_setting;
00101   extern function                new             (string inst, 
00102                                                   string field, 
00103                                                   ovm_object value, 
00104                                                   ovm_component from, 
00105                                                   bit clone);
00106   extern virtual function string matches_string(ovm_component to, 
00107                                                 ovm_component from);
00108   extern virtual function string value_string    ();
00109   extern virtual function string type_string     ();
00110   extern virtual function ovm_config_type get_value_type (); 
00111 
00112   //Internal field but access needed by ovm_component
00113   ovm_object m_value;
00114   bit        m_clone;
00115 endclass
00116 
00117 `endif // OVM_CONFIG_SVH

Intelligent Design Verification
Intelligent Design Verification
Project: OVM, Revision: 2.1.0
Copyright (c) 2008-2010 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
Doxygen Version: 1.6.3
IDV SV Filter Version: 2.6.3
Sat Jun 19 11:51:28 2010
Find a documentation bug? Report bugs to: bugs.intelligentdv.com Project: DoxygenFilterSV