00001 // $Id: a00299.html,v 1.1 2009/01/07 19:30:00 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 //---------------------------------------------------------------------- 00023 // 00024 // TLM Interfaces 00025 // 00026 //---------------------------------------------------------------------- 00027 // 00028 // The unidirectional TLM interfaces are divided into put, get and peek 00029 // interfaces, and blocking, nonblocking and combined interfaces. 00030 // 00031 // A blocking call always succeeds, but may need to consume time to do 00032 // so. As a result, these methods must be tasks. 00033 // 00034 // A nonblocking call may not succeed, but consumes no time. As a result, 00035 // these methods are functions. 00036 // 00037 // The difference between get and peek is that get consumes the data 00038 // while peek does not. So successive calls to peek with no calls get 00039 // or try_get are guaranteed to return the same value. 00040 // 00041 // The transport interface is a bidirectional blocking interface used 00042 // when the request and response are tightly coupled in a one to one 00043 // relationship. 00044 //---------------------------------------------------------------------- 00045 00046 `define TASK_ERROR "TLM interface task not implemented" 00047 `define FUNCTION_ERROR "TLM interface function not implemented" 00048 00049 virtual class tlm_if_base #(type T1=int, type T2=int); 00050 00051 virtual task put( input T1 t ); 00052 ovm_report_error("put", `TASK_ERROR); 00053 endtask 00054 00055 virtual task get( output T2 t ); 00056 ovm_report_error("get", `TASK_ERROR); 00057 endtask 00058 00059 virtual task peek( output T2 t ); 00060 ovm_report_error("peek", `TASK_ERROR); 00061 endtask 00062 00063 virtual function bit try_put( input T1 t ); 00064 ovm_report_error("try_put", `FUNCTION_ERROR); 00065 return 0; 00066 endfunction 00067 00068 virtual function bit can_put(); 00069 ovm_report_error("can_put", `FUNCTION_ERROR); 00070 return 0; 00071 endfunction 00072 00073 virtual function bit try_get( output T2 t ); 00074 ovm_report_error("try_get", `FUNCTION_ERROR); 00075 return 0; 00076 endfunction 00077 00078 virtual function bit can_get(); 00079 ovm_report_error("can_get", `FUNCTION_ERROR); 00080 return 0; 00081 endfunction 00082 00083 virtual function bit try_peek( output T2 t ); 00084 ovm_report_error("try_peek", `FUNCTION_ERROR); 00085 return 0; 00086 endfunction 00087 00088 virtual function bit can_peek(); 00089 ovm_report_error("can_ppeek", `FUNCTION_ERROR); 00090 return 0; 00091 endfunction 00092 00093 virtual task transport( input T1 req , output T2 rsp ); 00094 ovm_report_error("transport", `TASK_ERROR); 00095 endtask 00096 00097 virtual function bit nb_transport(input T1 req, output T2 rsp); 00098 ovm_report_error("nb_transport", `FUNCTION_ERROR); 00099 return 0; 00100 endfunction 00101 00102 virtual function void write( input T1 t ); 00103 ovm_report_error("write", `FUNCTION_ERROR); 00104 endfunction 00105 00106 endclass 00107
![]() Intelligent Design Verification Project: OVM, Revision: 2.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 Version: 1.5.5 Wed Jan 7 19:27:18 2009 |