@@ -86,19 +86,19 @@ inline void sct_assert(bool expr, const char* msg) {}
86
86
struct sct_property_mod
87
87
{
88
88
explicit sct_property_mod () {}
89
- template <class T1 , class T2 >
90
- explicit sct_property_mod (bool lexpr, bool rexpr, sc_event_finder& event,
89
+ template <class T1 , class T2 , class RT >
90
+ explicit sct_property_mod (bool lexpr, RT rexpr, sc_event_finder& event,
91
91
const char * name, T1 lotime, T2 hitime,
92
92
unsigned stable) {}
93
- template <class T1 >
94
- explicit sct_property_mod (bool lexpr, bool rexpr, sc_event_finder& event,
93
+ template <class T1 , class RT >
94
+ explicit sct_property_mod (bool lexpr, RT rexpr, sc_event_finder& event,
95
95
const char * name, T1 time, unsigned stable) {}
96
- template <class T1 , class T2 >
97
- explicit sct_property_mod (bool lexpr, bool rexpr, sc_port_base& event,
96
+ template <class T1 , class T2 , class RT >
97
+ explicit sct_property_mod (bool lexpr, RT rexpr, sc_port_base& event,
98
98
const char * name, T1 lotime, T2 hitime,
99
99
unsigned stable) {}
100
- template <class T1 >
101
- explicit sct_property_mod (bool lexpr, bool rexpr, sc_port_base& event,
100
+ template <class T1 , class RT >
101
+ explicit sct_property_mod (bool lexpr, RT rexpr, sc_port_base& event,
102
102
const char * name, T1 time, unsigned stable) {}
103
103
};
104
104
@@ -111,17 +111,17 @@ struct sct_property_mod
111
111
112
112
#define SCT_ASSERT4_STABLE (LE, TIMES, RE, EVENT )\
113
113
sct_property_mod SCT_TWO (sctTmpVar,__LINE__){\
114
- static_cast <bool >(LE), static_cast < bool >(RE) , EVENT,\
114
+ static_cast <bool >(LE), RE , EVENT,\
115
115
" sctAssertLine" SCT_ONE (__LINE__), SCT_ARGS (TIMES), 1 };
116
116
117
117
#define SCT_ASSERT4_ROSE (LE, TIMES, RE, EVENT )\
118
118
sct_property_mod SCT_TWO (sctTmpVar,__LINE__){\
119
- static_cast <bool >(LE), static_cast < bool >(RE) , EVENT,\
119
+ static_cast <bool >(LE), RE , EVENT,\
120
120
" sctAssertLine" SCT_ONE (__LINE__), SCT_ARGS (TIMES), 2 };
121
121
122
122
#define SCT_ASSERT4_FELL (LE, TIMES, RE, EVENT )\
123
123
sct_property_mod SCT_TWO (sctTmpVar,__LINE__){\
124
- static_cast <bool >(LE), static_cast < bool >(RE) , EVENT,\
124
+ static_cast <bool >(LE), RE , EVENT,\
125
125
" sctAssertLine" SCT_ONE (__LINE__), SCT_ARGS (TIMES), 3 };
126
126
#else
127
127
// No parameter passed, LE/RE can use not-bound port/not-allocated pointers
@@ -140,7 +140,7 @@ struct sct_property_mod
140
140
141
141
#else
142
142
#define SCT_ASSERT4 (LE, TIMES, RE, EVENT )\
143
- sct_property * SCT_TWO (sctTmpVar,__LINE__) =\
143
+ sct_property_base * SCT_TWO (sctTmpVar,__LINE__) =\
144
144
sct_property_storage::getProperty(\
145
145
[&]()->bool{return ( LE );},\
146
146
[&]()->bool {return ( RE );},\
@@ -150,32 +150,32 @@ struct sct_property_mod
150
150
);
151
151
152
152
#define SCT_ASSERT4_STABLE (LE, TIMES, RE, EVENT )\
153
- sct_property * SCT_TWO (sctTmpVar,__LINE__) =\
153
+ sct_property_base * SCT_TWO (sctTmpVar,__LINE__) =\
154
154
sct_property_storage::getPropertyStable(\
155
155
[&]()->bool{return ( LE );},\
156
- [&]()->bool {return ( RE );},\
156
+ [&]()->decltype (RE) {return ( RE );},\
157
157
&EVENT,\
158
158
[&]()->sct_time{return (sct_time (SCT_ARGS (TIMES)));},\
159
159
std::string (__FILE__)+":"+std::to_string(__LINE__),\
160
160
stStable\
161
161
);
162
162
163
163
#define SCT_ASSERT4_ROSE (LE, TIMES, RE, EVENT )\
164
- sct_property * SCT_TWO (sctTmpVar,__LINE__) =\
164
+ sct_property_base * SCT_TWO (sctTmpVar,__LINE__) =\
165
165
sct_property_storage::getPropertyStable(\
166
166
[&]()->bool{return ( LE );},\
167
- [&]()->bool {return ( RE );},\
167
+ [&]()->decltype (RE) {return ( RE );},\
168
168
&EVENT,\
169
169
[&]()->sct_time{return (sct_time (SCT_ARGS (TIMES)));},\
170
170
std::string (__FILE__)+":"+std::to_string(__LINE__),\
171
171
stRose\
172
172
);
173
173
174
174
#define SCT_ASSERT4_FELL (LE, TIMES, RE, EVENT )\
175
- sct_property * SCT_TWO (sctTmpVar,__LINE__) =\
175
+ sct_property_base * SCT_TWO (sctTmpVar,__LINE__) =\
176
176
sct_property_storage::getPropertyStable(\
177
177
[&]()->bool{return ( LE );},\
178
- [&]()->bool {return ( RE );},\
178
+ [&]()->decltype (RE) {return ( RE );},\
179
179
&EVENT,\
180
180
[&]()->sct_time{return (sct_time (SCT_ARGS (TIMES)));},\
181
181
std::string (__FILE__)+":"+std::to_string(__LINE__),\
0 commit comments