SystemC 3.0.0
Accellera SystemC proof-of-concept library
sc_signal_resolved.h
Go to the documentation of this file.
1/*****************************************************************************
2
3 Licensed to Accellera Systems Initiative Inc. (Accellera) under one or
4 more contributor license agreements. See the NOTICE file distributed
5 with this work for additional information regarding copyright ownership.
6 Accellera licenses this file to you under the Apache License, Version 2.0
7 (the "License"); you may not use this file except in compliance with the
8 License. You may obtain a copy of the License at
9
10 http://www.apache.org/licenses/LICENSE-2.0
11
12 Unless required by applicable law or agreed to in writing, software
13 distributed under the License is distributed on an "AS IS" BASIS,
14 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
15 implied. See the License for the specific language governing
16 permissions and limitations under the License.
17
18 *****************************************************************************/
19
20/*****************************************************************************
21
22 sc_signal_resolved.h -- The resolved signal class.
23
24 Original Author: Martin Janssen, Synopsys, Inc., 2001-05-21
25
26 CHANGE LOG IS AT THE END OF THE FILE
27 *****************************************************************************/
28
29
30#ifndef SC_SIGNAL_RESOLVED_H
31#define SC_SIGNAL_RESOLVED_H
32
33
35
36#if defined(_MSC_VER) && !defined(SC_WIN_DLL_WARN)
37#pragma warning(push)
38#pragma warning(disable: 4251) // DLL import for std::vector
39#endif
40
41namespace sc_core {
42
43class sc_process_b;
44
46
47
48// ----------------------------------------------------------------------------
49// CLASS : sc_signal_resolved
50//
51// The resolved signal class.
52// ----------------------------------------------------------------------------
53
55: public sc_signal<sc_dt::sc_logic,SC_MANY_WRITERS>
56{
57public:
58
59 // typedefs
60
64
65public:
66
67 // constructors
68
70 : base_type( sc_gen_unique_name( "signal_resolved" ) )
71 , m_proc_vec(), m_val_vec()
72 {}
73
74 explicit sc_signal_resolved( const char* name_ )
75 : base_type( name_ )
76 , m_proc_vec(), m_val_vec()
77 {}
78
79 sc_signal_resolved( const char* name_, const value_type& initial_value_ )
80 : base_type( name_, initial_value_ )
81 , m_proc_vec() , m_val_vec()
82 {}
83
84 // interface methods
85
86 virtual void register_port( sc_port_base&, const char* )
87 {}
88
89
90 // write the new value
91 virtual void write( const value_type& );
92
93
94 // other methods
95 virtual const char* kind() const
96 { return "sc_signal_resolved"; }
97
98 // assignment
99 using base_type::operator=;
100 this_type& operator = ( const this_type& a )
101 { base_type::operator=(a); return *this; }
102
103protected:
104 virtual void update();
105
106protected:
107 std::vector<sc_process_b*> m_proc_vec; // processes writing this signal
108 std::vector<value_type> m_val_vec; // new values written this signal
109
110private:
111
112 // disabled
114};
115
116} // namespace sc_core
117
118#if defined(_MSC_VER) && !defined(SC_WIN_DLL_WARN)
119#pragma warning(pop)
120#endif
121
122//$Log: sc_signal_resolved.h,v $
123//Revision 1.6 2011/08/26 20:45:44 acg
124// Andy Goodrich: moved the modification log to the end of the file to
125// eliminate source line number skew when check-ins are done.
126//
127//Revision 1.5 2011/08/24 22:05:36 acg
128// Torsten Maehne: initialization changes to remove warnings.
129//
130//Revision 1.4 2011/04/19 02:36:26 acg
131// Philipp A. Hartmann: new aysnc_update and mutex support.
132//
133//Revision 1.3 2011/02/18 20:23:45 acg
134// Andy Goodrich: Copyright update.
135//
136//Revision 1.2 2011/01/20 16:52:15 acg
137// Andy Goodrich: changes for IEEE 1666 2011.
138//
139//Revision 1.1.1.1 2006/12/15 20:20:04 acg
140//SystemC 2.3
141//
142//Revision 1.2 2006/01/03 23:18:26 acg
143//Changed copyright to include 2006.
144//
145//Revision 1.1.1.1 2005/12/19 23:16:43 acg
146//First check in of SystemC 2.1 into its own archive.
147//
148//Revision 1.10 2005/09/15 23:01:52 acg
149//Added std:: prefix to appropriate methods and types to get around
150//issues with the Edison Front End.
151//
152//Revision 1.9 2005/06/10 22:43:55 acg
153//Added CVS change log annotation.
154//
155
156#endif
157
158// Taf!
#define SC_API
Definition: sc_cmnhdr.h:148
SC_API const char * sc_gen_unique_name(const char *, bool preserve_first)
SC_API const sc_dt::sc_logic_value_t sc_logic_resolution_tbl[4][4]
Definition: sc_signal_rv.h:45
sc_logic_value_t
Definition: sc_logic.h:87
sc_signal_resolved(const char *name_)
std::vector< value_type > m_val_vec
virtual void write(const value_type &)
virtual const char * kind() const
std::vector< sc_process_b * > m_proc_vec
virtual void register_port(sc_port_base &, const char *)
sc_signal< sc_dt::sc_logic, SC_MANY_WRITERS > base_type
sc_signal_resolved(const char *name_, const value_type &initial_value_)