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_spawn_options.h -- Process spawning options specification.
2312027Sjungma@eit.uni-kl.de
2412027Sjungma@eit.uni-kl.de  Original Authors: Andy Goodrich, Forte Design Systems, 17 June 2003
2512027Sjungma@eit.uni-kl.de                    Stuart Swan, Cadence,
2612027Sjungma@eit.uni-kl.de                    Bishnupriya Bhattacharya, Cadence Design Systems,
2712027Sjungma@eit.uni-kl.de                    25 August, 2003
2812027Sjungma@eit.uni-kl.de
2912027Sjungma@eit.uni-kl.de  CHANGE LOG AT THE END OF THE FILE
3012027Sjungma@eit.uni-kl.de *****************************************************************************/
3112027Sjungma@eit.uni-kl.de
3212027Sjungma@eit.uni-kl.de#if !defined(sc_spawn_options_h_INCLUDED)
3312027Sjungma@eit.uni-kl.de#define sc_spawn_options_h_INCLUDED
3412027Sjungma@eit.uni-kl.de
3512027Sjungma@eit.uni-kl.de#include <vector>
3612027Sjungma@eit.uni-kl.de#include "sysc/communication/sc_export.h"
3712027Sjungma@eit.uni-kl.de#include "sysc/communication/sc_signal_ports.h"
3812027Sjungma@eit.uni-kl.de
3912027Sjungma@eit.uni-kl.denamespace sc_core {
4012027Sjungma@eit.uni-kl.de
4112027Sjungma@eit.uni-kl.declass sc_event;
4212027Sjungma@eit.uni-kl.declass sc_port_base;
4312027Sjungma@eit.uni-kl.declass sc_interface;
4412027Sjungma@eit.uni-kl.declass sc_event_finder;
4512027Sjungma@eit.uni-kl.declass sc_process_b;
4612027Sjungma@eit.uni-kl.declass sc_spawn_reset_base;
4712027Sjungma@eit.uni-kl.de
4812027Sjungma@eit.uni-kl.de//=============================================================================
4912027Sjungma@eit.uni-kl.de// CLASS sc_spawn_options
5012027Sjungma@eit.uni-kl.de//
5112027Sjungma@eit.uni-kl.de//=============================================================================
5212027Sjungma@eit.uni-kl.declass sc_spawn_options {
5312027Sjungma@eit.uni-kl.de    friend class sc_cthread_process;
5412027Sjungma@eit.uni-kl.de    friend class sc_method_process;
5512027Sjungma@eit.uni-kl.de    friend class sc_process_b;
5612027Sjungma@eit.uni-kl.de    friend class sc_thread_process;
5712027Sjungma@eit.uni-kl.de  public:
5812027Sjungma@eit.uni-kl.de    sc_spawn_options() :
5912027Sjungma@eit.uni-kl.de        m_dont_initialize(false), m_resets(), m_sensitive_events(),
6012027Sjungma@eit.uni-kl.de        m_sensitive_event_finders(), m_sensitive_interfaces(),
6112027Sjungma@eit.uni-kl.de        m_sensitive_port_bases(), m_spawn_method(false), m_stack_size(0)
6212027Sjungma@eit.uni-kl.de        { }
6312027Sjungma@eit.uni-kl.de
6412027Sjungma@eit.uni-kl.de    ~sc_spawn_options();
6512027Sjungma@eit.uni-kl.de
6612027Sjungma@eit.uni-kl.de    void async_reset_signal_is( const sc_in<bool>&,           bool level );
6712027Sjungma@eit.uni-kl.de    void async_reset_signal_is( const sc_inout<bool>&,        bool level );
6812027Sjungma@eit.uni-kl.de    void async_reset_signal_is( const sc_out<bool>&,          bool level );
6912027Sjungma@eit.uni-kl.de    void async_reset_signal_is( const sc_signal_in_if<bool>&, bool level );
7012027Sjungma@eit.uni-kl.de
7112027Sjungma@eit.uni-kl.de    void reset_signal_is( const sc_in<bool>&,           bool level );
7212027Sjungma@eit.uni-kl.de    void reset_signal_is( const sc_inout<bool>&,        bool level );
7312027Sjungma@eit.uni-kl.de    void reset_signal_is( const sc_out<bool>&,          bool level );
7412027Sjungma@eit.uni-kl.de    void reset_signal_is( const sc_signal_in_if<bool>&, bool level );
7512027Sjungma@eit.uni-kl.de
7612027Sjungma@eit.uni-kl.de    void dont_initialize()   { m_dont_initialize = true; }
7712027Sjungma@eit.uni-kl.de
7812027Sjungma@eit.uni-kl.de    bool is_method() const   { return m_spawn_method; }
7912027Sjungma@eit.uni-kl.de
8012027Sjungma@eit.uni-kl.de    void set_stack_size(int stack_size) { m_stack_size = stack_size; }
8112027Sjungma@eit.uni-kl.de
8212027Sjungma@eit.uni-kl.de    void set_sensitivity(const sc_event* event)
8312027Sjungma@eit.uni-kl.de        { m_sensitive_events.push_back(event); }
8412027Sjungma@eit.uni-kl.de
8512027Sjungma@eit.uni-kl.de    void set_sensitivity(sc_port_base* port_base)
8612027Sjungma@eit.uni-kl.de        { m_sensitive_port_bases.push_back(port_base); }
8712027Sjungma@eit.uni-kl.de
8812027Sjungma@eit.uni-kl.de    void set_sensitivity(sc_interface* interface_p)
8912027Sjungma@eit.uni-kl.de        { m_sensitive_interfaces.push_back(interface_p); }
9012027Sjungma@eit.uni-kl.de
9112027Sjungma@eit.uni-kl.de    void set_sensitivity(sc_export_base* export_base)
9212027Sjungma@eit.uni-kl.de        { m_sensitive_interfaces.push_back(export_base->get_interface()); }
9312027Sjungma@eit.uni-kl.de
9412027Sjungma@eit.uni-kl.de    void set_sensitivity(sc_event_finder* event_finder)
9512027Sjungma@eit.uni-kl.de        { m_sensitive_event_finders.push_back(event_finder); }
9612027Sjungma@eit.uni-kl.de
9712027Sjungma@eit.uni-kl.de    void spawn_method()                 { m_spawn_method = true; }
9812027Sjungma@eit.uni-kl.de
9912027Sjungma@eit.uni-kl.de  protected:
10012027Sjungma@eit.uni-kl.de    void specify_resets() const;
10112027Sjungma@eit.uni-kl.de
10212027Sjungma@eit.uni-kl.de  private:
10312027Sjungma@eit.uni-kl.de    sc_spawn_options( const sc_spawn_options& );
10412027Sjungma@eit.uni-kl.de    const sc_spawn_options& operator = ( const sc_spawn_options& );
10512027Sjungma@eit.uni-kl.de
10612027Sjungma@eit.uni-kl.de  protected:
10712027Sjungma@eit.uni-kl.de    bool                               m_dont_initialize;
10812027Sjungma@eit.uni-kl.de    std::vector<sc_spawn_reset_base*>  m_resets;
10912027Sjungma@eit.uni-kl.de    std::vector<const sc_event*>       m_sensitive_events;
11012027Sjungma@eit.uni-kl.de    std::vector<sc_event_finder*>      m_sensitive_event_finders;
11112027Sjungma@eit.uni-kl.de    std::vector<sc_interface*>         m_sensitive_interfaces;
11212027Sjungma@eit.uni-kl.de    std::vector<sc_port_base*>         m_sensitive_port_bases;
11312027Sjungma@eit.uni-kl.de    bool                               m_spawn_method; // Method not thread.
11412027Sjungma@eit.uni-kl.de    int                                m_stack_size;   // Thread stack size.
11512027Sjungma@eit.uni-kl.de};
11612027Sjungma@eit.uni-kl.de
11712027Sjungma@eit.uni-kl.de} // namespace sc_core
11812027Sjungma@eit.uni-kl.de
11912027Sjungma@eit.uni-kl.de// $Log: sc_spawn_options.h,v $
12012027Sjungma@eit.uni-kl.de// Revision 1.11  2011/08/26 20:46:11  acg
12112027Sjungma@eit.uni-kl.de//  Andy Goodrich: moved the modification log to the end of the file to
12212027Sjungma@eit.uni-kl.de//  eliminate source line number skew when check-ins are done.
12312027Sjungma@eit.uni-kl.de//
12412027Sjungma@eit.uni-kl.de// Revision 1.10  2011/08/24 22:05:51  acg
12512027Sjungma@eit.uni-kl.de//  Torsten Maehne: initialization changes to remove warnings.
12612027Sjungma@eit.uni-kl.de//
12712027Sjungma@eit.uni-kl.de// Revision 1.9  2011/02/18 20:27:14  acg
12812027Sjungma@eit.uni-kl.de//  Andy Goodrich: Updated Copyrights.
12912027Sjungma@eit.uni-kl.de//
13012027Sjungma@eit.uni-kl.de// Revision 1.8  2011/02/13 21:47:38  acg
13112027Sjungma@eit.uni-kl.de//  Andy Goodrich: update copyright notice.
13212027Sjungma@eit.uni-kl.de//
13312027Sjungma@eit.uni-kl.de// Revision 1.7  2011/02/07 19:17:20  acg
13412027Sjungma@eit.uni-kl.de//  Andy Goodrich: changes for IEEE 1666 compatibility.
13512027Sjungma@eit.uni-kl.de//
13612027Sjungma@eit.uni-kl.de// Revision 1.6  2010/12/07 20:09:15  acg
13712027Sjungma@eit.uni-kl.de// Andy Goodrich: replaced sc_signal signatures with sc_signal_in_if signatures for reset methods.
13812027Sjungma@eit.uni-kl.de//
13912027Sjungma@eit.uni-kl.de// Revision 1.5  2010/11/20 17:10:57  acg
14012027Sjungma@eit.uni-kl.de//  Andy Goodrich: reset processing changes for new IEEE 1666 standard.
14112027Sjungma@eit.uni-kl.de//
14212027Sjungma@eit.uni-kl.de// Revision 1.4  2009/05/22 16:06:29  acg
14312027Sjungma@eit.uni-kl.de//  Andy Goodrich: process control updates.
14412027Sjungma@eit.uni-kl.de//
14512027Sjungma@eit.uni-kl.de// Revision 1.3  2009/02/28 00:26:58  acg
14612027Sjungma@eit.uni-kl.de//  Andy Goodrich: changed boost name space to sc_boost to allow use with
14712027Sjungma@eit.uni-kl.de//  full boost library applications.
14812027Sjungma@eit.uni-kl.de//
14912027Sjungma@eit.uni-kl.de// Revision 1.2  2008/05/22 17:06:26  acg
15012027Sjungma@eit.uni-kl.de//  Andy Goodrich: updated copyright notice to include 2008.
15112027Sjungma@eit.uni-kl.de//
15212027Sjungma@eit.uni-kl.de// Revision 1.1.1.1  2006/12/15 20:20:05  acg
15312027Sjungma@eit.uni-kl.de// SystemC 2.3
15412027Sjungma@eit.uni-kl.de//
15512027Sjungma@eit.uni-kl.de// Revision 1.4  2006/04/20 17:08:17  acg
15612027Sjungma@eit.uni-kl.de//  Andy Goodrich: 3.0 style process changes.
15712027Sjungma@eit.uni-kl.de//
15812027Sjungma@eit.uni-kl.de// Revision 1.3  2006/01/13 18:44:30  acg
15912027Sjungma@eit.uni-kl.de// Added $Log to record CVS changes into the source.
16012027Sjungma@eit.uni-kl.de
16112027Sjungma@eit.uni-kl.de#endif // !defined(sc_spawn_options_h_INCLUDED)
162