ovm_driver.sv

Go to the documentation of this file.
00001 // $Id: ovm__driver_8sv-source.html,v 1.1 2008/10/07 21:54:36 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 `include "methodology/ovm_driver.svh"
00023 
00024 
00025 // new
00026 // ---
00027 
00028 function ovm_seq_item_prod_if::new (string name="", 
00029   ovm_component parent = null);
00030   super.new(name, parent);
00031 endfunction
00032 
00033 
00034 // do_print
00035 // --------
00036 
00037 function void ovm_seq_item_prod_if::do_print (ovm_printer printer);
00038   super.do_print(printer);
00039   if (seqr_ref != null)
00040     printer.print_string("item producer", seqr_ref.get_name());
00041   else
00042     printer.print_string("item producer", "NOT_CONNECTED");
00043 endfunction
00044 
00045 
00046 // create
00047 // ------
00048 
00049 function ovm_object ovm_seq_item_prod_if::create (string name="");
00050   ovm_seq_item_prod_if i; i=new(name);
00051   return i;
00052 endfunction
00053 
00054 
00055 // get_type_name
00056 // -------------
00057 
00058 function string ovm_seq_item_prod_if::get_type_name();
00059   return "ovm_seq_item_prod_if";
00060 endfunction 
00061 
00062 
00063 // connect_if
00064 // ----------
00065 
00066 function void ovm_seq_item_prod_if::connect_if(
00067   ovm_seq_item_cons_if seqr_if);
00068   $cast(seqr_ref, seqr_if.parent_as_seqr);
00069   seqr_if.consumer = m_parent;
00070 endfunction
00071 
00072 
00073 // item_done
00074 // ---------
00075 
00076 function void ovm_seq_item_prod_if::item_done( ovm_sequence_item item=null);
00077   seqr_ref.item_done_trigger(item);
00078 endfunction
00079 
00080 
00081 // has_do_available
00082 // ----------------
00083 
00084 function bit ovm_seq_item_prod_if::has_do_available();
00085   has_do_available = seqr_ref.has_do_available();
00086 endfunction
00087 
00088 
00089 // wait_for_sequences
00090 // ------------------
00091 
00092 task ovm_seq_item_prod_if::wait_for_sequences();
00093   seqr_ref.wait_for_sequences();
00094 endtask
00095 
00096 
00097 // get_next_item
00098 // -------------
00099 
00100 task ovm_seq_item_prod_if::get_next_item(output ovm_sequence_item item);
00101   ovm_sequence_item base_item;
00102   seqr_ref.get_next_item(item);
00103 endtask
00104 
00105 
00106 // try_next_item
00107 // -------------
00108 
00109 task ovm_seq_item_prod_if::try_next_item(output ovm_sequence_item item);
00110   ovm_sequence_item base_item;
00111   seqr_ref.try_next_item(item);
00112 endtask
00113 
00114 
00115 
00116 // new
00117 // ---
00118 
00119 function ovm_driver::new (string name, ovm_component parent);
00120   super.new(name, parent);
00121   $cast(seq_item_prod_if, create_component("ovm_seq_item_prod_if", 
00122     "seq_item_prod_if"));
00123 endfunction
00124 
00125 

Intelligent Design Verification
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
Doxygen Version: 1.4.6
Mon Sep 29 14:20:12 2008
Find a documentation bug? Report bugs to: bugs.intelligentdv.com Project: DoxygenFilterSV