sc_wait_cthread.h

Go to the documentation of this file.
00001 /*****************************************************************************
00002 
00003   The following code is derived, directly or indirectly, from the SystemC
00004   source code Copyright (c) 1996-2006 by all Contributors.
00005   All Rights reserved.
00006 
00007   The contents of this file are subject to the restrictions and limitations
00008   set forth in the SystemC Open Source License Version 2.4 (the "License");
00009   You may not use this file except in compliance with such restrictions and
00010   limitations. You may obtain instructions on how to receive a copy of the
00011   License at http://www.systemc.org/. Software distributed by Contributors
00012   under the License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF
00013   ANY KIND, either express or implied. See the License for the specific
00014   language governing rights and limitations under the License.
00015 
00016  *****************************************************************************/
00017 
00018 /*****************************************************************************
00019 
00020   sc_wait_cthread.h -- Wait() and related functions for SC_CTHREADs.
00021 
00022   Original Author: Stan Y. Liao, Synopsys, Inc.
00023                    Martin Janssen, Synopsys, Inc.
00024 
00025  *****************************************************************************/
00026 
00027 /******************************************************************************
00028 
00029   MODIFICATION LOG - modifiers, enter your name, affiliation, date and
00030   changes you are making here.
00031 
00032       Name, Affiliation, Date:
00033   Description of Modification:
00034 
00035 ******************************************************************************/
00036 
00037 /* 
00038 $Log: sc_wait_cthread.h,v $
00039 Revision 1.1.1.1  2006/12/15 20:31:37  acg
00040 SystemC 2.2
00041 
00042 Revision 1.2  2006/01/03 23:18:45  acg
00043 Changed copyright to include 2006.
00044 
00045 Revision 1.1.1.1  2005/12/19 23:16:44  acg
00046 First check in of SystemC 2.1 into its own archive.
00047 
00048 Revision 1.10  2005/09/02 19:03:30  acg
00049 Changes for dynamic processes. Removal of lambda support.
00050 
00051 Revision 1.9  2005/04/04 00:16:08  acg
00052 Changes for directory name change to sys from systemc.
00053 Changes for sc_string going to std::string.
00054 Changes for sc_pvector going to std::vector.
00055 Changes for reference pools for bit and part selections.
00056 Changes for const sc_concatref support.
00057 
00058 Revision 1.6  2005/01/10 17:52:20  acg
00059 Addition of namespace specifications.
00060 
00061 Revision 1.5  2004/09/27 20:49:10  acg
00062 Andy Goodrich, Forte Design Systems, Inc.
00063    - Added a $Log comment so that CVS checkin comments appear in the
00064      checkout source.
00065 
00066 */
00067 
00068 #ifndef SC_WAIT_CTHREAD_H
00069 #define SC_WAIT_CTHREAD_H
00070 
00071 
00072 #include "sysc/kernel/sc_simcontext.h"
00073 #include "sysc/datatypes/bit/sc_logic.h"
00074 #include "sysc/communication/sc_signal_ifs.h"
00075 
00076 
00077 namespace sc_core 
00078 {
00079 
00080 // for SC_CTHREADs
00081 
00082 extern
00083 void
00084 halt( sc_simcontext* = sc_get_curr_simcontext() );
00085 
00086 
00087 extern
00088 void
00089 wait( int,
00090       sc_simcontext* = sc_get_curr_simcontext() );
00091 
00092 
00093 extern
00094 void
00095 at_posedge( const sc_signal_in_if<bool>&,
00096         sc_simcontext* = sc_get_curr_simcontext() );
00097 
00098 extern
00099 void
00100 at_posedge( const sc_signal_in_if<sc_dt::sc_logic>&,
00101         sc_simcontext* = sc_get_curr_simcontext() );
00102 
00103 extern
00104 void
00105 at_negedge( const sc_signal_in_if<bool>&,
00106         sc_simcontext* = sc_get_curr_simcontext() );
00107 
00108 extern
00109 void
00110 at_negedge( const sc_signal_in_if<sc_dt::sc_logic>&,
00111         sc_simcontext* = sc_get_curr_simcontext() );
00112 
00113 
00114 
00115 class sc_watch
00116 {
00117 public:
00118 
00119     sc_cthread_handle cthread_h;
00120 
00121     sc_watch( sc_simcontext* simc )
00122     {
00123         sc_curr_proc_handle cpi = simc->get_curr_proc_info();
00124         assert( SC_CTHREAD_PROC_ == cpi->kind );
00125         cthread_h = RCAST<sc_cthread_handle>( cpi->process_handle );
00126     }
00127 
00128     ~sc_watch()
00129     {
00130     }
00131 };
00132 
00133 } // namespace sc_core
00134 
00135 #endif

Generated on Wed Jan 21 15:32:09 2009 for SystemC by  doxygen 1.5.5