sqr_connections.svh

Go to the documentation of this file.
00001 // $Id: sqr__connections_8svh-source.html,v 1.1 2008/10/07 21:54:12 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 // imp definitions
00025 //----------------------------------------------------------------------
00026 `define SEQ_ITEM_PULL_IMP(imp, REQ, RSP, req_arg, rsp_arg) \
00027   task get_next_item(output REQ req_arg); imp.get_next_item(req_arg); endtask \
00028   task try_next_item(output REQ req_arg); imp.try_next_item(req_arg); endtask \
00029   function void item_done(input RSP rsp_arg = null); imp.item_done(rsp_arg); endfunction \
00030   task wait_for_sequences(); imp.wait_for_sequences(); endtask \
00031   function bit has_do_available(); return imp.has_do_available(); endfunction \
00032   function void put_response(input RSP rsp_arg); imp.put_response(rsp_arg); endfunction \
00033   task get(output REQ req_arg); imp.get(req_arg); endtask \
00034   task peek(output REQ req_arg); imp.peek(req_arg); endtask \
00035   task put(input RSP rsp_arg); imp.put(rsp_arg); endtask
00036 
00037 // `define SEQ_ITEM_UNI_PULL_IMP(imp, T, arg) \
00038 //   task get_next_item(output T arg); imp.get_next_item(arg); endtask \
00039 //   task try_next_item(output T arg); imp.try_next_item(arg); endtask \
00040 //   function void item_done(input T arg = null); imp.item_done(arg); endfunction \
00041 //   task wait_for_sequences(); imp.wait_for_sequences(); endtask \
00042 //   function bit has_do_available(); return imp.has_do_available(); endfunction \
00043 //   task get(output T arg); imp.get(arg); endtask \
00044 //   task peek(output T arg); imp.peek(arg); endtask
00045 
00046 // `define SEQ_ITEM_PUSH_IMP(imp, T, arg) \
00047 //   task put(input T arg); imp.put(arg); endtask
00048 
00049 
00050 //----------------------------------------------------------------------
00051 // ports
00052 //----------------------------------------------------------------------
00053 class ovm_seq_item_pull_port #(type REQ=int, type RSP=REQ)
00054   extends ovm_port_base #(sqr_if_base #(REQ, RSP));
00055   `OVM_SEQ_PORT(`SEQ_ITEM_PULL_MASK, "ovm_seq_item_pull_port")
00056   `SEQ_ITEM_PULL_IMP(this.m_if, REQ, RSP, t, t)
00057 
00058   bit print_enabled = 0;
00059     
00060   // provided for backwards compatibility of connect_if call
00061   function void connect_if(ovm_port_base#(sqr_if_base#(REQ,RSP)) provider);
00062     super.connect(provider);
00063   endfunction // void
00064 
00065 endclass
00066 
00067 // class ovm_seq_item_uni_pull_port #(type T=int)
00068 //  extends ovm_port_base #(sqr_if_base #(T,T));
00069 //  `OVM_PORT_COMMON(`SEQ_ITEM_UNI_PULL_MASK, "ovm_seq_item_uni_pull_port")
00070 //  `SEQ_ITEM_UNI_PULL_IMP(this.m_if, T, t)
00071 // endclass
00072 
00073 // class ovm_push_port #(type T=int)
00074 //   extends ovm_port_base #(sqr_if_base #(T,T));
00075 //   `OVM_PORT_COMMON(`SEQ_ITEM_PUSH_MASK, "ovm_seq_item_push_port")
00076 //   `SEQ_ITEM_PUSH_IMP(this.m_if, T, t)
00077 // endclass
00078   
00079 
00080 //----------------------------------------------------------------------
00081 // exports
00082 //----------------------------------------------------------------------
00083 class ovm_seq_item_pull_export #(type REQ=int, type RSP=REQ)
00084   extends ovm_port_base #(sqr_if_base #(REQ, RSP));
00085   `OVM_EXPORT_COMMON(`SEQ_ITEM_PULL_MASK, "ovm_seq_item_pull_export")
00086   `SEQ_ITEM_PULL_IMP(this.m_if, REQ, RSP, t, t)
00087 endclass
00088 
00089 // class ovm_seq_item_uni_pull_export #(type T=int)
00090 //   extends ovm_port_base #(sqr_if_base #(T,T));
00091 //   `OVM_EXPORT_COMMON(`SEQ_ITEM_PULL_MASK, "ovm_seq_item_uni_pull_export")
00092 //   `SEQ_ITEM_UNI_PULL_IMP(this.m_if, T, t)
00093 // endclass
00094 
00095 // class ovm_push_export #(type T=int)
00096 //   extends ovm_port_base #(sqr_if_base #(T,T));
00097 //   `OVM_EXPORT_COMMON(`SEQ_ITEM_PUSH_MASK, "ovm_seq_item_push_export")
00098 //   `SEQ_ITEM_PUSH_IMP(this.m_if, T, t)
00099 // endclass
00100 
00101 //----------------------------------------------------------------------
00102 // imps
00103 //----------------------------------------------------------------------
00104 class ovm_seq_item_pull_imp #(type REQ=int, type RSP=REQ, type IMP=int)
00105   extends ovm_port_base #(sqr_if_base #(REQ, RSP));
00106   `OVM_IMP_COMMON(`SEQ_ITEM_PULL_MASK, "ovm_seq_item_pull_imp",IMP)
00107   `SEQ_ITEM_PULL_IMP(m_imp, REQ, RSP, t, t)
00108 endclass
00109 
00110 // class ovm_seq_item_uni_pull_imp #(type T=int, type IMP=int)
00111 //   extends ovm_port_base #(sqr_if_base #(T,T));
00112 //  `OVM_IMP_COMMON(`SEQ_ITEM_PULL_MASK, "ovm_seq_item_uni_pull_imp")
00113 //   `SEQ_ITEM_UNI_PULL_IMP(m_imp, T, t)
00114 // endclass
00115 
00116 // class ovm_push_imp #(type T=int, type IMP=int)
00117 //   extends ovm_port_base #(sqr_if_base #(T,T));
00118 //   `OVM_IMP_COMMON(`SEQ_ITEM_PUSH_MASK, "ovm_seq_item_push_imp")
00119 //   `SEQ_ITEM_PUSH_IMP(m_imp, T, t)
00120 // 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:30 2008
Find a documentation bug? Report bugs to: bugs.intelligentdv.com Project: DoxygenFilterSV