ovm_phase_defines.svh

Go to the documentation of this file.
00001 // $Id: ovm_phase_defines.svh 1 2008-03-05 02:42:30Z seanoboyle $
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 //       http://www.apache.org/licenses/LICENSE-2.0
00023 //
00024 //   Unless required by applicable law or agreed to in
00025 //   writing, software distributed under the License is
00026 //   distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
00027 //   CONDITIONS OF ANY KIND, either express or implied.  See
00028 //   the License for the specific language governing
00029 //   permissions and limitations under the License.
00030 //----------------------------------------------------------------------
00031 
00032 `define ovm_phase_func_decl(NAME,TOP_DOWN) \
00033   class NAME``_phase #(type PARENT=int) extends ovm_phase; \
00034     PARENT m_parent; \
00035     function new(); \
00036       super.new(`"NAME`",TOP_DOWN,0); \
00037     endfunction \
00038     virtual function void call_func(); \
00039       m_parent.NAME(); \
00040     endfunction \
00041     virtual task execute(ovm_component parent); \
00042       assert($cast(m_parent,parent)); \
00043       call_func(); \
00044     endtask  \
00045   endclass
00046 
00047   
00048 `define ovm_phase_task_decl(NAME,TOP_DOWN) \
00049   class NAME``_phase #(type PARENT=int) extends ovm_phase; \
00050     PARENT m_parent; \
00051     function new(); \
00052       super.new(`"NAME`",TOP_DOWN,1); \
00053     endfunction \
00054     virtual task call_task(); \
00055       m_parent.NAME(); \
00056     endtask \
00057     virtual task execute(ovm_component parent); \
00058       assert($cast(m_parent,parent)); \
00059       call_task(); \
00060     endtask \
00061   endclass
00062   

Intelligent Design Verification
Intelligent Design Verification
Project: OVM, Revision: 1.0.1
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.5.6
Sun Sep 21 13:53:50 2008
Find a documentation bug? Report bugs to: bugs.intelligentdv.com Project: DoxygenFilterSV