sqr_connections.svh

Go to the documentation of this file.
00001 // $Id: a00293.html,v 1.1 2009/01/07 19:30:02 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 //  function void connect_if(ovm_port_base #(sqr_if_base#(REQ, RSP)) seq_item_port); endtask
00038 
00039 // `define SEQ_ITEM_UNI_PULL_IMP(imp, T, arg) \
00040 //   task get_next_item(output T arg); imp.get_next_item(arg); endtask \
00041 //   task try_next_item(output T arg); imp.try_next_item(arg); endtask \
00042 //   function void item_done(input T arg = null); imp.item_done(arg); endfunction \
00043 //   task wait_for_sequences(); imp.wait_for_sequences(); endtask \
00044 //   function bit has_do_available(); return imp.has_do_available(); endfunction \
00045 //   task get(output T arg); imp.get(arg); endtask \
00046 //   task peek(output T arg); imp.peek(arg); endtask
00047 
00048 // `define SEQ_ITEM_PUSH_IMP(imp, T, arg) \
00049 //   task put(input T arg); imp.put(arg); endtask
00050 
00051 
00052 //----------------------------------------------------------------------
00053 // ports
00054 //----------------------------------------------------------------------
00055 class ovm_seq_item_pull_port #(type REQ=int, type RSP=REQ)
00056   extends ovm_port_base #(sqr_if_base #(REQ, RSP));
00057   `OVM_SEQ_PORT(`SEQ_ITEM_PULL_MASK, "ovm_seq_item_pull_port")
00058   `SEQ_ITEM_PULL_IMP(this.m_if, REQ, RSP, t, t)
00059 
00060   bit print_enabled = 0;
00061     
00062   // provided for backwards compatibility of connect_if call
00063   function void connect_if(ovm_port_base#(sqr_if_base#(REQ,RSP)) provider);
00064     super.connect(provider);
00065     ovm_report_warning("deprecated",
00066                        "ovm_seq_item_pull_port.connect_if has been deprecated");
00067   endfunction // void
00068 
00069 endclass
00070 
00071 // class ovm_seq_item_uni_pull_port #(type T=int)
00072 //  extends ovm_port_base #(sqr_if_base #(T,T));
00073 //  `OVM_PORT_COMMON(`SEQ_ITEM_UNI_PULL_MASK, "ovm_seq_item_uni_pull_port")
00074 //  `SEQ_ITEM_UNI_PULL_IMP(this.m_if, T, t)
00075 // endclass
00076 
00077 // class ovm_push_port #(type T=int)
00078 //   extends ovm_port_base #(sqr_if_base #(T,T));
00079 //   `OVM_PORT_COMMON(`SEQ_ITEM_PUSH_MASK, "ovm_seq_item_push_port")
00080 //   `SEQ_ITEM_PUSH_IMP(this.m_if, T, t)
00081 // endclass
00082   
00083 
00084 //----------------------------------------------------------------------
00085 // exports
00086 //----------------------------------------------------------------------
00087 class ovm_seq_item_pull_export #(type REQ=int, type RSP=REQ)
00088   extends ovm_port_base #(sqr_if_base #(REQ, RSP));
00089   `OVM_EXPORT_COMMON(`SEQ_ITEM_PULL_MASK, "ovm_seq_item_pull_export")
00090   `SEQ_ITEM_PULL_IMP(this.m_if, REQ, RSP, t, t)
00091 endclass
00092 
00093 // class ovm_seq_item_uni_pull_export #(type T=int)
00094 //   extends ovm_port_base #(sqr_if_base #(T,T));
00095 //   `OVM_EXPORT_COMMON(`SEQ_ITEM_PULL_MASK, "ovm_seq_item_uni_pull_export")
00096 //   `SEQ_ITEM_UNI_PULL_IMP(this.m_if, T, t)
00097 // endclass
00098 
00099 // class ovm_push_export #(type T=int)
00100 //   extends ovm_port_base #(sqr_if_base #(T,T));
00101 //   `OVM_EXPORT_COMMON(`SEQ_ITEM_PUSH_MASK, "ovm_seq_item_push_export")
00102 //   `SEQ_ITEM_PUSH_IMP(this.m_if, T, t)
00103 // endclass
00104 
00105 //----------------------------------------------------------------------
00106 // imps
00107 //----------------------------------------------------------------------
00108 class ovm_seq_item_pull_imp #(type REQ=int, type RSP=REQ, type IMP=int)
00109   extends ovm_port_base #(sqr_if_base #(REQ, RSP));
00110   `OVM_IMP_COMMON(`SEQ_ITEM_PULL_MASK, "ovm_seq_item_pull_imp",IMP)
00111   `SEQ_ITEM_PULL_IMP(m_imp, REQ, RSP, t, t)
00112 
00113   // provided for backwards compatibility of connect_if call
00114   function void connect_if(ovm_port_base#(sqr_if_base#(REQ,RSP)) provider);
00115     provider.connect(this);
00116     ovm_report_warning("deprecated",
00117                        "ovm_seq_item_pull_imp.connect_if has been deprecated");
00118   endfunction // void
00119 
00120 endclass
00121 
00122 // class ovm_seq_item_uni_pull_imp #(type T=int, type IMP=int)
00123 //   extends ovm_port_base #(sqr_if_base #(T,T));
00124 //  `OVM_IMP_COMMON(`SEQ_ITEM_PULL_MASK, "ovm_seq_item_uni_pull_imp")
00125 //   `SEQ_ITEM_UNI_PULL_IMP(m_imp, T, t)
00126 // endclass
00127 
00128 // class ovm_push_imp #(type T=int, type IMP=int)
00129 //   extends ovm_port_base #(sqr_if_base #(T,T));
00130 //   `OVM_IMP_COMMON(`SEQ_ITEM_PUSH_MASK, "ovm_seq_item_push_imp")
00131 //   `SEQ_ITEM_PUSH_IMP(m_imp, T, t)
00132 // endclass

Intelligent Design Verification
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
Doxygen Version: 1.5.5
Wed Jan 7 19:27:18 2009
Find a documentation bug? Report bugs to: bugs.intelligentdv.com Project: DoxygenFilterSV