ovm_imps.svh

Go to the documentation of this file.
00001 // $Id: ovm__imps_8svh-source.html,v 1.1 2008/10/07 21:54:16 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 class ovm_blocking_put_imp #(type T=int, type IMP=int)
00023   extends ovm_port_base #(tlm_if_base #(T,T));
00024   `OVM_IMP_COMMON(`TLM_BLOCKING_PUT_MASK,"ovm_blocking_put_imp",IMP)
00025   `BLOCKING_PUT_IMP (m_imp, T, t)
00026 endclass
00027 
00028 class ovm_nonblocking_put_imp #(type T=int, type IMP=int)
00029   extends ovm_port_base #(tlm_if_base #(T,T));
00030   `OVM_IMP_COMMON(`TLM_NONBLOCKING_PUT_MASK,"ovm_nonblocking_put_imp",IMP)
00031   `NONBLOCKING_PUT_IMP (m_imp, T, t)
00032 endclass
00033 
00034 class ovm_put_imp #(type T=int, type IMP=int)
00035   extends ovm_port_base #(tlm_if_base #(T,T));
00036   `OVM_IMP_COMMON(`TLM_PUT_MASK,"ovm_put_imp",IMP)
00037   `PUT_IMP (m_imp, T, t)
00038 endclass
00039 
00040 class ovm_blocking_get_imp #(type T=int, type IMP=int)
00041   extends ovm_port_base #(tlm_if_base #(T,T));
00042   `OVM_IMP_COMMON(`TLM_BLOCKING_GET_MASK,"ovm_blocking_get_imp",IMP)
00043   `BLOCKING_GET_IMP (m_imp, T, t)
00044 endclass
00045 
00046 class ovm_nonblocking_get_imp #(type T=int, type IMP=int)
00047   extends ovm_port_base #(tlm_if_base #(T,T));
00048   `OVM_IMP_COMMON(`TLM_NONBLOCKING_GET_MASK,"ovm_nonblocking_get_imp",IMP)
00049   `NONBLOCKING_GET_IMP (m_imp, T, t)
00050 endclass
00051 
00052 class ovm_get_imp #(type T=int, type IMP=int)
00053   extends ovm_port_base #(tlm_if_base #(T,T));
00054   `OVM_IMP_COMMON(`TLM_GET_MASK,"ovm_get_imp",IMP)
00055   `GET_IMP (m_imp, T, t)
00056 endclass
00057 
00058 class ovm_blocking_peek_imp #(type T=int, type IMP=int)
00059   extends ovm_port_base #(tlm_if_base #(T,T));
00060   `OVM_IMP_COMMON(`TLM_BLOCKING_PEEK_MASK,"ovm_blocking_peek_imp",IMP)
00061   `BLOCKING_PEEK_IMP (m_imp, T, t)
00062 endclass
00063 
00064 class ovm_nonblocking_peek_imp #(type T=int, type IMP=int)
00065   extends ovm_port_base #(tlm_if_base #(T,T));
00066   `OVM_IMP_COMMON(`TLM_NONBLOCKING_PEEK_MASK,"ovm_nonblocking_peek_imp",IMP)
00067   `NONBLOCKING_PEEK_IMP (m_imp, T, t)
00068 endclass
00069 
00070 class ovm_peek_imp #(type T=int, type IMP=int)
00071   extends ovm_port_base #(tlm_if_base #(T,T));
00072   `OVM_IMP_COMMON(`TLM_PEEK_MASK,"ovm_peek_imp",IMP)
00073   `PEEK_IMP (m_imp, T, t)
00074 endclass
00075 
00076 class ovm_blocking_get_peek_imp #(type T=int, type IMP=int)
00077   extends ovm_port_base #(tlm_if_base #(T,T));
00078   `OVM_IMP_COMMON(`TLM_BLOCKING_GET_PEEK_MASK,"ovm_blocking_get_peek_imp",IMP)
00079   `BLOCKING_GET_PEEK_IMP (m_imp, T, t)
00080 endclass
00081 
00082 class ovm_nonblocking_get_peek_imp #(type T=int, type IMP=int)
00083   extends ovm_port_base #(tlm_if_base #(T,T));
00084   `OVM_IMP_COMMON(`TLM_NONBLOCKING_GET_PEEK_MASK,"ovm_nonblocking_get_peek_imp",IMP)
00085   `NONBLOCKING_GET_PEEK_IMP (m_imp, T, t)
00086 endclass
00087 
00088 class ovm_get_peek_imp #(type T=int, type IMP=int)
00089   extends ovm_port_base #(tlm_if_base #(T,T));
00090   `OVM_IMP_COMMON(`TLM_GET_PEEK_MASK,"ovm_get_peek_imp",IMP)
00091   `GET_PEEK_IMP (m_imp, T, t)
00092 endclass
00093 
00094 //
00095 // All the master and slave imps have two modes of operation.
00096 //
00097 // The first could be described as normal but unusual. In other words
00098 // it fits the pattern of the other imps but in practise is unusual.
00099 //
00100 // This is when there is a single class  (type IMP) that implements the
00101 // entire interface, and imp -= req_imp == rsp_imp.
00102 //
00103 // The reason this is unusual is that we do not have C++ style name
00104 // mangling in SV, so such a channel will not be able to implement both
00105 // a master and a slave interface, even if REQ != RSP
00106 //
00107 // The abnormal but more usual pattern is where two siblings implement
00108 // the request and response methods. In this case req_imp and rsp_imp
00109 // are children of imp, as is the implementation itself.
00110 //
00111 // This second pattern is used in tlm_req_rsp_channel, for example.
00112 //
00113 
00114 class ovm_blocking_master_imp #(type REQ=int, type RSP=int, type IMP=int,
00115                                 type REQ_IMP=IMP, type RSP_IMP=IMP)
00116   extends ovm_port_base #(tlm_if_base #(REQ, RSP));
00117   typedef IMP     this_imp_type;
00118   typedef REQ_IMP this_req_type;
00119   typedef RSP_IMP this_rsp_type;
00120   `OVM_MS_IMP_COMMON(`TLM_BLOCKING_MASTER_MASK,"ovm_blocking_master_imp")
00121   `BLOCKING_PUT_IMP (m_req_imp, REQ, t)
00122   `BLOCKING_GET_PEEK_IMP (m_rsp_imp, RSP, t)
00123 endclass
00124 
00125 class ovm_nonblocking_master_imp #(type REQ=int, type RSP=int, type IMP=int,
00126                                    type REQ_IMP=IMP, type RSP_IMP=IMP)
00127   extends ovm_port_base #(tlm_if_base #(REQ, RSP));
00128   typedef IMP     this_imp_type;
00129   typedef REQ_IMP this_req_type;
00130   typedef RSP_IMP this_rsp_type;
00131   `OVM_MS_IMP_COMMON(`TLM_NONBLOCKING_MASTER_MASK,"ovm_nonblocking_master_imp")
00132   `NONBLOCKING_PUT_IMP (m_req_imp, REQ, t)
00133   `NONBLOCKING_GET_PEEK_IMP (m_rsp_imp, RSP, t)
00134 endclass
00135 
00136 class ovm_master_imp #(type REQ=int, type RSP=int, type IMP=int,
00137                        type REQ_IMP=IMP, type RSP_IMP=IMP)
00138   extends ovm_port_base #(tlm_if_base #(REQ, RSP));
00139   typedef IMP     this_imp_type;
00140   typedef REQ_IMP this_req_type;
00141   typedef RSP_IMP this_rsp_type;
00142   `OVM_MS_IMP_COMMON(`TLM_MASTER_MASK,"ovm_master_imp")
00143   `PUT_IMP (m_req_imp, REQ, t)
00144   `GET_PEEK_IMP (m_rsp_imp, RSP, t)
00145 endclass
00146 
00147 class ovm_blocking_slave_imp #(type REQ=int, type RSP=int, type IMP=int,
00148                                type REQ_IMP=IMP, type RSP_IMP=IMP)
00149   extends ovm_port_base #(tlm_if_base #(RSP, REQ));
00150   typedef IMP     this_imp_type;
00151   typedef REQ_IMP this_req_type;
00152   typedef RSP_IMP this_rsp_type;
00153   `OVM_MS_IMP_COMMON(`TLM_BLOCKING_SLAVE_MASK,"ovm_blocking_slave_imp")
00154   `BLOCKING_PUT_IMP (m_rsp_imp, RSP, t)
00155   `BLOCKING_GET_PEEK_IMP (m_req_imp, REQ, t)
00156 endclass
00157 
00158 class ovm_nonblocking_slave_imp #(type REQ=int, type RSP=int, type IMP=int,
00159                                   type REQ_IMP=IMP, type RSP_IMP=IMP)
00160   extends ovm_port_base #(tlm_if_base #(RSP, REQ));
00161   typedef IMP     this_imp_type;
00162   typedef REQ_IMP this_req_type;
00163   typedef RSP_IMP this_rsp_type;
00164   `OVM_MS_IMP_COMMON(`TLM_NONBLOCKING_SLAVE_MASK,"ovm_nonblocking_slave_imp")
00165   `NONBLOCKING_PUT_IMP (m_rsp_imp, RSP, t)
00166   `NONBLOCKING_GET_PEEK_IMP (m_req_imp, REQ, t)
00167 endclass
00168 
00169 class ovm_slave_imp #(type REQ=int, type RSP=int, type IMP=int,
00170                       type REQ_IMP=IMP, type RSP_IMP=IMP)
00171   extends ovm_port_base #(tlm_if_base #(RSP, REQ));
00172   typedef IMP     this_imp_type;
00173   typedef REQ_IMP this_req_type;
00174   typedef RSP_IMP this_rsp_type;
00175   `OVM_MS_IMP_COMMON(`TLM_SLAVE_MASK,"ovm_slave_imp")
00176   `PUT_IMP (m_rsp_imp, RSP, t)
00177   `GET_PEEK_IMP (m_req_imp, REQ, t)
00178 endclass
00179 
00180 class ovm_blocking_transport_imp #(type REQ=int, type RSP=int, type IMP=int)
00181   extends ovm_port_base #(tlm_if_base #(REQ, RSP));
00182   `OVM_IMP_COMMON(`TLM_BLOCKING_TRANSPORT_MASK,"ovm_blocking_transport_imp",IMP)
00183   `BLOCKING_TRANSPORT_IMP (m_imp, REQ, RSP, req, rsp)
00184 endclass
00185 
00186 class ovm_nonblocking_transport_imp #(type REQ=int, type RSP=int, type IMP=int)
00187   extends ovm_port_base #(tlm_if_base #(REQ, RSP));
00188   `OVM_IMP_COMMON(`TLM_NONBLOCKING_TRANSPORT_MASK,"ovm_nonblocking_transport_imp",IMP)
00189   `NONBLOCKING_TRANSPORT_IMP (m_imp, REQ, RSP, req, rsp)
00190 endclass
00191 
00192 class ovm_transport_imp #(type REQ=int, type RSP=int, type IMP=int)
00193   extends ovm_port_base #(tlm_if_base #(REQ, RSP));
00194   `OVM_IMP_COMMON(`TLM_TRANSPORT_MASK,"ovm_transport_imp",IMP)
00195   `BLOCKING_TRANSPORT_IMP (m_imp, REQ, RSP, req, rsp)
00196   `NONBLOCKING_TRANSPORT_IMP (m_imp, REQ, RSP, req, rsp)
00197 endclass
00198 
00199 class ovm_analysis_imp #(type T=int, type IMP=int)
00200   extends ovm_port_base #(tlm_if_base #(T,T));
00201   `OVM_IMP_COMMON(`TLM_ANALYSIS_MASK,"ovm_analysis_imp",IMP)
00202   function void write (input T t);
00203     m_imp.write (t);
00204   endfunction
00205 endclass

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:23:29 2008
Find a documentation bug? Report bugs to: bugs.intelligentdv.com Project: DoxygenFilterSV