tlm_fifo_base.svh

Go to the documentation of this file.
00001 // $Id: tlm__fifo__base_8svh-source.html,v 1.1 2008/10/07 21:54:15 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 `define TLM_FIFO_TASK_ERROR "fifo channel task not implemented"
00023 `define TLM_FIFO_FUNCTION_ERROR "fifo channel function not implemented"
00024 
00025 //----------------------------------------------------------------------
00026 // CLASS tlm_event
00027 //----------------------------------------------------------------------
00028 class tlm_event;
00029   event trigger;
00030 endclass
00031 
00032 //----------------------------------------------------------------------
00033 // CLASS tlm_fifo_base
00034 //----------------------------------------------------------------------
00035 virtual class tlm_fifo_base #(type T = int) extends ovm_component;
00036 
00037   typedef tlm_fifo_base #(T) this_type;
00038   
00039   ovm_put_imp      #(T, this_type) blocking_put_export;
00040   ovm_put_imp      #(T, this_type) nonblocking_put_export;
00041   ovm_put_imp      #(T, this_type) put_export;
00042   
00043   ovm_get_peek_imp #(T, this_type) blocking_get_export;
00044   ovm_get_peek_imp #(T, this_type) nonblocking_get_export;
00045   ovm_get_peek_imp #(T, this_type) get_export;
00046   
00047   ovm_get_peek_imp #(T, this_type) blocking_peek_export;
00048   ovm_get_peek_imp #(T, this_type) nonblocking_peek_export;
00049   ovm_get_peek_imp #(T, this_type) peek_export;
00050   
00051   ovm_get_peek_imp #(T, this_type) blocking_get_peek_export;
00052   ovm_get_peek_imp #(T, this_type) nonblocking_get_peek_export;
00053   ovm_get_peek_imp #(T, this_type) get_peek_export;  
00054 
00055   ovm_analysis_port #(T) put_ap, get_ap;
00056 
00057   //--------------------------------------------------------------------
00058   // constructor (new)
00059   //--------------------------------------------------------------------
00060   function new(string name, ovm_component parent = null);
00061     super.new(name, parent);
00062 
00063     put_export = new("put_export", this);
00064     blocking_put_export     = put_export;
00065     nonblocking_put_export  = put_export;
00066 
00067     get_peek_export = new("get_peek_export", this);
00068     blocking_get_peek_export    = get_peek_export;
00069     nonblocking_get_peek_export = get_peek_export;
00070     blocking_get_export         = get_peek_export;
00071     nonblocking_get_export      = get_peek_export;
00072     get_export                  = get_peek_export;
00073     blocking_peek_export        = get_peek_export;
00074     nonblocking_peek_export     = get_peek_export;
00075     peek_export                 = get_peek_export;
00076 
00077     put_ap = new("put_ap", this);
00078     get_ap = new("get_ap", this);
00079     
00080   endfunction
00081 
00082   virtual function void flush();
00083     ovm_report_error("flush", `TLM_FIFO_FUNCTION_ERROR);
00084   endfunction
00085   
00086   virtual function int used();
00087     ovm_report_error("used", `TLM_FIFO_FUNCTION_ERROR);
00088     return 0;
00089   endfunction
00090 
00091   virtual function int size();
00092     ovm_report_error("size", `TLM_FIFO_FUNCTION_ERROR);
00093     return 0;
00094   endfunction
00095 
00096   virtual task put(T t);
00097     ovm_report_error("put", `TLM_FIFO_TASK_ERROR);
00098   endtask
00099 
00100   virtual task get(output T t);
00101     ovm_report_error("get", `TLM_FIFO_TASK_ERROR);
00102   endtask
00103 
00104   virtual task peek(output T t);
00105     ovm_report_error("peek", `TLM_FIFO_TASK_ERROR);
00106   endtask
00107   
00108   virtual function bit try_put(T t);
00109     ovm_report_error("try_put", `TLM_FIFO_FUNCTION_ERROR);
00110     return 0;
00111   endfunction
00112 
00113   virtual function bit try_get(output T t);
00114     ovm_report_error("try_get", `TLM_FIFO_FUNCTION_ERROR);
00115     return 0;
00116   endfunction
00117 
00118   virtual function bit try_peek(output T t);
00119     ovm_report_error("try_peek", `TLM_FIFO_FUNCTION_ERROR);
00120     return 0;
00121   endfunction
00122   
00123   virtual function bit can_put();
00124     ovm_report_error("can_put", `TLM_FIFO_FUNCTION_ERROR);
00125     return 0;
00126   endfunction
00127 
00128   virtual function bit can_get();
00129     ovm_report_error("can_get", `TLM_FIFO_FUNCTION_ERROR);
00130     return 0;
00131   endfunction
00132 
00133   virtual function bit can_peek();
00134     ovm_report_error("can_peek", `TLM_FIFO_FUNCTION_ERROR);
00135     return 0;
00136   endfunction
00137 
00138   virtual function tlm_event ok_to_put();
00139     ovm_report_error("ok_to_put", `TLM_FIFO_FUNCTION_ERROR);
00140     return null;
00141   endfunction
00142 
00143   virtual function tlm_event ok_to_get();
00144     ovm_report_error("ok_to_get", `TLM_FIFO_FUNCTION_ERROR);
00145     return null;
00146   endfunction
00147 
00148   virtual function tlm_event ok_to_peek();
00149     ovm_report_error("ok_to_peek", `TLM_FIFO_FUNCTION_ERROR);
00150     return null;
00151   endfunction
00152 
00153   virtual function bit is_empty();
00154     ovm_report_error("is_empty", `TLM_FIFO_FUNCTION_ERROR);
00155     return 0;
00156   endfunction
00157 
00158 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