[1] | 1 | /*------------------------------------------------------------\ |
---|
| 2 | | | |
---|
| 3 | | Tool : systemcass | |
---|
| 4 | | | |
---|
| 5 | | File : sc_module.cc | |
---|
| 6 | | | |
---|
| 7 | | Author : Buchmann Richard | |
---|
| 8 | | Taktak Sami | |
---|
| 9 | | | |
---|
| 10 | | Date : 09_07_2004 | |
---|
| 11 | | | |
---|
| 12 | \------------------------------------------------------------*/ |
---|
| 13 | |
---|
| 14 | /* |
---|
| 15 | * This file is part of the Disydent Project |
---|
| 16 | * Copyright (C) Laboratoire LIP6 - Département ASIM |
---|
| 17 | * Universite Pierre et Marie Curie |
---|
| 18 | * |
---|
| 19 | * Home page : http://www-asim.lip6.fr/disydent |
---|
| 20 | * E-mail : mailto:richard.buchmann@lip6.fr |
---|
| 21 | * |
---|
| 22 | * This library is free software; you can redistribute it and/or modify it |
---|
| 23 | * under the terms of the GNU Library General Public License as published |
---|
| 24 | * by the Free Software Foundation; either version 2 of the License, or (at |
---|
| 25 | * your option) any later version. |
---|
| 26 | * |
---|
| 27 | * Disydent is distributed in the hope that it will be |
---|
| 28 | * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
| 29 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General |
---|
| 30 | * Public License for more details. |
---|
| 31 | * |
---|
| 32 | * You should have received a copy of the GNU General Public License along |
---|
| 33 | * with the GNU C Library; see the file COPYING. If not, write to the Free |
---|
| 34 | * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. |
---|
| 35 | */ |
---|
| 36 | |
---|
[12] | 37 | #include <stdarg.h> |
---|
| 38 | #include <vector> |
---|
| 39 | #include <set> |
---|
[1] | 40 | |
---|
| 41 | #include "sc_module.h" |
---|
| 42 | #include "sc_module_name.h" |
---|
| 43 | #include "sc_sensitive.h" |
---|
| 44 | #include "module_hierarchy.h" |
---|
| 45 | #include "serialization.h" // set_save_handler |
---|
| 46 | #include "sc_port.h" |
---|
| 47 | #include "sc_signal.h" |
---|
| 48 | #include "sc_clock.h" // is_clock |
---|
| 49 | #include "entity.h" |
---|
[27] | 50 | #include <cassert> |
---|
[52] | 51 | |
---|
[27] | 52 | #ifdef HAVE_CONFIG_H |
---|
| 53 | #include "config.h" |
---|
| 54 | #endif |
---|
[1] | 55 | |
---|
| 56 | // |
---|
| 57 | using namespace std; |
---|
| 58 | |
---|
| 59 | // ---------------------------------------------------------------------------- |
---|
| 60 | // |
---|
| 61 | // |
---|
| 62 | // ---------------------------------------------------------------------------- |
---|
| 63 | |
---|
| 64 | namespace sc_core { |
---|
[52] | 65 | |
---|
[1] | 66 | instances_set_t instances_set; |
---|
| 67 | instances_list_t temp_list; |
---|
| 68 | method_process_list_t method_process_list; |
---|
| 69 | module_name_stack_t module_name_stack; |
---|
| 70 | modules_stack_t modules_stack; |
---|
[52] | 71 | method_process_t * method; |
---|
[1] | 72 | |
---|
[52] | 73 | void declare_method_process(const char * name, SC_ENTRY_FUNC func, sc_module & module) { |
---|
| 74 | method = create_method_process(name, func, module); |
---|
[1] | 75 | method_process_list.push_back(method); |
---|
| 76 | } |
---|
| 77 | |
---|
| 78 | |
---|
[52] | 79 | ostream & operator << (ostream &o, instances_set_t &l) { |
---|
[1] | 80 | instances_set_t::iterator i; |
---|
[52] | 81 | for (i = l.begin(); i != l.end(); ++i) { |
---|
| 82 | o << (*i)->name() << " "; |
---|
| 83 | } |
---|
[1] | 84 | return o << endl; |
---|
| 85 | } |
---|
| 86 | |
---|
[52] | 87 | |
---|
[1] | 88 | template <typename T> |
---|
[52] | 89 | static std::ostream& operator << (std::ostream & o, const list<T> &l) { |
---|
[1] | 90 | typename list<T>::const_iterator i; |
---|
[52] | 91 | for (i = l.begin(); i != l.end(); ++i) { |
---|
[1] | 92 | o << (*i) << " "; |
---|
[52] | 93 | } |
---|
[1] | 94 | return o << endl; |
---|
| 95 | } |
---|
| 96 | |
---|
[52] | 97 | |
---|
[1] | 98 | template <typename T> |
---|
[52] | 99 | static std::ostream& operator << (std::ostream &o, const list<T *> &l) { |
---|
| 100 | typename list<T *>::const_iterator i; |
---|
| 101 | for (i = l.begin(); i != l.end(); ++i) { |
---|
[1] | 102 | o << (**i) << " "; |
---|
[52] | 103 | } |
---|
[1] | 104 | return o << endl; |
---|
| 105 | } |
---|
| 106 | |
---|
[52] | 107 | |
---|
| 108 | bool is_clock (const sc_interface & inter) { |
---|
| 109 | equi_t & e = get_equi(inter); |
---|
| 110 | equi_t::iterator i; |
---|
| 111 | for (i = e.begin(); i != e.end(); ++i) { |
---|
| 112 | if (i->kind() == sc_clock::kind_string) { |
---|
| 113 | return true; |
---|
| 114 | } |
---|
| 115 | } |
---|
| 116 | return false; |
---|
[1] | 117 | } |
---|
| 118 | |
---|
| 119 | |
---|
| 120 | // ---------------------------------------------------------------------------- |
---|
| 121 | // CLASS : method_process_t |
---|
| 122 | // |
---|
| 123 | // ---------------------------------------------------------------------------- |
---|
[52] | 124 | method_process_t::method_process_t(const char * nm, SC_ENTRY_FUNC fn, sc_module & mod) { |
---|
[1] | 125 | name = nm; |
---|
[35] | 126 | func = fn; |
---|
[1] | 127 | module = &mod; |
---|
| 128 | dont_initialize = false; |
---|
| 129 | } |
---|
| 130 | |
---|
[52] | 131 | |
---|
| 132 | static bool is_register (const sc_interface & inter) { |
---|
| 133 | equi_t & e = get_equi(inter); |
---|
| 134 | if (e.size() != 1) { |
---|
| 135 | return false; |
---|
| 136 | } |
---|
| 137 | |
---|
| 138 | sc_object & obj = *(e.begin()->object); |
---|
| 139 | if (obj.kind() != sc_signal_base::kind_string) { |
---|
| 140 | return false; |
---|
| 141 | } |
---|
| 142 | return true; |
---|
[1] | 143 | } |
---|
| 144 | |
---|
[52] | 145 | |
---|
| 146 | bool method_process_t::is_combinational(void) { |
---|
| 147 | if (sensitivity_list.empty()) { |
---|
| 148 | return false; |
---|
| 149 | } |
---|
| 150 | sensitivity_list_t::iterator i; |
---|
| 151 | for (i = sensitivity_list.begin(); i != sensitivity_list.end(); ++i) { |
---|
[27] | 152 | #if defined(CONFIG_DEBUG) && 0 |
---|
[52] | 153 | if (i->get_interface() == NULL) { |
---|
| 154 | cerr << "'" << i << "' is unbound.\n"; |
---|
| 155 | exit(121); |
---|
| 156 | } |
---|
| 157 | #endif |
---|
| 158 | if ((i->get_flag() == sc_event::VAL) && (!is_register(i->get_interface()))) { |
---|
| 159 | return true; |
---|
| 160 | } |
---|
[1] | 161 | } |
---|
[52] | 162 | return false; |
---|
[1] | 163 | } |
---|
| 164 | |
---|
[52] | 165 | |
---|
| 166 | bool method_process_t::is_transition(void) { |
---|
| 167 | if (sensitivity_list.empty()) { |
---|
| 168 | return false; |
---|
| 169 | } |
---|
| 170 | sensitivity_list_t::iterator i; |
---|
| 171 | for (i = sensitivity_list.begin(); i != sensitivity_list.end(); ++i) { |
---|
| 172 | if (i->get_flag() != sc_event::POS) { |
---|
| 173 | return false; |
---|
| 174 | } |
---|
| 175 | // check if the port is a clock |
---|
| 176 | if (is_clock(i->get_interface()) == false) { |
---|
| 177 | return false; |
---|
| 178 | } |
---|
| 179 | } |
---|
| 180 | return true; |
---|
[1] | 181 | } |
---|
| 182 | |
---|
[52] | 183 | |
---|
| 184 | bool method_process_t::is_genmoore(void) { |
---|
| 185 | // sensitivity list of moore functions includes : |
---|
| 186 | // - register (signal unconnected) |
---|
| 187 | // - negative edge of port which is bound to a clock signal |
---|
| 188 | if (sensitivity_list.empty()) { |
---|
| 189 | return false; |
---|
| 190 | } |
---|
| 191 | sensitivity_list_t::iterator i; |
---|
| 192 | for (i = sensitivity_list.begin(); i != sensitivity_list.end(); ++i) { |
---|
| 193 | if ((i->get_flag() == sc_event::VAL) && (is_register(i->get_interface()))) { |
---|
| 194 | continue; |
---|
| 195 | } |
---|
| 196 | if ((i->get_flag() == sc_event::NEG) && (is_clock(i->get_interface()) == true)) { |
---|
| 197 | continue; |
---|
| 198 | } |
---|
| 199 | return false; |
---|
| 200 | } |
---|
| 201 | return true; |
---|
[1] | 202 | } |
---|
| 203 | |
---|
[52] | 204 | |
---|
| 205 | std::ostream & operator << (std::ostream & o, const method_process_t & m) { |
---|
| 206 | return o << *(m.module) |
---|
| 207 | << "->" |
---|
| 208 | << m.name |
---|
| 209 | << "() when " |
---|
| 210 | << m.sensitivity_list; |
---|
[1] | 211 | } |
---|
| 212 | |
---|
[52] | 213 | |
---|
[1] | 214 | // ---------------------------------------------------------------------------- |
---|
| 215 | // CLASS : sc_module |
---|
| 216 | // |
---|
| 217 | // ---------------------------------------------------------------------------- |
---|
| 218 | |
---|
| 219 | |
---|
[52] | 220 | sc_module::sc_module(void) : |
---|
| 221 | sc_object(NULL), |
---|
| 222 | sensitive(this) { |
---|
| 223 | init(); |
---|
[1] | 224 | } |
---|
| 225 | |
---|
[52] | 226 | sc_module::sc_module(const char * nm) : |
---|
| 227 | sc_object(NULL), |
---|
| 228 | sensitive(this) { |
---|
[27] | 229 | assert(nm != NULL); |
---|
[52] | 230 | init(); |
---|
[1] | 231 | } |
---|
| 232 | |
---|
| 233 | |
---|
[52] | 234 | sc_module::sc_module(const sc_module_name & nm) : |
---|
| 235 | sc_object(NULL), |
---|
| 236 | sensitive(this) { |
---|
| 237 | init(); |
---|
[1] | 238 | } |
---|
| 239 | |
---|
[52] | 240 | |
---|
| 241 | void sc_module::init() { |
---|
| 242 | instances_set.insert(this); |
---|
| 243 | temp_list.push_back(this); |
---|
| 244 | modules_stack.top() = this; |
---|
| 245 | set_save_handler(*this, NULL); |
---|
[1] | 246 | } |
---|
| 247 | |
---|
[52] | 248 | void sc_module::dont_initialize() { |
---|
| 249 | sc_core::valid_method_process(); |
---|
[1] | 250 | } |
---|
| 251 | |
---|
| 252 | |
---|
[52] | 253 | void declare_save_handler(const char * name, save_fct_t1 func, sc_module & module) { |
---|
| 254 | sc_core::set_save_handler(module, func); |
---|
[1] | 255 | } |
---|
| 256 | |
---|
| 257 | typedef std::list<sc_port_base*> port_list_t; |
---|
| 258 | |
---|
| 259 | // Build a port list owned by the module mod |
---|
[52] | 260 | static void get_port_list(const sc_module & mod, port_list_t & pl) { |
---|
| 261 | port2module_t::iterator i; |
---|
| 262 | for (i = port2module.begin(); i != port2module.end(); ++i) { |
---|
| 263 | if (i->second == &mod) { |
---|
| 264 | pl.push_back((sc_port_base *) (i->first)); |
---|
| 265 | } |
---|
| 266 | } |
---|
[1] | 267 | } |
---|
| 268 | |
---|
| 269 | |
---|
| 270 | #define BIND(sig) bind(*this, p, port_list, sig) |
---|
| 271 | |
---|
[52] | 272 | static void bind(sc_module & mod, |
---|
| 273 | port_list_t::iterator & port_it, |
---|
| 274 | port_list_t & port_list, |
---|
| 275 | sc_bind_proxy & sig) { |
---|
| 276 | if (&sig == &SC_BIND_PROXY_NIL) { |
---|
| 277 | return; |
---|
| 278 | } |
---|
| 279 | if (port_it == port_list.end()) { |
---|
| 280 | cerr << "error : binding port in "; |
---|
| 281 | cerr << mod.name(); |
---|
| 282 | cerr << " module.\n"; |
---|
| 283 | exit(7); |
---|
| 284 | } |
---|
| 285 | bind(**(port_it++), sig); |
---|
[1] | 286 | } |
---|
| 287 | |
---|
[52] | 288 | |
---|
| 289 | void sc_module::operator () ( /* const */ sc_bind_proxy & p001, |
---|
| 290 | /* const */ sc_bind_proxy & p002, |
---|
| 291 | /* const */ sc_bind_proxy & p003, |
---|
| 292 | /* const */ sc_bind_proxy & p004, |
---|
| 293 | /* const */ sc_bind_proxy & p005, |
---|
| 294 | /* const */ sc_bind_proxy & p006, |
---|
| 295 | /* const */ sc_bind_proxy & p007, |
---|
| 296 | /* const */ sc_bind_proxy & p008, |
---|
| 297 | /* const */ sc_bind_proxy & p009, |
---|
| 298 | /* const */ sc_bind_proxy & p010, |
---|
| 299 | /* const */ sc_bind_proxy & p011, |
---|
| 300 | /* const */ sc_bind_proxy & p012, |
---|
| 301 | /* const */ sc_bind_proxy & p013, |
---|
| 302 | /* const */ sc_bind_proxy & p014, |
---|
| 303 | /* const */ sc_bind_proxy & p015, |
---|
| 304 | /* const */ sc_bind_proxy & p016, |
---|
| 305 | /* const */ sc_bind_proxy & p017, |
---|
| 306 | /* const */ sc_bind_proxy & p018, |
---|
| 307 | /* const */ sc_bind_proxy & p019, |
---|
| 308 | /* const */ sc_bind_proxy & p020, |
---|
| 309 | /* const */ sc_bind_proxy & p021, |
---|
| 310 | /* const */ sc_bind_proxy & p022, |
---|
| 311 | /* const */ sc_bind_proxy & p023, |
---|
| 312 | /* const */ sc_bind_proxy & p024, |
---|
| 313 | /* const */ sc_bind_proxy & p025, |
---|
| 314 | /* const */ sc_bind_proxy & p026, |
---|
| 315 | /* const */ sc_bind_proxy & p027, |
---|
| 316 | /* const */ sc_bind_proxy & p028, |
---|
| 317 | /* const */ sc_bind_proxy & p029, |
---|
| 318 | /* const */ sc_bind_proxy & p030, |
---|
| 319 | /* const */ sc_bind_proxy & p031, |
---|
| 320 | /* const */ sc_bind_proxy & p032, |
---|
| 321 | /* const */ sc_bind_proxy & p033, |
---|
| 322 | /* const */ sc_bind_proxy & p034, |
---|
| 323 | /* const */ sc_bind_proxy & p035, |
---|
| 324 | /* const */ sc_bind_proxy & p036, |
---|
| 325 | /* const */ sc_bind_proxy & p037, |
---|
| 326 | /* const */ sc_bind_proxy & p038, |
---|
| 327 | /* const */ sc_bind_proxy & p039, |
---|
| 328 | /* const */ sc_bind_proxy & p040, |
---|
| 329 | /* const */ sc_bind_proxy & p041, |
---|
| 330 | /* const */ sc_bind_proxy & p042, |
---|
| 331 | /* const */ sc_bind_proxy & p043, |
---|
| 332 | /* const */ sc_bind_proxy & p044, |
---|
| 333 | /* const */ sc_bind_proxy & p045, |
---|
| 334 | /* const */ sc_bind_proxy & p046, |
---|
| 335 | /* const */ sc_bind_proxy & p047, |
---|
| 336 | /* const */ sc_bind_proxy & p048, |
---|
| 337 | /* const */ sc_bind_proxy & p049, |
---|
| 338 | /* const */ sc_bind_proxy & p050, |
---|
| 339 | /* const */ sc_bind_proxy & p051, |
---|
| 340 | /* const */ sc_bind_proxy & p052, |
---|
| 341 | /* const */ sc_bind_proxy & p053, |
---|
| 342 | /* const */ sc_bind_proxy & p054, |
---|
| 343 | /* const */ sc_bind_proxy & p055, |
---|
| 344 | /* const */ sc_bind_proxy & p056, |
---|
| 345 | /* const */ sc_bind_proxy & p057, |
---|
| 346 | /* const */ sc_bind_proxy & p058, |
---|
| 347 | /* const */ sc_bind_proxy & p059, |
---|
| 348 | /* const */ sc_bind_proxy & p060, |
---|
| 349 | /* const */ sc_bind_proxy & p061, |
---|
| 350 | /* const */ sc_bind_proxy & p062, |
---|
| 351 | /* const */ sc_bind_proxy & p063, |
---|
| 352 | /* const */ sc_bind_proxy & p064) |
---|
[1] | 353 | { |
---|
[52] | 354 | port_list_t port_list; |
---|
| 355 | get_port_list(*this, port_list); |
---|
| 356 | cerr << "port list : " << port_list << endl; |
---|
| 357 | port_list_t::iterator p = port_list.begin(); |
---|
| 358 | BIND(p001); |
---|
| 359 | BIND(p002); |
---|
| 360 | BIND(p003); |
---|
| 361 | BIND(p004); |
---|
| 362 | BIND(p005); |
---|
| 363 | BIND(p006); |
---|
| 364 | BIND(p007); |
---|
| 365 | BIND(p008); |
---|
| 366 | BIND(p009); |
---|
| 367 | BIND(p010); |
---|
| 368 | BIND(p011); |
---|
| 369 | BIND(p012); |
---|
| 370 | BIND(p013); |
---|
| 371 | BIND(p014); |
---|
| 372 | BIND(p015); |
---|
| 373 | BIND(p016); |
---|
| 374 | BIND(p017); |
---|
| 375 | BIND(p018); |
---|
| 376 | BIND(p019); |
---|
| 377 | BIND(p020); |
---|
| 378 | BIND(p021); |
---|
| 379 | BIND(p022); |
---|
| 380 | BIND(p023); |
---|
| 381 | BIND(p024); |
---|
| 382 | BIND(p025); |
---|
| 383 | BIND(p026); |
---|
| 384 | BIND(p027); |
---|
| 385 | BIND(p028); |
---|
| 386 | BIND(p029); |
---|
| 387 | BIND(p030); |
---|
| 388 | BIND(p031); |
---|
| 389 | BIND(p032); |
---|
| 390 | BIND(p033); |
---|
| 391 | BIND(p034); |
---|
| 392 | BIND(p035); |
---|
| 393 | BIND(p036); |
---|
| 394 | BIND(p037); |
---|
| 395 | BIND(p038); |
---|
| 396 | BIND(p039); |
---|
| 397 | BIND(p040); |
---|
| 398 | BIND(p041); |
---|
| 399 | BIND(p042); |
---|
| 400 | BIND(p043); |
---|
| 401 | BIND(p044); |
---|
| 402 | BIND(p045); |
---|
| 403 | BIND(p046); |
---|
| 404 | BIND(p047); |
---|
| 405 | BIND(p048); |
---|
| 406 | BIND(p049); |
---|
| 407 | BIND(p050); |
---|
| 408 | BIND(p051); |
---|
| 409 | BIND(p052); |
---|
| 410 | BIND(p053); |
---|
| 411 | BIND(p054); |
---|
| 412 | BIND(p055); |
---|
| 413 | BIND(p056); |
---|
| 414 | BIND(p057); |
---|
| 415 | BIND(p058); |
---|
| 416 | BIND(p059); |
---|
| 417 | BIND(p060); |
---|
| 418 | BIND(p061); |
---|
| 419 | BIND(p062); |
---|
| 420 | BIND(p063); |
---|
| 421 | BIND(p064); |
---|
[1] | 422 | } |
---|
| 423 | |
---|
[52] | 424 | |
---|
| 425 | ostream & operator << (ostream & o, const sc_module & m) { |
---|
| 426 | return o << m.name(); |
---|
[1] | 427 | } |
---|
| 428 | |
---|
[52] | 429 | |
---|
[1] | 430 | // ---------------------------------------------------------------------------- |
---|
| 431 | // CLASS : sc_module_name |
---|
| 432 | // |
---|
| 433 | // ---------------------------------------------------------------------------- |
---|
| 434 | |
---|
[52] | 435 | sc_module_name::sc_module_name(const char * name_) : m_pushed(true) { |
---|
| 436 | m_name = name_; |
---|
| 437 | init(); |
---|
[1] | 438 | } |
---|
| 439 | |
---|
[52] | 440 | |
---|
| 441 | sc_module_name::sc_module_name(const sc_module_name & module) : m_pushed(false) { |
---|
| 442 | m_name = module.m_name; |
---|
[1] | 443 | } |
---|
| 444 | |
---|
[52] | 445 | |
---|
| 446 | void sc_module_name::init() { |
---|
| 447 | sc_core::module_name_stack.push_back(m_name); |
---|
| 448 | modules_stack.push(NULL); |
---|
[1] | 449 | } |
---|
| 450 | |
---|
[52] | 451 | |
---|
| 452 | sc_module_name::~sc_module_name() { |
---|
| 453 | if (m_pushed == false) { |
---|
| 454 | return; |
---|
| 455 | } |
---|
| 456 | assert(sc_core::module_name_stack.empty() == false); |
---|
| 457 | sc_core::module_name_stack.pop_back(); |
---|
| 458 | modules_stack.pop(); |
---|
| 459 | assert(temp_list.empty() == false); |
---|
| 460 | sc_module * last1 = temp_list.back(); |
---|
| 461 | temp_list.pop_back(); |
---|
| 462 | sc_module * last2 = (temp_list.empty()) ? NULL : temp_list.back(); |
---|
| 463 | set_parent(*last1, last2); |
---|
[1] | 464 | } |
---|
| 465 | |
---|
[52] | 466 | |
---|
| 467 | std::ostream & operator << (std::ostream & o, const sc_core::sc_module_name & n) { |
---|
| 468 | return o << (const char *) n; |
---|
[1] | 469 | } |
---|
| 470 | |
---|
| 471 | /////////////////////////////////////////: |
---|
| 472 | |
---|
[52] | 473 | static void check_method_process(const method_process_t & m) { |
---|
| 474 | if (m.dont_initialize == false) { |
---|
| 475 | assert(m.module != NULL); |
---|
[27] | 476 | #ifdef CONFIG_DEBUG |
---|
[52] | 477 | std::cerr << "Warning : SystemCASS doesn't perform SC_METHOD(S) initializations.\n" |
---|
| 478 | << "Please turn off automatic initialization for '" << m.name |
---|
| 479 | << "' method of '" << m.module->name() << "' module" |
---|
| 480 | " by calling 'dont_initialize()' function.\n" |
---|
| 481 | "Example :\n" |
---|
| 482 | " SC_METHOD(transition);\n" |
---|
| 483 | " sensitive << clk;\n" |
---|
| 484 | " dont_initialize();\n"; |
---|
[1] | 485 | #endif |
---|
[52] | 486 | } |
---|
[1] | 487 | } |
---|
| 488 | |
---|
[52] | 489 | |
---|
| 490 | void check_all_method_process() { |
---|
| 491 | method_process_list_t::const_iterator i; |
---|
| 492 | for (i = sc_core::method_process_list.begin(); i != sc_core::method_process_list.end(); ++i) { |
---|
| 493 | check_method_process(**i); |
---|
| 494 | } |
---|
[1] | 495 | } |
---|
| 496 | |
---|
[52] | 497 | |
---|
| 498 | void valid_method_process() { |
---|
| 499 | method_process_t * m = sc_core::method_process_list.back(); |
---|
| 500 | m->dont_initialize = true; |
---|
[1] | 501 | } |
---|
| 502 | |
---|
[52] | 503 | |
---|
| 504 | method_process_t * create_method_process(const char * name, SC_ENTRY_FUNC func, sc_module & module) { |
---|
| 505 | return new method_process_t(name, func, module); |
---|
[1] | 506 | } |
---|
| 507 | |
---|
[52] | 508 | |
---|
[1] | 509 | } // end of sc_core namespace |
---|
| 510 | |
---|
[52] | 511 | /* |
---|
| 512 | # Local Variables: |
---|
| 513 | # tab-width: 4; |
---|
| 514 | # c-basic-offset: 4; |
---|
| 515 | # c-file-offsets:((innamespace . 0)(inline-open . 0)); |
---|
| 516 | # indent-tabs-mode: nil; |
---|
| 517 | # End: |
---|
| 518 | # |
---|
| 519 | # vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=4:softtabstop=4 |
---|
| 520 | */ |
---|
| 521 | |
---|