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:43 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_blocking_put_imp #( T , this_type ) blocking_put_export;
00040   ovm_nonblocking_put_imp #( T , this_type ) nonblocking_put_export;
00041   ovm_put_imp #( T , this_type ) put_export;
00042   
00043   ovm_blocking_get_imp #( T , this_type ) blocking_get_export;
00044   ovm_nonblocking_get_imp #( T , this_type ) nonblocking_get_export;
00045   ovm_get_imp #( T , this_type ) get_export;
00046   
00047   ovm_blocking_peek_imp #( T , this_type ) blocking_peek_export;
00048   ovm_nonblocking_peek_imp #( T , this_type ) nonblocking_peek_export;
00049   ovm_peek_imp #( T , this_type ) peek_export;
00050   
00051   ovm_blocking_get_peek_imp #( T , this_type ) blocking_get_peek_export;
00052   ovm_nonblocking_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     blocking_put_export = new("blocking_put_export" , this );
00064     nonblocking_put_export = new("nonblocking_put_export" , this );
00065     put_export = new("put_export" , this );
00066 
00067     blocking_get_export = new("blocking_get_export" , this );
00068     nonblocking_get_export = new("nonblocking_get_export" , this );
00069     get_export = new("get_export" , this );
00070 
00071     blocking_peek_export = new("blocking_peek_export" , this );
00072     nonblocking_peek_export = new("nonblocking_peek_export" , this );
00073     peek_export = new("peek_export" , this );
00074     
00075     blocking_get_peek_export = new("blocking_get_peek_export" , this );
00076     nonblocking_get_peek_export =
00077       new("nonblocking_get_peek_export" , this );
00078     get_peek_export = new("get_peek_export" , this );
00079 
00080     put_ap = new("put_ap" , this );
00081     get_ap = new("get_ap" , this );
00082     
00083   endfunction
00084 
00085   virtual function void flush();
00086     ovm_report_error("flush", `TLM_FIFO_FUNCTION_ERROR);
00087   endfunction
00088   
00089   virtual function int used();
00090     ovm_report_error("used", `TLM_FIFO_FUNCTION_ERROR);
00091     return 0;
00092   endfunction
00093 
00094   virtual function int size();
00095     ovm_report_error("size", `TLM_FIFO_FUNCTION_ERROR);
00096     return 0;
00097   endfunction
00098 
00099   virtual task put( T t );
00100     ovm_report_error("put", `TLM_FIFO_TASK_ERROR);
00101   endtask
00102 
00103   virtual task get( output T t );
00104     ovm_report_error("get", `TLM_FIFO_TASK_ERROR);
00105   endtask
00106 
00107   virtual task peek( output T t );
00108     ovm_report_error("peek", `TLM_FIFO_TASK_ERROR);
00109   endtask
00110   
00111   virtual function bit try_put( T t );
00112     ovm_report_error("try_put", `TLM_FIFO_FUNCTION_ERROR);
00113     return 0;
00114   endfunction
00115 
00116   virtual function bit try_get( output T t );
00117     ovm_report_error("try_get", `TLM_FIFO_FUNCTION_ERROR);
00118     return 0;
00119   endfunction
00120 
00121   virtual function bit try_peek( output T t);
00122     ovm_report_error("try_peek", `TLM_FIFO_FUNCTION_ERROR);
00123     return 0;
00124   endfunction
00125   
00126   virtual function bit can_put();
00127     ovm_report_error("can_put", `TLM_FIFO_FUNCTION_ERROR);
00128     return 0;
00129   endfunction
00130 
00131   virtual function bit can_get();
00132     ovm_report_error("can_get", `TLM_FIFO_FUNCTION_ERROR);
00133     return 0;
00134   endfunction
00135 
00136   virtual function bit can_peek();
00137     ovm_report_error("can_peek", `TLM_FIFO_FUNCTION_ERROR);
00138     return 0;
00139   endfunction
00140 
00141   virtual function tlm_event ok_to_put();
00142     ovm_report_error("ok_to_put", `TLM_FIFO_FUNCTION_ERROR);
00143     return null;
00144   endfunction
00145 
00146   virtual function tlm_event ok_to_get();
00147     ovm_report_error("ok_to_get", `TLM_FIFO_FUNCTION_ERROR);
00148     return null;
00149   endfunction
00150 
00151   virtual function tlm_event ok_to_peek();
00152     ovm_report_error("ok_to_peek", `TLM_FIFO_FUNCTION_ERROR);
00153     return null;
00154   endfunction
00155 
00156   virtual function bit is_empty();
00157     ovm_report_error("is_empty", `TLM_FIFO_FUNCTION_ERROR);
00158     return 0;
00159   endfunction
00160 
00161 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:20:12 2008
Find a documentation bug? Report bugs to: bugs.intelligentdv.com Project: DoxygenFilterSV