sc_simcontext_int.h

来自「基于4个mips核的noc设计」· C头文件 代码 · 共 128 行

H
128
字号
/*****************************************************************************  The following code is derived, directly or indirectly, from the SystemC  source code Copyright (c) 1996-2002 by all Contributors.  All Rights reserved.  The contents of this file are subject to the restrictions and limitations  set forth in the SystemC Open Source License Version 2.3 (the "License");  You may not use this file except in compliance with such restrictions and  limitations. You may obtain instructions on how to receive a copy of the  License at http://www.systemc.org/. Software distributed by Contributors  under the License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF  ANY KIND, either express or implied. See the License for the specific  language governing rights and limitations under the License. *****************************************************************************//*****************************************************************************  sc_simcontext_int.h -- For inline definitions of some utility functions.                         DO NOT EXPORT THIS INCLUDE FILE. Include this file                         after "sc_process_int.h" so that we can get the base                         class right.  Original Author: Stan Y. Liao, Synopsys, Inc. *****************************************************************************//*****************************************************************************  MODIFICATION LOG - modifiers, enter your name, affiliation, date and  changes you are making here.      Name, Affiliation, Date:  Description of Modification: *****************************************************************************/#ifndef SC_SIMCONTEXT_INT_H#define SC_SIMCONTEXT_INT_Hinlinevoidsc_simcontext::set_curr_proc( sc_method_handle method_h ){    m_curr_proc_info.process_handle = method_h;    m_curr_proc_info.kind           = SC_METHOD_PROC_;}inline voidsc_simcontext::set_curr_proc( sc_thread_handle thread_h ){    m_curr_proc_info.process_handle = thread_h;    if( thread_h->is_cthread() ) {	m_curr_proc_info.kind = SC_CTHREAD_PROC_;    } else {	m_curr_proc_info.kind = SC_THREAD_PROC_;    }}inlinevoidsc_simcontext::reset_curr_proc(){    m_curr_proc_info.process_handle = 0;    m_curr_proc_info.kind           = SC_NO_PROC_;}inlinevoidsc_simcontext::push_runnable_method( sc_method_handle method_h ){    method_h->is_runnable( true );    m_runnable->push_method( method_h );}inlinevoidsc_simcontext::push_runnable_thread( sc_thread_handle thread_h ){    thread_h->is_runnable( true );    m_runnable->push_thread( thread_h );}inlinesc_method_handlesc_simcontext::pop_runnable_method(){    sc_method_handle method_h = m_runnable->pop_method();    if( method_h == 0 ) {	reset_curr_proc();	return 0;    }    method_h->is_runnable( false );    set_curr_proc( method_h );    return method_h;}inlinesc_thread_handlesc_simcontext::pop_runnable_thread(){    sc_thread_handle thread_h = m_runnable->pop_thread();    if( thread_h == 0 ) {	reset_curr_proc();	return 0;    }    thread_h->is_runnable( false );    set_curr_proc( thread_h );    return thread_h;}// ----------------------------------------------------------------------------extern void sc_defunct_process_function( sc_module* );extern void watching_before_simulation( const sc_lambda_ptr&,					sc_simcontext* );extern void watching_during_simulation( const sc_lambda_ptr&,					sc_simcontext* );#endif

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?