00001 // $Id: tlm__imps_8svh-source.html,v 1.1 2008/10/07 21:54:28 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 // These imps are used in ovm_*_port, ovm_*_export and ovm_*_imp 00025 // 00026 00027 `define BLOCKING_PUT_IMP( imp , TYPE , arg ) \ 00028 task put( input TYPE arg ); imp.put( arg ); endtask 00029 00030 `define BLOCKING_GET_IMP( imp , TYPE , arg ) \ 00031 task get( output TYPE arg ); imp.get( arg ); endtask 00032 00033 `define BLOCKING_PEEK_IMP( imp , TYPE , arg ) \ 00034 task peek( output TYPE arg );imp.peek( arg ); endtask 00035 00036 `define NONBLOCKING_PUT_IMP( imp , TYPE , arg ) \ 00037 function bit try_put( input TYPE arg ); \ 00038 if( !imp.try_put( arg ) ) return 0; \ 00039 return 1; \ 00040 endfunction \ 00041 function bit can_put(); return imp.can_put(); endfunction 00042 00043 `define NONBLOCKING_GET_IMP( imp , TYPE , arg ) \ 00044 function bit try_get( output TYPE arg ); \ 00045 if( !imp.try_get( arg ) ) return 0; \ 00046 return 1; \ 00047 endfunction \ 00048 function bit can_get(); return imp.can_get(); endfunction 00049 00050 `define NONBLOCKING_PEEK_IMP( imp , TYPE , arg ) \ 00051 function bit try_peek( output TYPE arg ); \ 00052 if( !imp.try_peek( arg ) ) return 0; \ 00053 return 1; \ 00054 endfunction \ 00055 function bit can_peek(); return imp.can_peek(); endfunction 00056 00057 `define BLOCKING_TRANSPORT_IMP( imp, REQ, RSP, req_arg, rsp_arg) \ 00058 task transport( input REQ req_arg, output RSP rsp_arg); \ 00059 imp.transport(req_arg, rsp_arg); \ 00060 endtask 00061 00062 `define NONBLOCKING_TRANSPORT_IMP( imp, REQ, RSP, req_arg, rsp_arg) \ 00063 function bit nb_transport( input REQ req_arg, output RSP rsp_arg); \ 00064 return imp.nb_transport(req_arg, rsp_arg); \ 00065 endfunction 00066
![]() 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:20:12 2008 |