sc_sensitive.h revision 12027
112027Sjungma@eit.uni-kl.de/***************************************************************************** 212027Sjungma@eit.uni-kl.de 312027Sjungma@eit.uni-kl.de Licensed to Accellera Systems Initiative Inc. (Accellera) under one or 412027Sjungma@eit.uni-kl.de more contributor license agreements. See the NOTICE file distributed 512027Sjungma@eit.uni-kl.de with this work for additional information regarding copyright ownership. 612027Sjungma@eit.uni-kl.de Accellera licenses this file to you under the Apache License, Version 2.0 712027Sjungma@eit.uni-kl.de (the "License"); you may not use this file except in compliance with the 812027Sjungma@eit.uni-kl.de License. You may obtain a copy of the License at 912027Sjungma@eit.uni-kl.de 1012027Sjungma@eit.uni-kl.de http://www.apache.org/licenses/LICENSE-2.0 1112027Sjungma@eit.uni-kl.de 1212027Sjungma@eit.uni-kl.de Unless required by applicable law or agreed to in writing, software 1312027Sjungma@eit.uni-kl.de distributed under the License is distributed on an "AS IS" BASIS, 1412027Sjungma@eit.uni-kl.de WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 1512027Sjungma@eit.uni-kl.de implied. See the License for the specific language governing 1612027Sjungma@eit.uni-kl.de permissions and limitations under the License. 1712027Sjungma@eit.uni-kl.de 1812027Sjungma@eit.uni-kl.de *****************************************************************************/ 1912027Sjungma@eit.uni-kl.de 2012027Sjungma@eit.uni-kl.de/***************************************************************************** 2112027Sjungma@eit.uni-kl.de 2212027Sjungma@eit.uni-kl.de sc_sensitive.h -- Sensitivity classes. Requires "sc_process.h" 2312027Sjungma@eit.uni-kl.de for declarations of sc_method_handle, &.c. 2412027Sjungma@eit.uni-kl.de 2512027Sjungma@eit.uni-kl.de Original Author: Stan Y. Liao, Synopsys, Inc. 2612027Sjungma@eit.uni-kl.de Martin Janssen, Synopsys, Inc. 2712027Sjungma@eit.uni-kl.de 2812027Sjungma@eit.uni-kl.de CHANGE LOG AT THE END OF THE FILE 2912027Sjungma@eit.uni-kl.de *****************************************************************************/ 3012027Sjungma@eit.uni-kl.de 3112027Sjungma@eit.uni-kl.de 3212027Sjungma@eit.uni-kl.de#ifndef SC_SENSITIVE_H 3312027Sjungma@eit.uni-kl.de#define SC_SENSITIVE_H 3412027Sjungma@eit.uni-kl.de 3512027Sjungma@eit.uni-kl.de#include "sysc/kernel/sc_process.h" 3612027Sjungma@eit.uni-kl.de 3712027Sjungma@eit.uni-kl.denamespace sc_dt 3812027Sjungma@eit.uni-kl.de{ 3912027Sjungma@eit.uni-kl.de class sc_logic; 4012027Sjungma@eit.uni-kl.de} 4112027Sjungma@eit.uni-kl.de 4212027Sjungma@eit.uni-kl.denamespace sc_core { 4312027Sjungma@eit.uni-kl.de 4412027Sjungma@eit.uni-kl.declass sc_process_handle; 4512027Sjungma@eit.uni-kl.declass sc_event; 4612027Sjungma@eit.uni-kl.declass sc_event_finder; 4712027Sjungma@eit.uni-kl.declass sc_interface; 4812027Sjungma@eit.uni-kl.declass sc_module; 4912027Sjungma@eit.uni-kl.declass sc_port_base; 5012027Sjungma@eit.uni-kl.detemplate <class T> class sc_in; 5112027Sjungma@eit.uni-kl.detemplate <class T> class sc_inout; 5212027Sjungma@eit.uni-kl.detemplate <class T> class sc_signal_in_if; 5312027Sjungma@eit.uni-kl.de 5412027Sjungma@eit.uni-kl.de 5512027Sjungma@eit.uni-kl.de// ---------------------------------------------------------------------------- 5612027Sjungma@eit.uni-kl.de// CLASS : sc_sensitive 5712027Sjungma@eit.uni-kl.de// 5812027Sjungma@eit.uni-kl.de// Static sensitivity class for events. 5912027Sjungma@eit.uni-kl.de// ---------------------------------------------------------------------------- 6012027Sjungma@eit.uni-kl.de 6112027Sjungma@eit.uni-kl.declass sc_sensitive 6212027Sjungma@eit.uni-kl.de{ 6312027Sjungma@eit.uni-kl.de friend class sc_module; 6412027Sjungma@eit.uni-kl.de 6512027Sjungma@eit.uni-kl.depublic: 6612027Sjungma@eit.uni-kl.de 6712027Sjungma@eit.uni-kl.de // typedefs 6812027Sjungma@eit.uni-kl.de typedef sc_signal_in_if<bool> in_if_b_type; 6912027Sjungma@eit.uni-kl.de typedef sc_signal_in_if<sc_dt::sc_logic> in_if_l_type; 7012027Sjungma@eit.uni-kl.de typedef sc_in<bool> in_port_b_type; 7112027Sjungma@eit.uni-kl.de typedef sc_in<sc_dt::sc_logic> in_port_l_type; 7212027Sjungma@eit.uni-kl.de typedef sc_inout<bool> inout_port_b_type; 7312027Sjungma@eit.uni-kl.de typedef sc_inout<sc_dt::sc_logic> inout_port_l_type; 7412027Sjungma@eit.uni-kl.de 7512027Sjungma@eit.uni-kl.deprivate: 7612027Sjungma@eit.uni-kl.de 7712027Sjungma@eit.uni-kl.de // constructor 7812027Sjungma@eit.uni-kl.de explicit sc_sensitive( sc_module* ); 7912027Sjungma@eit.uni-kl.de 8012027Sjungma@eit.uni-kl.de // destructor 8112027Sjungma@eit.uni-kl.de ~sc_sensitive(); 8212027Sjungma@eit.uni-kl.de 8312027Sjungma@eit.uni-kl.depublic: 8412027Sjungma@eit.uni-kl.de 8512027Sjungma@eit.uni-kl.de // changing between process handles 8612027Sjungma@eit.uni-kl.de sc_sensitive& operator << ( sc_process_handle ); 8712027Sjungma@eit.uni-kl.de#if 0 8812027Sjungma@eit.uni-kl.de sc_sensitive& operator << ( sc_method_handle ); 8912027Sjungma@eit.uni-kl.de sc_sensitive& operator << ( sc_thread_handle ); 9012027Sjungma@eit.uni-kl.de#endif // 0 9112027Sjungma@eit.uni-kl.de 9212027Sjungma@eit.uni-kl.de sc_sensitive& operator () ( const sc_event& ); 9312027Sjungma@eit.uni-kl.de sc_sensitive& operator () ( const sc_interface& ); 9412027Sjungma@eit.uni-kl.de sc_sensitive& operator () ( const sc_port_base& ); 9512027Sjungma@eit.uni-kl.de sc_sensitive& operator () ( sc_event_finder& ); 9612027Sjungma@eit.uni-kl.de 9712027Sjungma@eit.uni-kl.de sc_sensitive& operator << ( const sc_event& ); 9812027Sjungma@eit.uni-kl.de sc_sensitive& operator << ( const sc_interface& ); 9912027Sjungma@eit.uni-kl.de sc_sensitive& operator << ( const sc_port_base& ); 10012027Sjungma@eit.uni-kl.de sc_sensitive& operator << ( sc_event_finder& ); 10112027Sjungma@eit.uni-kl.de 10212027Sjungma@eit.uni-kl.de sc_sensitive& operator () ( sc_cthread_handle, sc_event_finder& ); 10312027Sjungma@eit.uni-kl.de sc_sensitive& operator () ( sc_cthread_handle, const in_if_b_type& ); 10412027Sjungma@eit.uni-kl.de sc_sensitive& operator () ( sc_cthread_handle, const in_if_l_type& ); 10512027Sjungma@eit.uni-kl.de sc_sensitive& operator () ( sc_cthread_handle, const in_port_b_type& ); 10612027Sjungma@eit.uni-kl.de sc_sensitive& operator () ( sc_cthread_handle, const in_port_l_type& ); 10712027Sjungma@eit.uni-kl.de sc_sensitive& operator () ( sc_cthread_handle, const inout_port_b_type& ); 10812027Sjungma@eit.uni-kl.de sc_sensitive& operator () ( sc_cthread_handle, const inout_port_l_type& ); 10912027Sjungma@eit.uni-kl.de 11012027Sjungma@eit.uni-kl.de static void make_static_sensitivity( sc_process_b*, const sc_event& ); 11112027Sjungma@eit.uni-kl.de static void make_static_sensitivity( sc_process_b*, const sc_interface& ); 11212027Sjungma@eit.uni-kl.de static void make_static_sensitivity( sc_process_b*, const sc_port_base&); 11312027Sjungma@eit.uni-kl.de static void make_static_sensitivity( sc_process_b*, sc_event_finder& ); 11412027Sjungma@eit.uni-kl.de 11512027Sjungma@eit.uni-kl.de void reset(); 11612027Sjungma@eit.uni-kl.de 11712027Sjungma@eit.uni-kl.deprivate: 11812027Sjungma@eit.uni-kl.de 11912027Sjungma@eit.uni-kl.de sc_module* m_module; 12012027Sjungma@eit.uni-kl.de enum { SC_NONE_, SC_METHOD_, SC_THREAD_ } m_mode; 12112027Sjungma@eit.uni-kl.de sc_process_b* m_handle; 12212027Sjungma@eit.uni-kl.de 12312027Sjungma@eit.uni-kl.deprivate: 12412027Sjungma@eit.uni-kl.de 12512027Sjungma@eit.uni-kl.de // disabled 12612027Sjungma@eit.uni-kl.de 12712027Sjungma@eit.uni-kl.de sc_sensitive(); 12812027Sjungma@eit.uni-kl.de sc_sensitive( const sc_sensitive& ); 12912027Sjungma@eit.uni-kl.de sc_sensitive& operator = ( const sc_sensitive& ); 13012027Sjungma@eit.uni-kl.de}; 13112027Sjungma@eit.uni-kl.de 13212027Sjungma@eit.uni-kl.de 13312027Sjungma@eit.uni-kl.de// ---------------------------------------------------------------------------- 13412027Sjungma@eit.uni-kl.de// CLASS : sc_sensitive_pos 13512027Sjungma@eit.uni-kl.de// 13612027Sjungma@eit.uni-kl.de// Static sensitivity class for positive edge events. 13712027Sjungma@eit.uni-kl.de// ---------------------------------------------------------------------------- 13812027Sjungma@eit.uni-kl.de 13912027Sjungma@eit.uni-kl.declass sc_sensitive_pos 14012027Sjungma@eit.uni-kl.de{ 14112027Sjungma@eit.uni-kl.de friend class sc_module; 14212027Sjungma@eit.uni-kl.de 14312027Sjungma@eit.uni-kl.depublic: 14412027Sjungma@eit.uni-kl.de 14512027Sjungma@eit.uni-kl.de // typedefs 14612027Sjungma@eit.uni-kl.de typedef sc_signal_in_if<bool> in_if_b_type; 14712027Sjungma@eit.uni-kl.de typedef sc_signal_in_if<sc_dt::sc_logic> in_if_l_type; 14812027Sjungma@eit.uni-kl.de typedef sc_in<bool> in_port_b_type; 14912027Sjungma@eit.uni-kl.de typedef sc_in<sc_dt::sc_logic> in_port_l_type; 15012027Sjungma@eit.uni-kl.de typedef sc_inout<bool> inout_port_b_type; 15112027Sjungma@eit.uni-kl.de typedef sc_inout<sc_dt::sc_logic> inout_port_l_type; 15212027Sjungma@eit.uni-kl.de 15312027Sjungma@eit.uni-kl.deprivate: 15412027Sjungma@eit.uni-kl.de 15512027Sjungma@eit.uni-kl.de // constructor 15612027Sjungma@eit.uni-kl.de explicit sc_sensitive_pos( sc_module* ); 15712027Sjungma@eit.uni-kl.de 15812027Sjungma@eit.uni-kl.de // destructor 15912027Sjungma@eit.uni-kl.de ~sc_sensitive_pos(); 16012027Sjungma@eit.uni-kl.de 16112027Sjungma@eit.uni-kl.depublic: 16212027Sjungma@eit.uni-kl.de 16312027Sjungma@eit.uni-kl.de // changing between process handles 16412027Sjungma@eit.uni-kl.de sc_sensitive_pos& operator << ( sc_process_handle ); 16512027Sjungma@eit.uni-kl.de sc_sensitive_pos& operator << ( sc_method_handle ); 16612027Sjungma@eit.uni-kl.de sc_sensitive_pos& operator << ( sc_thread_handle ); 16712027Sjungma@eit.uni-kl.de 16812027Sjungma@eit.uni-kl.de sc_sensitive_pos& operator () ( const in_if_b_type& ); 16912027Sjungma@eit.uni-kl.de sc_sensitive_pos& operator () ( const in_if_l_type& ); 17012027Sjungma@eit.uni-kl.de sc_sensitive_pos& operator () ( const in_port_b_type& ); 17112027Sjungma@eit.uni-kl.de sc_sensitive_pos& operator () ( const in_port_l_type& ); 17212027Sjungma@eit.uni-kl.de sc_sensitive_pos& operator () ( const inout_port_b_type& ); 17312027Sjungma@eit.uni-kl.de sc_sensitive_pos& operator () ( const inout_port_l_type& ); 17412027Sjungma@eit.uni-kl.de 17512027Sjungma@eit.uni-kl.de sc_sensitive_pos& operator << ( const in_if_b_type& ); 17612027Sjungma@eit.uni-kl.de sc_sensitive_pos& operator << ( const in_if_l_type& ); 17712027Sjungma@eit.uni-kl.de sc_sensitive_pos& operator << ( const in_port_b_type& ); 17812027Sjungma@eit.uni-kl.de sc_sensitive_pos& operator << ( const in_port_l_type& ); 17912027Sjungma@eit.uni-kl.de sc_sensitive_pos& operator << ( const inout_port_b_type& ); 18012027Sjungma@eit.uni-kl.de sc_sensitive_pos& operator << ( const inout_port_l_type& ); 18112027Sjungma@eit.uni-kl.de 18212027Sjungma@eit.uni-kl.de void reset(); 18312027Sjungma@eit.uni-kl.de 18412027Sjungma@eit.uni-kl.deprivate: 18512027Sjungma@eit.uni-kl.de 18612027Sjungma@eit.uni-kl.de sc_module* m_module; 18712027Sjungma@eit.uni-kl.de enum { SC_NONE_, SC_METHOD_, SC_THREAD_ } m_mode; 18812027Sjungma@eit.uni-kl.de sc_process_b* m_handle; 18912027Sjungma@eit.uni-kl.de 19012027Sjungma@eit.uni-kl.deprivate: 19112027Sjungma@eit.uni-kl.de 19212027Sjungma@eit.uni-kl.de // disabled 19312027Sjungma@eit.uni-kl.de sc_sensitive_pos(); 19412027Sjungma@eit.uni-kl.de sc_sensitive_pos( const sc_sensitive_pos& ); 19512027Sjungma@eit.uni-kl.de sc_sensitive_pos& operator = ( const sc_sensitive_pos& ); 19612027Sjungma@eit.uni-kl.de}; 19712027Sjungma@eit.uni-kl.de 19812027Sjungma@eit.uni-kl.de 19912027Sjungma@eit.uni-kl.de// ---------------------------------------------------------------------------- 20012027Sjungma@eit.uni-kl.de// CLASS : sc_sensitive_neg 20112027Sjungma@eit.uni-kl.de// 20212027Sjungma@eit.uni-kl.de// Static sensitivity class for negative edge events. 20312027Sjungma@eit.uni-kl.de// ---------------------------------------------------------------------------- 20412027Sjungma@eit.uni-kl.de 20512027Sjungma@eit.uni-kl.declass sc_sensitive_neg 20612027Sjungma@eit.uni-kl.de{ 20712027Sjungma@eit.uni-kl.de friend class sc_module; 20812027Sjungma@eit.uni-kl.de 20912027Sjungma@eit.uni-kl.depublic: 21012027Sjungma@eit.uni-kl.de 21112027Sjungma@eit.uni-kl.de // typedefs 21212027Sjungma@eit.uni-kl.de typedef sc_signal_in_if<bool> in_if_b_type; 21312027Sjungma@eit.uni-kl.de typedef sc_signal_in_if<sc_dt::sc_logic> in_if_l_type; 21412027Sjungma@eit.uni-kl.de typedef sc_in<bool> in_port_b_type; 21512027Sjungma@eit.uni-kl.de typedef sc_in<sc_dt::sc_logic> in_port_l_type; 21612027Sjungma@eit.uni-kl.de typedef sc_inout<bool> inout_port_b_type; 21712027Sjungma@eit.uni-kl.de typedef sc_inout<sc_dt::sc_logic> inout_port_l_type; 21812027Sjungma@eit.uni-kl.de 21912027Sjungma@eit.uni-kl.deprivate: 22012027Sjungma@eit.uni-kl.de 22112027Sjungma@eit.uni-kl.de // constructor 22212027Sjungma@eit.uni-kl.de explicit sc_sensitive_neg( sc_module* ); 22312027Sjungma@eit.uni-kl.de 22412027Sjungma@eit.uni-kl.de // destructor 22512027Sjungma@eit.uni-kl.de ~sc_sensitive_neg(); 22612027Sjungma@eit.uni-kl.de 22712027Sjungma@eit.uni-kl.depublic: 22812027Sjungma@eit.uni-kl.de 22912027Sjungma@eit.uni-kl.de // changing between process handles 23012027Sjungma@eit.uni-kl.de sc_sensitive_neg& operator << ( sc_process_handle ); 23112027Sjungma@eit.uni-kl.de sc_sensitive_neg& operator << ( sc_method_handle ); 23212027Sjungma@eit.uni-kl.de sc_sensitive_neg& operator << ( sc_thread_handle ); 23312027Sjungma@eit.uni-kl.de 23412027Sjungma@eit.uni-kl.de sc_sensitive_neg& operator () ( const in_if_b_type& ); 23512027Sjungma@eit.uni-kl.de sc_sensitive_neg& operator () ( const in_if_l_type& ); 23612027Sjungma@eit.uni-kl.de sc_sensitive_neg& operator () ( const in_port_b_type& ); 23712027Sjungma@eit.uni-kl.de sc_sensitive_neg& operator () ( const in_port_l_type& ); 23812027Sjungma@eit.uni-kl.de sc_sensitive_neg& operator () ( const inout_port_b_type& ); 23912027Sjungma@eit.uni-kl.de sc_sensitive_neg& operator () ( const inout_port_l_type& ); 24012027Sjungma@eit.uni-kl.de 24112027Sjungma@eit.uni-kl.de sc_sensitive_neg& operator << ( const in_if_b_type& ); 24212027Sjungma@eit.uni-kl.de sc_sensitive_neg& operator << ( const in_if_l_type& ); 24312027Sjungma@eit.uni-kl.de sc_sensitive_neg& operator << ( const in_port_b_type& ); 24412027Sjungma@eit.uni-kl.de sc_sensitive_neg& operator << ( const in_port_l_type& ); 24512027Sjungma@eit.uni-kl.de sc_sensitive_neg& operator << ( const inout_port_b_type& ); 24612027Sjungma@eit.uni-kl.de sc_sensitive_neg& operator << ( const inout_port_l_type& ); 24712027Sjungma@eit.uni-kl.de 24812027Sjungma@eit.uni-kl.de void reset(); 24912027Sjungma@eit.uni-kl.de 25012027Sjungma@eit.uni-kl.deprivate: 25112027Sjungma@eit.uni-kl.de 25212027Sjungma@eit.uni-kl.de sc_module* m_module; 25312027Sjungma@eit.uni-kl.de enum { SC_NONE_, SC_METHOD_, SC_THREAD_ } m_mode; 25412027Sjungma@eit.uni-kl.de sc_process_b* m_handle; 25512027Sjungma@eit.uni-kl.de 25612027Sjungma@eit.uni-kl.deprivate: 25712027Sjungma@eit.uni-kl.de 25812027Sjungma@eit.uni-kl.de // disabled 25912027Sjungma@eit.uni-kl.de sc_sensitive_neg(); 26012027Sjungma@eit.uni-kl.de sc_sensitive_neg( const sc_sensitive_neg& ); 26112027Sjungma@eit.uni-kl.de sc_sensitive_neg& operator = ( const sc_sensitive_neg& ); 26212027Sjungma@eit.uni-kl.de}; 26312027Sjungma@eit.uni-kl.de 26412027Sjungma@eit.uni-kl.de} // namespace sc_core 26512027Sjungma@eit.uni-kl.de 26612027Sjungma@eit.uni-kl.de#endif 26712027Sjungma@eit.uni-kl.de 26812027Sjungma@eit.uni-kl.de/***************************************************************************** 26912027Sjungma@eit.uni-kl.de 27012027Sjungma@eit.uni-kl.de MODIFICATION LOG - modifiers, enter your name, affiliation, date and 27112027Sjungma@eit.uni-kl.de changes you are making here. 27212027Sjungma@eit.uni-kl.de 27312027Sjungma@eit.uni-kl.de Name, Affiliation, Date: Bishnupriya Bhattacharya, Cadence Design Systems, 27412027Sjungma@eit.uni-kl.de 25 August, 2003 27512027Sjungma@eit.uni-kl.de Description of Modification: Add make_static_sensitivity() methods to enable 27612027Sjungma@eit.uni-kl.de dynamic method process creation with static 27712027Sjungma@eit.uni-kl.de sensitivity. 27812027Sjungma@eit.uni-kl.de 27912027Sjungma@eit.uni-kl.de *****************************************************************************/ 28012027Sjungma@eit.uni-kl.de 28112027Sjungma@eit.uni-kl.de// $Log: sc_sensitive.h,v $ 28212027Sjungma@eit.uni-kl.de// Revision 1.5 2011/08/26 20:46:10 acg 28312027Sjungma@eit.uni-kl.de// Andy Goodrich: moved the modification log to the end of the file to 28412027Sjungma@eit.uni-kl.de// eliminate source line number skew when check-ins are done. 28512027Sjungma@eit.uni-kl.de// 28612027Sjungma@eit.uni-kl.de// Revision 1.4 2011/02/18 20:27:14 acg 28712027Sjungma@eit.uni-kl.de// Andy Goodrich: Updated Copyrights. 28812027Sjungma@eit.uni-kl.de// 28912027Sjungma@eit.uni-kl.de// Revision 1.3 2011/02/13 21:47:38 acg 29012027Sjungma@eit.uni-kl.de// Andy Goodrich: update copyright notice. 29112027Sjungma@eit.uni-kl.de// 29212027Sjungma@eit.uni-kl.de// Revision 1.2 2008/05/22 17:06:26 acg 29312027Sjungma@eit.uni-kl.de// Andy Goodrich: updated copyright notice to include 2008. 29412027Sjungma@eit.uni-kl.de// 29512027Sjungma@eit.uni-kl.de// Revision 1.1.1.1 2006/12/15 20:20:05 acg 29612027Sjungma@eit.uni-kl.de// SystemC 2.3 29712027Sjungma@eit.uni-kl.de// 29812027Sjungma@eit.uni-kl.de// Revision 1.4 2006/04/11 23:13:21 acg 29912027Sjungma@eit.uni-kl.de// Andy Goodrich: Changes for reduced reset support that only includes 30012027Sjungma@eit.uni-kl.de// sc_cthread, but has preliminary hooks for expanding to method and thread 30112027Sjungma@eit.uni-kl.de// processes also. 30212027Sjungma@eit.uni-kl.de// 30312027Sjungma@eit.uni-kl.de// Revision 1.3 2006/01/13 18:44:30 acg 30412027Sjungma@eit.uni-kl.de// Added $Log to record CVS changes into the source. 30512027Sjungma@eit.uni-kl.de 30612027Sjungma@eit.uni-kl.de// Taf! 307