00001 // $Id: ovm__phase__defines_8svh-source.html,v 1.1 2008/10/07 21:54:21 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 SVPP 00023 `ifndef INCA 00024 `define ovm_phase_type_name_decl(NAME) \ 00025 virtual function string get_type_name (); \ 00026 return `"NAME``_phase #(PARENT)`"; \ 00027 endfunction 00028 `else 00029 `define ovm_phase_type_name_decl(NAME) \ 00030 virtual function string get_type_name (); \ 00031 return `"NAME``_phase`"; \ 00032 endfunction 00033 `endif 00034 `endif 00035 00036 `define ovm_phase_func_decl(NAME,TOP_DOWN) \ 00037 class NAME``_phase #(type PARENT=int) extends ovm_phase; \ 00038 function new(); \ 00039 super.new(`"NAME`",TOP_DOWN,0); \ 00040 endfunction \ 00041 `ovm_phase_type_name_decl(NAME) \ 00042 virtual function void call_func(ovm_component parent); \ 00043 PARENT m_parent; \ 00044 if($cast(m_parent,parent)) \ 00045 m_parent.NAME(); \ 00046 endfunction \ 00047 endclass 00048 00049 00050 `define ovm_phase_task_decl(NAME,TOP_DOWN) \ 00051 class NAME``_phase #(type PARENT=int) extends ovm_phase; \ 00052 function new(); \ 00053 super.new(`"NAME`",TOP_DOWN,1); \ 00054 endfunction \ 00055 `ovm_phase_type_name_decl(NAME) \ 00056 virtual task call_task(ovm_component parent); \ 00057 PARENT m_parent; \ 00058 if($cast(m_parent,parent)) \ 00059 m_parent.NAME(); \ 00060 endtask \ 00061 endclass 00062 00063 00064 `define ovm_phase_func_topdown_decl(NAME) `ovm_phase_func_decl(NAME,1) 00065 `define ovm_phase_func_bottomup_decl(NAME) `ovm_phase_func_decl(NAME,0) 00066 `define ovm_phase_task_topdown_decl(NAME) `ovm_phase_task_decl(NAME,1) 00067 `define ovm_phase_task_bottomup_decl(NAME) `ovm_phase_task_decl(NAME,0) 00068
![]() 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:23:30 2008 |