Changeset 27 for sources/src
- Timestamp:
- May 4, 2009, 8:51:56 PM (15 years ago)
- Location:
- sources/src
- Files:
-
- 7 deleted
- 69 edited
- 1 copied
Legend:
- Unmodified
- Added
- Removed
-
sources/src/alias.cc
r12 r27 33 33 */ 34 34 35 #include"alias.h" 36 #include<iostream> 35 #include "alias.h" 36 #include <iostream> 37 #ifdef HAVE_CONFIG_H 38 #include "config.h" 39 #endif 37 40 38 41 const char * alias () -
sources/src/bit2string.cc
r12 r27 41 41 #include <cstdlib> 42 42 #include <iostream> 43 #ifdef HAVE_CONFIG_H 44 #include "config.h" 45 #endif 43 46 44 47 using namespace std; -
sources/src/casc.h
r4 r27 48 48 EXTERN void simulate_1_cycle (void) 49 49 { 50 #ifdef C HECK_FSM_RULES50 #ifdef CONFIG_CHECK_FSM_RULES 51 51 casc_fsm_step = TRANSITION; 52 52 #endif 53 53 transition (); 54 54 update (); 55 #ifdef C HECK_FSM_RULES55 #ifdef CONFIG_CHECK_FSM_RULES 56 56 casc_fsm_step = GEN_MOORE; 57 57 #endif 58 58 moore_generation (); 59 #ifdef C HECK_FSM_RULES59 #ifdef CONFIG_CHECK_FSM_RULES 60 60 casc_fsm_step = GEN_MEALY; 61 61 #endif 62 62 mealy_generation (); 63 #ifdef C HECK_FSM_RULES63 #ifdef CONFIG_CHECK_FSM_RULES 64 64 casc_fsm_step = STIMULI; 65 65 #endif -
sources/src/data_field.h
r1 r27 13 13 #define __DATA_FIELD_H__ 14 14 15 #include <endianness.h>16 17 15 template<int WIDTH, 18 16 int PADDING, 19 17 typename data_type> 20 struct val_field { /* try to work with little endianess */ 21 #if defined(little_endian) 22 /* little endian */ 23 // data_type pad:PADDING; 18 struct val_field { 24 19 data_type valW:WIDTH; 25 #elif defined(big_endian)26 /* big endian */27 data_type pad:PADDING;28 data_type valW:WIDTH;29 #else30 #error You must define endianness.31 #endif32 20 }; 33 21 -
sources/src/dump_dot.cc
r4 r27 40 40 #include "simplify_string.h" 41 41 #include "sc_ver.h" // sc_version 42 #ifdef HAVE_CONFIG_H 43 #include "config.h" 44 #endif 42 45 43 46 typedef std::list<sc_core::sc_port_base*> port_list_t; -
sources/src/dump_used_env.cc
r17 r27 36 36 #include <cstdlib> 37 37 #include "dump_used_env.h" 38 #ifdef HAVE_CONFIG_H 39 #include "config.h" 40 #endif 38 41 39 42 std::string -
sources/src/dump_used_options.cc
r1 r27 35 35 36 36 #include "dump_used_options.h" 37 #ifdef HAVE_CONFIG_H 38 #include "config.h" 39 #endif 37 40 38 41 namespace sc_core { … … 65 68 "DUMP_STAGE, " 66 69 #endif 67 #ifdef C HECK_FSM_RULES68 "C HECK_FSM_RULES, "70 #ifdef CONFIG_CHECK_FSM_RULES 71 "CONFIG_CHECK_FSM_RULES, " 69 72 #endif 70 73 #ifdef COMPIL_DEBUG 71 74 "COMPIL_DEBUG," 72 75 #endif 73 #ifdef DEBUG74 " DEBUG, "76 #ifdef CONFIG_DEBUG 77 "CONFIG_DEBUG, " 75 78 #endif 76 79 #ifdef UINT64 -
sources/src/entity.cc
r17 r27 35 35 */ 36 36 37 #include<cstring> 38 #include<iomanip> 39 #include<list> 40 #include<map> 41 #include<vector> 42 43 #include"assert.h" 44 #include"entity.h" 45 #include"sc_port.h" 46 #include"sc_signal.h" 47 #include"sc_module.h" 37 #include <cstring> 38 #include <iomanip> 39 #include <list> 40 #include <map> 41 #include <vector> 42 43 #include <cassert> 44 #include "entity.h" 45 #include "sc_port.h" 46 #include "sc_signal.h" 47 #include "sc_module.h" 48 #ifdef HAVE_CONFIG_H 49 #include "config.h" 50 #endif 48 51 49 52 using namespace std; … … 175 178 typedef std::map<const tab_t *,equi_list_t::iterator,predic4tab_t2equi_t_t> tab_t2equi_it_t; 176 179 static tab_t2equi_it_t tab2equi_map; 177 ASSERT(pointer != NULL);180 assert(pointer != NULL); 178 181 179 182 // boost … … 240 243 { 241 244 equi_t::const_iterator top_iter = e.begin (); 242 #ifdef DEBUG245 #ifdef CONFIG_DEBUG 243 246 if (top_iter == e.end ()) { 244 247 cerr << "Internal error : no signal in " << e << endl; … … 357 360 } 358 361 359 #if defined(DUMP_SIGNAL S_STATS)362 #if defined(DUMP_SIGNAL_STATS) 360 363 static unsigned int equi_real_size; 361 364 #endif … … 389 392 unsigned int table_size = get_sizeof_signals_table (); 390 393 equi_table = new tab_t[table_size]; //(0xCD); 391 #if defined(DUMP_SIGNAL S_STATS)394 #if defined(DUMP_SIGNAL_STATS) 392 395 equi_real_size = table_size; 393 396 #endif … … 403 406 bind_equi_to_table (equi_t &e, tab_t * const pointer) 404 407 { 405 ASSERT(pointer != NULL);408 assert(pointer != NULL); 406 409 equi_t::iterator i; 407 410 for (i = e.begin (); i != e.end (); ++i) { … … 455 458 o << ")"; 456 459 #else 457 ASSERT(e.object != NULL);460 assert(e.object != NULL); 458 461 o << e.object->name (); 459 462 #endif … … 494 497 print_table_stats (ostream &o) 495 498 { 496 #if defined(DUMP_SIGNAL S_STATS)499 #if defined(DUMP_SIGNAL_STATS) 497 500 int nb_reg = 0; 498 501 int nb_sig = 0; … … 537 540 } 538 541 const entity &ent = *(eq.begin ()); 539 #ifdef DEBUG542 #ifdef CONFIG_DEBUG 540 543 if (ent.type != sc_core::entity::SIGNAL) 541 544 exit(28); … … 544 547 const char *sig_name = ent.object->name (); 545 548 const char *sep = strchr (sig_name,'.'); 546 #ifdef DEBUG549 #ifdef CONFIG_DEBUG 547 550 if (sep == NULL) { 548 551 exit (30); … … 595 598 #endif 596 599 597 #if defined(DUMP_SIGNAL S_STATS)600 #if defined(DUMP_SIGNAL_STATS) 598 601 static unsigned int equi_real_size; 599 602 #endif … … 603 606 { 604 607 #if 0 605 //defined( DEBUG)608 //defined(CONFIG_DEBUG) 606 609 equi_list_t::iterator x_equi = get_equi (x); 607 610 if ((x_equi != equi_list.end())) { … … 640 643 tbind (sc_port_base &x,T &y) 641 644 { 642 // ASSERT(x.get_pointer () != NULL); // x pointer may be NULL643 // ASSERT(y.get_pointer () != NULL); // y pointer may be NULL645 // assert(x.get_pointer () != NULL); // x pointer may be NULL 646 // assert(y.get_pointer () != NULL); // y pointer may be NULL 644 647 equi_list_t::iterator x_equi = get_equi (x); 645 648 equi_list_t::iterator y_equi = get_equi (y); -
sources/src/entity.h
r1 r27 14 14 #define __ENTITY_H__ 15 15 16 #include <iostream>17 #include <list>18 #include "sc_fwd.h"19 #include "sc_port.h"20 #include "sc_signal.h"16 #include <iostream> 17 #include <list> 18 #include "sc_fwd.h" 19 #include "sc_port.h" 20 #include "sc_signal.h" 21 21 22 22 namespace sc_core { -
sources/src/fsm_rules.h
r1 r27 13 13 #define __FSM_RULES_H__ 14 14 15 #ifdef CHECK_FSM_RULES 15 #ifdef HAVE_CONFIG_H 16 #include "config.h" 17 #endif 18 19 #ifdef CONFIG_CHECK_FSM_RULES 16 20 17 21 namespace sc_core { -
sources/src/gen_code.cc
r17 r27 34 34 * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 35 35 */ 36 #if ndef _WIN3236 #if defined(__linux__) 37 37 #include <linux/limits.h> 38 #el se38 #elif defined(WIN32) 39 39 #include <windows.h> 40 40 #endif … … 45 45 #include<fstream> 46 46 47 #include"internal.h" 48 #include"gen_code.h" 49 #include"sc_module.h" 50 #include"sc_ver.h" 51 #include"process_dependency.h" 52 53 #ifdef CHECK_FSM_RULES 54 #define fsm_check_flag "-DCHECK_FSM_RULES" 47 #include "internal.h" 48 #include "gen_code.h" 49 #include "sc_module.h" 50 #include "sc_ver.h" 51 #include "process_dependency.h" 52 #ifdef HAVE_CONFIG_H 53 #include "config.h" 54 #endif 55 56 #ifdef CONFIG_CHECK_FSM_RULES 57 #include "fsm_rules.h" 58 #define fsm_check_flag "-DCONFIG_CHECK_FSM_RULES" 55 59 #else 56 60 #define fsm_check_flag 57 61 #endif 58 62 59 #define casc_cflags CFLAGS " " fsm_check_flag 60 61 #if defined(darwin) 62 #define macosx 63 #endif 63 #define casc_cflags GENERATED_MODULE_CFLAGS " " fsm_check_flag 64 65 // Enable CPP call, this is useful for typeinfo-enabled classes 66 #define CPP_CALL 64 67 65 68 using namespace std; … … 91 94 << m.module->name() << "->" << m.name << "()\\n\");\n"; 92 95 o << " p.integer = " << func << ";\n"; 93 #if CPP_CALL96 #ifdef CPP_CALL 94 97 o << " (((sc_module*)(" << m.module << "))->*(p.pmf)) (); /* " 95 98 << m.module->name () << "->" << m.name << "() */\n"; … … 143 146 } 144 147 145 #ifdef DEBUG148 #ifdef CONFIG_DEBUG 146 149 cerr << "opened temporary filename : " << temp << "\n"; 147 150 #endif … … 268 271 269 272 o << "// generated by " << sc_version () << endl 270 << "#include <casc.h>\n\n"271 << "#include <cstdio>\n\n"272 // << "#include <iostream>\n\n"273 << "#include <casc.h>\n\n" 274 << "#include <cstdio>\n\n" 275 // << "#include <iostream>\n\n" 273 276 << "namespace sc_core {\n" 274 277 << " typedef void (sc_module::*SC_ENTRY_FUNC)();\n" … … 329 332 330 333 o << "// generated by " << sc_version () << endl 331 << "#include <casc.h>\n\n"332 << "#include <cstdio>\n\n"333 // << "#include <iostream>\n\n"334 << "#include <casc.h>\n\n" 335 << "#include <cstdio>\n\n" 336 // << "#include <iostream>\n\n" 334 337 << "namespace sc_core {\n" 335 338 << " typedef void (sc_module::*SC_ENTRY_FUNC)();\n" … … 377 380 // const char *target_arch = getenv ("TARGET_ARCH"); 378 381 const char *default_compiler = 379 #if CPP_CALL382 #ifdef CPP_CALL 380 383 "g++"; 381 384 #else … … 418 421 /* COMPILE */ 419 422 /* ******* */ 420 #if defined(macosx) 421 sprintf(compil_str, 422 "(cd %s ; %s %s -DSCHEDULING_BY_CASC -I%s/include -fno-common -dynamic -o %s -c %s)", 423 temporary_dir, 424 compiler, 425 casc_cflags, 426 systemc_dir, 427 target_name, 428 source_name); 429 // sprintf(compil_str,""); 430 #elif defined(linux) 431 sprintf(compil_str, 432 "(cd %s ; libtool --mode=compile %s %s -DSCHEDULING_BY_CASC -I%s/include -shared -o %s -c %s)", 433 temporary_dir, 434 compiler, 435 casc_cflags, 436 systemc_dir, 437 target_name, 438 source_name); 423 const char *commandline_template = 424 #if defined(CONFIG_OS_DARWIN) 425 "(cd %s ;" " %s %s -DSCHEDULING_BY_CASC -I%s/include -fno-common -dynamic -o %s -c %s)" 426 #elif defined(CONFIG_OS_LINUX) 427 "(cd %s ; libtool --mode=compile %s %s -DSCHEDULING_BY_CASC -I%s/include -shared -o %s -c %s)" 439 428 #else 440 sprintf(compil_str, 441 "(cd %s ; %s %s -DSCHEDULING_BY_CASC -I%s/include -dynamiclib -o %s -c %s)", 442 temporary_dir, 443 compiler, 444 casc_cflags, 445 systemc_dir, 446 target_name, 447 source_name); 448 #endif 429 "(cd %s ;" " %s %s -DSCHEDULING_BY_CASC -I%s/include -dynamiclib -o %s -c %s)" 430 #endif 431 ; 432 sprintf(compil_str, 433 commandline_template, 434 temporary_dir, 435 compiler, 436 casc_cflags, 437 systemc_dir, 438 target_name, 439 source_name); 449 440 450 441 if (dump_stage) … … 461 452 sprintf (target_name, "%s.so", base_name); 462 453 463 #if defined(linux)454 #ifdef CONFIG_OS_LINUX 464 455 sprintf (source_name, "%s.lo", base_name); 465 456 sprintf(compil_str, "(cd %s ; pwd ; libtool --mode=link %s %s -shared -rdynamic -o %s %s)", /* -L. -L%s/lib-%s */ … … 560 551 for (i = 0; i < n; ++i) 561 552 { 562 #if 0 //defined( DEBUG)553 #if 0 //defined(CONFIG_DEBUG) 563 554 sc_module *m = (sc_module*)(fc.instance[i]); 564 555 cerr << m->name () << endl; … … 575 566 void static_simulate_1_cycle (void) 576 567 { 577 #ifdef C HECK_FSM_RULES568 #ifdef CONFIG_CHECK_FSM_RULES 578 569 casc_fsm_step = TRANSITION; 579 570 #endif 580 571 call_functions (pf[0]); // transition 581 572 update (); 582 #ifdef C HECK_FSM_RULES573 #ifdef CONFIG_CHECK_FSM_RULES 583 574 casc_fsm_step = GEN_MOORE; 584 575 #endif 585 576 call_functions (pf[1]); // moore generation 586 #ifdef C HECK_FSM_RULES577 #ifdef CONFIG_CHECK_FSM_RULES 587 578 casc_fsm_step = GEN_MEALY; 588 579 #endif 589 580 call_functions (pf[2]); // mealy generation 590 #ifdef C HECK_FSM_RULES581 #ifdef CONFIG_CHECK_FSM_RULES 591 582 casc_fsm_step = STIMULI; 592 583 #endif … … 634 625 void quasistatic_simulate_1_cycle (void) 635 626 { 636 #ifdef C HECK_FSM_RULES627 #ifdef CONFIG_CHECK_FSM_RULES 637 628 casc_fsm_step = TRANSITION; 638 629 #endif … … 644 635 } 645 636 update (); 646 #ifdef C HECK_FSM_RULES637 #ifdef CONFIG_CHECK_FSM_RULES 647 638 casc_fsm_step = GEN_MOORE; 648 639 #endif … … 652 643 Call (m); 653 644 } 654 #ifdef C HECK_FSM_RULES645 #ifdef CONFIG_CHECK_FSM_RULES 655 646 casc_fsm_step = GEN_MEALY; 656 647 #endif 657 648 quasistatic_mealy_generation (); 658 #ifdef C HECK_FSM_RULES649 #ifdef CONFIG_CHECK_FSM_RULES 659 650 casc_fsm_step = STIMULI; 660 651 #endif -
sources/src/gen_code.h
r1 r27 14 14 #define __GEN_CODE_H__ 15 15 16 #include "internal.h"17 #include "global_functions.h"18 #include "graph.h"19 #include "sc_port.h"20 #include "sc_trace.h"21 #include "process_dependency.h"16 #include "internal.h" 17 #include "global_functions.h" 18 #include "graph.h" 19 #include "sc_port.h" 20 #include "sc_trace.h" 21 #include "process_dependency.h" 22 22 23 23 //------------------------------------------------------------------- … … 105 105 internal_sc_cycle0( double duration ) // in default time units 106 106 { 107 #ifdef DEBUG107 #ifdef CONFIG_DEBUG 108 108 // Check dynamic linkage 109 109 if ((func_combinationals == NULL) || (func_simulate_1_cycle == NULL)) { … … 121 121 #endif 122 122 update (); 123 #ifdef C HECK_FSM_RULES123 #ifdef CONFIG_CHECK_FSM_RULES 124 124 casc_fsm_step = GEN_MEALY; 125 125 #endif … … 132 132 if (is_posted_write ()) { 133 133 update (); 134 #ifdef C HECK_FSM_RULES134 #ifdef CONFIG_CHECK_FSM_RULES 135 135 casc_fsm_step = GEN_MEALY; 136 136 #endif -
sources/src/global_functions.cc
r4 r27 35 35 */ 36 36 37 #include<iostream> 38 #include<dlfcn.h> 39 #include"schedulers.h" // get_scheduling & run_schedule_editor 40 #include"sc_module.h" // check_all_method_process 41 #include"gen_code.h" // gen_scheduling_code_for_dynamic_link & gen_scheduling_code_for_static_func 42 #include"sc_clock_ext.h" // clock list 43 #include"usage.h" 44 #include"module_hierarchy2dot.h" 45 #include"assert.h" 37 #include <iostream> 38 #include <dlfcn.h> 39 #include "schedulers.h" // get_scheduling & run_schedule_editor 40 #include "sc_module.h" // check_all_method_process 41 #include "gen_code.h" // gen_scheduling_code_for_dynamic_link & gen_scheduling_code_for_static_func 42 #include "sc_clock_ext.h" // clock list 43 #include "usage.h" 44 #include "module_hierarchy2dot.h" 45 #include "assert.h" 46 #ifdef HAVE_CONFIG_H 47 #include "config.h" 48 #endif 49 50 #ifdef CONFIG_CHECK_FSM_RULES 51 #include "fsm_rules.h" 52 #endif 46 53 47 54 using namespace std; … … 218 225 219 226 char lib_absolutepath[256]; 220 #if defined( darwin) //macosx)227 #if defined(CONFIG_OS_DARWIN) 221 228 sprintf(lib_absolutepath, "/tmp/%s.so", base_name); 222 #elif defined( linux)229 #elif defined(CONFIG_OS_LINUX) 223 230 sprintf(lib_absolutepath, "/tmp/%s.so", base_name); 224 231 #else … … 255 262 } 256 263 // Init variables to be able to run combinational functions 257 #ifdef C HECK_FSM_RULES264 #ifdef CONFIG_CHECK_FSM_RULES 258 265 casc_fsm_step = STIMULI; 259 266 #endif -
sources/src/global_functions.h
r4 r27 13 13 #define __GLOBAL_FUNCTIONS_H__ 14 14 15 #include "sc_fwd.h"16 #include "sc_time.h"15 #include "sc_fwd.h" 16 #include "sc_time.h" 17 17 18 18 extern int sc_main(int, char **); -
sources/src/graph.cc
r17 r27 113 113 #include "sc_module.h" 114 114 #include "sc_port.h" 115 #ifdef HAVE_CONFIG_H 116 #include "config.h" 117 #endif 115 118 116 119 using namespace std; … … 154 157 { 155 158 Arc *a; 156 #ifdef DEBUG159 #ifdef CONFIG_DEBUG 157 160 if ((u == NULL) || (v == NULL)) 158 161 exit(29042004); -
sources/src/graph_cass.cc
r17 r27 130 130 #include "simplify_string.h" // simplify_string 131 131 #include "sc_ver_ext.h" // sc_version for dumping to DOT 132 #ifdef HAVE_CONFIG_H 133 #include "config.h" 134 #endif 132 135 133 136 using namespace std; -
sources/src/graph_signals.cc
r12 r27 138 138 #include "sc_module.h" 139 139 #include "sc_port.h" 140 #ifdef HAVE_CONFIG_H 141 #include "config.h" 142 #endif 140 143 141 144 using namespace std; -
sources/src/hex2string.cc
r12 r27 41 41 #include <cstdlib> 42 42 #include <iostream> 43 #ifdef HAVE_CONFIG_H 44 #include "config.h" 45 #endif 43 46 44 47 using namespace std; -
sources/src/methodprocess_dependency.cc
r1 r27 34 34 */ 35 35 36 #include "assert.h"36 #include <cassert> 37 37 #include "methodprocess_dependency.h" 38 38 #include "simplify_string.h" … … 40 40 #include <iostream> 41 41 #include <fstream> 42 #ifdef HAVE_CONFIG_H 43 #include "config.h" 44 #endif 42 45 43 46 using namespace std; … … 47 50 get_name (const method_process_t *method) 48 51 { 49 ASSERT(method != NULL);52 assert(method != NULL); 50 53 const sc_module *module = method->module; 51 ASSERT(module != NULL);54 assert(module != NULL); 52 55 const char *module_name = module->name (); 53 56 const char *function_name = method->name; … … 85 88 const SignalDependency &sd = *it; 86 89 const equi_t *source_equi = sd.source; 87 ASSERT(source_equi != NULL);90 assert(source_equi != NULL); 88 91 const method_process_t *source_method = table[source_equi]; 89 92 if (source_method == NULL) -
sources/src/module_hierarchy.cc
r17 r27 36 36 #include "module_hierarchy.h" 37 37 #include "sc_module.h" 38 #include "assert.h"38 #include <cassert> 39 39 #include <map> 40 #ifdef HAVE_CONFIG_H 41 #include "config.h" 42 #endif 40 43 #include <cstdlib> 41 44 #include <cstring> … … 73 76 return; //obj_list = &top_level_objects; 74 77 else { 75 ASSERT(parent != &obj);78 assert(parent != &obj); 76 79 const sc_object *pobj = (const sc_module *) parent; 77 80 obj_list = &(object2childs[pobj]); -
sources/src/module_hierarchy2dot.cc
r1 r27 43 43 #include "sc_signal.h" 44 44 #include "entity.h" 45 #include "assert.h"45 #include <cassert> 46 46 #include "internal.h" 47 #ifdef HAVE_CONFIG_H 48 #include "config.h" 49 #endif 47 50 48 51 using namespace std; … … 88 91 const entity &in_entity = *it; 89 92 sc_object *in_obj = in_entity.object; 90 ASSERT(in_obj != NULL);93 assert(in_obj != NULL); 91 94 const sc_module *in_parent = NULL; 92 95 switch (in_entity.type) { -
sources/src/mouchard_scheduling.cc
r1 r27 45 45 #include "sc_module.h" 46 46 #include "sc_ver.h" 47 #ifdef HAVE_CONFIG_H 48 #include "config.h" 49 #endif 47 50 48 51 using namespace std; -
sources/src/port_dependency.cc
r17 r27 45 45 #include "sc_port.h" 46 46 #include "sc_ver_ext.h" 47 #ifdef HAVE_CONFIG_H 48 #include "config.h" 49 #endif 47 50 48 51 using namespace std; … … 108 111 p.destination = &b; 109 112 aPortDependencyGraph.push_back (p); 110 #if DUMP_PORT_DEPENDENCY113 #ifdef DUMP_PORT_DEPENDENCY 111 114 if (a) { 112 115 cerr << "'" << ((sc_object&)b).name() -
sources/src/process_dependency.cc
r1 r27 44 44 #include "sc_module.h" 45 45 #include "sc_ver.h" 46 #ifdef HAVE_CONFIG_H 47 #include "config.h" 48 #endif 46 49 47 50 using namespace std; -
sources/src/sc_bigint.h
r1 r27 22 22 // ---------------------------------------------------------------------------- 23 23 24 #include "sc_nbdefs.h"24 #include "sc_nbdefs.h" 25 25 26 26 namespace sc_dt { -
sources/src/sc_biguint.h
r1 r27 18 18 // ---------------------------------------------------------------------------- 19 19 20 #include "sc_nbdefs.h"20 #include "sc_nbdefs.h" 21 21 22 22 namespace sc_dt { -
sources/src/sc_bit.h
r1 r27 13 13 #define __SC_BIT_H__ 14 14 15 #include "sc_nbdefs.h"16 #include "sc_fwd.h"17 #include "sc_logic.h"18 #include "sc_string.h"19 #include "sc_numrep.h"15 #include "sc_nbdefs.h" 16 #include "sc_fwd.h" 17 #include "sc_logic.h" 18 #include "sc_string.h" 19 #include "sc_numrep.h" 20 20 21 21 // ---------------------------------------------------------------------------- -
sources/src/sc_bv.h
r1 r27 18 18 // ---------------------------------------------------------------------------- 19 19 20 #include "sc_nbdefs.h"21 #include "sc_logic.h"22 #include "sc_unsigned.h"23 #include "sc_signed.h"24 #include "sc_uint.h"25 #include "sc_int.h"20 #include "sc_nbdefs.h" 21 #include "sc_logic.h" 22 #include "sc_unsigned.h" 23 #include "sc_signed.h" 24 #include "sc_uint.h" 25 #include "sc_int.h" 26 26 27 27 namespace sc_dt { -
sources/src/sc_clock.cc
r1 r27 35 35 */ 36 36 37 #include"sc_clock.h" 38 #include"assert.h" 37 #include "sc_clock.h" 38 #include <cassert> 39 #ifdef HAVE_CONFIG_H 40 #include "config.h" 41 #endif 39 42 40 43 using namespace std; … … 69 72 { 70 73 init (); 71 ASSERT(period_ == 1);72 ASSERT(duty_cycle_ == 0.5);73 ASSERT(start_time_ == SC_ZERO_TIME);74 assert(period_ == 1); 75 assert(duty_cycle_ == 0.5); 76 assert(start_time_ == SC_ZERO_TIME); 74 77 posedge_first = posedge_first_; 75 78 } … … 82 85 { 83 86 init (); 84 ASSERT(period_ == 1);85 ASSERT(duty_cycle_ == 0.5);86 ASSERT(start_time_ == SC_ZERO_TIME);87 assert(period_ == 1); 88 assert(duty_cycle_ == 0.5); 89 assert(start_time_ == SC_ZERO_TIME); 87 90 posedge_first = posedge_first_; 88 91 } -
sources/src/sc_clock.h
r1 r27 14 14 #define __SC_CLOCK_H__ 15 15 16 #include "sc_clock_ext.h"16 #include "sc_clock_ext.h" 17 17 18 18 -
sources/src/sc_event.cc
r1 r27 35 35 36 36 37 #include<iostream> 38 #include"sc_event.h" 39 #include"sc_interface.h" 40 #include"sc_port_ext.h" 37 #include <iostream> 38 #include "sc_event.h" 39 #include "sc_interface.h" 40 #include "sc_port_ext.h" 41 #ifdef HAVE_CONFIG_H 42 #include "config.h" 43 #endif 41 44 42 45 using namespace std; -
sources/src/sc_event.h
r17 r27 13 13 #define __SC_EVENT_H__ 14 14 15 #include"sc_fwd.h" 15 #include "sc_fwd.h" 16 #include <iostream> 16 17 #include<iostream> 17 18 -
sources/src/sc_event_finder.cc
r4 r27 35 35 36 36 37 #include"sc_event_finder.h" 37 #include "sc_event_finder.h" 38 #ifdef HAVE_CONFIG_H 39 #include "config.h" 40 #endif 38 41 39 42 namespace sc_core { -
sources/src/sc_event_finder.h
r4 r27 13 13 #define __SC_EVENT_FINDER_H__ 14 14 15 #include "sc_fwd.h"15 #include "sc_fwd.h" 16 16 17 17 namespace sc_core { -
sources/src/sc_int.h
r22 r27 29 29 // ---------------------------------------------------------------------------- 30 30 31 #include "sc_nbdefs.h"31 #include "sc_nbdefs.h" 32 32 33 33 namespace sc_dt { -
sources/src/sc_interface.cc
r17 r27 34 34 */ 35 35 36 #include"sc_interface.h" 37 #include"sc_event.h" 38 #include"assert.h" 39 #include<iostream> 40 #include<map> 36 #include "sc_interface.h" 37 #include "sc_event.h" 38 #include "assert.h" 39 #include <iostream> 40 #include <map> 41 #ifdef HAVE_CONFIG_H 42 #include "config.h" 43 #endif 44 #include <cstdlib> //exit 41 45 #include<cstdlib> //exit 42 46 … … 106 110 { 107 111 interface2infos_t::iterator i = interface2infos.find (this); 108 #ifdef DEBUG112 #ifdef CONFIG_DEBUG 109 113 if (i == interface2infos.end ()) { 110 114 cerr << "Internal error : can't find data size of " << this << "\n"; … … 119 123 { 120 124 interface2infos_t::iterator i = interface2infos.find (this); 121 #ifdef DEBUG125 #ifdef CONFIG_DEBUG 122 126 if (i == interface2infos.end ()) { 123 127 cerr << "Internal error : can't find default event of " << this << "\n"; -
sources/src/sc_interface.h
r1 r27 13 13 #define __SC_INTERFACE_H__ 14 14 15 #include "sc_fwd.h"16 #include "internal_ext.h"15 #include "sc_fwd.h" 16 #include "internal_ext.h" 17 17 18 18 namespace sc_core { -
sources/src/sc_logic.cc
r1 r27 39 39 // ---------------------------------------------------------------------------- 40 40 41 #include"sc_logic.h" 41 #include "sc_logic.h" 42 #ifdef HAVE_CONFIG_H 43 #include "config.h" 44 #endif 42 45 43 46 namespace sc_dt { -
sources/src/sc_logic.h
r1 r27 18 18 // ---------------------------------------------------------------------------- 19 19 20 #include "sc_nbdefs.h"21 #include "sc_fwd.h"20 #include "sc_nbdefs.h" 21 #include "sc_fwd.h" 22 22 23 23 namespace sc_dt { -
sources/src/sc_lv.h
r1 r27 18 18 // ---------------------------------------------------------------------------- 19 19 20 #include "sc_nbdefs.h"21 #include "sc_logic.h"22 #include "sc_unsigned.h"23 #include "sc_signed.h"24 #include "sc_uint.h"25 #include "sc_int.h"20 #include "sc_nbdefs.h" 21 #include "sc_logic.h" 22 #include "sc_unsigned.h" 23 #include "sc_signed.h" 24 #include "sc_uint.h" 25 #include "sc_int.h" 26 26 27 27 -
sources/src/sc_main.cc
r17 r27 35 35 */ 36 36 37 #include<sstream> 38 #include<list> 39 #include<set> 40 #include<cstring> // strcmp 41 42 #include"internal.h" 43 #include"global_functions.h" 44 #include"sc_ver.h" 45 #include"sc_module.h" 46 #include"sc_signal.h" // pending_write_vector 47 #include"dump_dot.h" 48 #include"dump_used_options.h" 49 #include"dump_used_env.h" 50 #include"assert.h" 37 #include <sstream> 38 #include <list> 39 #include <set> 40 #include <cstring> // strcmp 41 #include <cassert> 42 43 #include "internal.h" 44 #include "global_functions.h" 45 #include "sc_ver.h" 46 #include "sc_module.h" 47 #include "sc_signal.h" // pending_write_vector 48 #include "dump_dot.h" 49 #include "dump_used_options.h" 50 #include "dump_used_env.h" 51 52 #ifdef HAVE_CONFIG_H 53 #include "config.h" 54 #endif 51 55 52 56 // … … 60 64 61 65 bool check_port_dependencies = false; 66 #ifdef CONFIG_DEFAULT_RUNTIME_COMPILATION 67 bool dynamic_link_of_scheduling_code = true; 68 #else 62 69 bool dynamic_link_of_scheduling_code = false; 70 #endif 63 71 bool dump_netlist_info = false; 64 72 bool dump_funclist_info = false; … … 108 116 switch (scheduling_method) { 109 117 case CASS_SCHEDULING : 110 ASSERT(use_port_dependency == false);118 assert(use_port_dependency == false); 111 119 break; 112 120 case BUCHMANN_SCHEDULING : … … 125 133 exit (33); 126 134 } 127 ASSERT(use_port_dependency || use_sensitivity_list);135 assert(use_port_dependency || use_sensitivity_list); 128 136 } 129 137 -
sources/src/sc_module.cc
r12 r27 48 48 #include "sc_clock.h" // is_clock 49 49 #include "entity.h" 50 #include "assert.h" 50 #include <cassert> 51 #ifdef HAVE_CONFIG_H 52 #include "config.h" 53 #endif 51 54 52 55 // … … 160 163 sensitivity_list_t::iterator i; 161 164 for (i = sensitivity_list.begin (); i != sensitivity_list.end (); ++i) { 162 #if defined( _DEBUG)165 #if defined(CONFIG_DEBUG) && 0 163 166 if (i->get_interface() == NULL) 164 167 { … … 238 241 sensitive (this) 239 242 { 240 ASSERT(nm != NULL);243 assert(nm != NULL); 241 244 #if 0 242 245 cerr << "sc_module constructor with const char * parameter\n"; … … 498 501 if (m_pushed == false) 499 502 return; 500 ASSERT(sc_core::module_name_stack.empty () == false);503 assert(sc_core::module_name_stack.empty () == false); 501 504 sc_core::module_name_stack.pop_back (); 502 505 modules_stack.pop (); … … 504 507 cout << "~sc_module_name <- " << m_name << endl; 505 508 #endif 506 ASSERT(temp_list.empty () == false);509 assert(temp_list.empty () == false); 507 510 sc_module *last1 = temp_list.back(); 508 511 temp_list.pop_back(); … … 526 529 if (m.dont_initialize == false) 527 530 { 528 ASSERT(m.module != NULL);529 #if 531 assert(m.module != NULL); 532 #ifdef CONFIG_DEBUG 530 533 std::cerr << "Warning : SystemCASS doesn't perform SC_METHOD(S) initializations.\n" 531 534 << "Please turn off automatic initialization for '" << m.name -
sources/src/sc_module.h
r1 r27 16 16 #include "sc_module_ext.h" 17 17 18 #include <list>19 #include <set>20 #include <stack>21 #include "sc_fwd.h"22 #include "internal.h"23 #include "sc_object.h"24 #include "sc_sensitive.h"18 #include <list> 19 #include <set> 20 #include <stack> 21 #include "sc_fwd.h" 22 #include "internal.h" 23 #include "sc_object.h" 24 #include "sc_sensitive.h" 25 25 26 26 namespace sc_core { -
sources/src/sc_module_ext.h
r1 r27 38 38 #define __SC_MODULE_EXT_H__ 39 39 40 #include "sc_fwd.h"41 #include "internal_ext.h"42 #include "sc_object.h"43 #include "sc_sensitive.h"44 #include "serialization_ext.h"40 #include "sc_fwd.h" 41 #include "internal_ext.h" 42 #include "sc_object.h" 43 #include "sc_sensitive.h" 44 #include "serialization_ext.h" 45 45 46 46 namespace sc_core { -
sources/src/sc_module_name.h
r1 r27 14 14 #define __SC_MODULE_NAME_H__ 15 15 16 #include "sc_fwd.h"16 #include "sc_fwd.h" 17 17 18 18 namespace sc_core { -
sources/src/sc_numrep.cc
r1 r27 36 36 #include <string> 37 37 #include "sc_numrep.h" 38 #ifdef HAVE_CONFIG_H 39 #include "config.h" 40 #endif 38 41 39 42 namespace sc_dt { -
sources/src/sc_object.cc
r17 r27 40 40 #include <map> 41 41 42 #include "assert.h"42 #include <cassert> 43 43 #include "sc_object.h" 44 44 //#include "sc_port.h" … … 46 46 #include "sc_signal.h" 47 47 #include "module_hierarchy.h" 48 #ifdef HAVE_CONFIG_H 49 #include "config.h" 50 #endif 48 51 49 52 using namespace std; … … 71 74 // out += "."; 72 75 } 73 // ASSERT(name != NULL);76 // assert(name != NULL); 74 77 if (name) 75 78 out += name; … … 203 206 { 204 207 object2name_t::iterator i = object2fullname.find (this); 205 #ifdef DEBUG208 #ifdef CONFIG_DEBUG 206 209 if (i == object2fullname.end ()) { 207 210 cerr << "Internal error : can't find name of " << this << "\n"; … … 217 220 /* 218 221 object2name_t::iterator i = object2fullname.find (this); 219 #ifdef DEBUG222 #ifdef CONFIG_DEBUG 220 223 if (i == object2fullname.end ()) { 221 224 cerr << "Internal error : can't find name of " << this << "\n"; … … 235 238 string out; 236 239 sc_object* obj = *it; 237 ASSERT(obj != NULL);240 assert(obj != NULL); 238 241 build_full_name (out, *obj); 239 242 } … … 243 246 { 244 247 object2infos_t::iterator i = object2infos.find (this); 245 #ifdef DEBUG248 #ifdef CONFIG_DEBUG 246 249 if (i == object2infos.end ()) { 247 250 cerr << "Internal error : can't find kind of " << this << "\n"; -
sources/src/sc_pat_trace.cc
r12 r27 36 36 37 37 38 #include "sc_trace.h"39 #include "sc_pat_trace.h"40 #include "sc_ver.h"41 #include "internal.h" // notrace38 #include "sc_trace.h" 39 #include "sc_pat_trace.h" 40 #include "sc_ver.h" 41 #include "internal.h" // notrace 42 42 43 #include<ctime> 43 #include <ctime> 44 #ifdef HAVE_CONFIG_H 45 #include "config.h" 46 #endif 44 47 45 #ifdef PAT_TRACE_FORMAT48 #ifdef CONFIG_PAT_TRACE_FORMAT 46 49 47 50 //----------------------------------------- -
sources/src/sc_port.cc
r12 r27 36 36 37 37 38 #include<iomanip> 39 #include<map> 40 41 #include"sc_port.h" 42 #include"sc_signal.h" 43 #include"sc_module.h" 44 #include"entity.h" 45 #include"global_functions.h" 46 #include"assert.h" 38 #include <iomanip> 39 #include <map> 40 #include <cassert> 41 42 #include "sc_port.h" 43 #include "sc_signal.h" 44 #include "sc_module.h" 45 #include "entity.h" 46 #include "global_functions.h" 47 48 #ifdef HAVE_CONFIG_H 49 #include "config.h" 50 #endif 47 51 48 52 extern "C" { … … 54 58 using namespace std; 55 59 56 #ifdef C HECK_FSM_RULES57 #include "fsm_rules.h"60 #ifdef CONFIG_CHECK_FSM_RULES 61 #include "fsm_rules.h" 58 62 namespace sc_core { 59 63 casc_fsm_step_t casc_fsm_step = ELABORATION; … … 108 112 sc_port_base::init () 109 113 { 110 #ifdef DEBUG114 #ifdef CONFIG_DEBUG 111 115 if (modules_stack.empty ()) { 112 116 cerr << "Internal error : modules stack empty\n"; … … 233 237 #endif 234 238 #define iter (sc_core::pending_write_vector[i]) 235 #ifdef DEBUG239 #ifdef CONFIG_DEBUG 236 240 if (iter.pointer == NULL) { 237 241 cerr << "Internal error : trying to apply a posted write from an unassigned signal/port\n"; … … 255 259 cerr << "done.\n"; 256 260 #endif 257 #if defined(C HECK_MULTIWRITING2REGISTER)261 #if defined(CONFIG_CHECK_MULTIWRITING2REGISTER) 258 262 sc_core::pending_writing2register_clear (); 259 263 #endif … … 310 314 { 311 315 const tab_t *pointer = port.get_pointer (); 312 // ASSERT(pointer != NULL);316 //assert(pointer != NULL); 313 317 if (pointer == NULL) 314 318 return false; // case : sc_in not bound … … 343 347 { 344 348 /*const*/ sc_port_base *port = i->first; 345 ASSERT(port != NULL);349 assert(port != NULL); 346 350 check_port (*port); 347 351 } … … 350 354 } 351 355 352 #if defined(C HECK_MULTIWRITING2REGISTER)356 #if defined(CONFIG_CHECK_MULTIWRITING2REGISTER) 353 357 typedef set<const tab_t*> pending_writing2register_set_t; 354 358 pending_writing2register_set_t pending_writing2register_set; -
sources/src/sc_port.h
r1 r27 14 14 #define __SC_PORT_H__ 15 15 16 #include "sc_port_ext.h"17 #include "sc_fwd.h"18 //#include "internal_ext.h"16 #include "sc_port_ext.h" 17 #include "sc_fwd.h" 18 //#include "internal_ext.h" 19 19 20 20 #include <list> -
sources/src/sc_port_ext.h
r17 r27 15 15 16 16 // Define registers writing method 17 #include <iostream>18 #include <cstdlib>19 #include "sc_fwd.h"20 #include "sc_nbdefs.h"21 //#include "sc_event_finder.h"22 #include "sc_event.h"23 #include "sc_object.h"24 #include "sc_interface.h"25 #include "internal_ext.h"26 #include "port_dependency_ext.h"27 #include "fsm_rules.h"17 #include <iostream> 18 #include <cstdlib> 19 #include "sc_fwd.h" 20 #include "sc_nbdefs.h" 21 //#include "sc_event_finder.h" 22 #include "sc_event.h" 23 #include "sc_object.h" 24 #include "sc_interface.h" 25 #include "internal_ext.h" 26 #include "port_dependency_ext.h" 27 #include "fsm_rules.h" 28 28 29 29 … … 54 54 ///////////////////// DEPRECATED 55 55 // C ANSI-only since it is needed to link with extern "C" 56 // this declaration is not in casc.h since the C HECK_FSM_RULES macro56 // this declaration is not in casc.h since the CONFIG_CHECK_FSM_RULES macro 57 57 // is not defined. 58 58 … … 184 184 << " on signal " << name () << "\n"; 185 185 #endif 186 #ifdef C HECK_FSM_RULES186 #ifdef CONFIG_CHECK_FSM_RULES 187 187 if (casc_fsm_step == GEN_MOORE) { 188 188 std::cerr << "FSM rules error : trying to read on input port '" … … 294 294 << " on signal " << name () << "\n"; 295 295 #endif 296 #ifdef C HECK_FSM_RULES296 #ifdef CONFIG_CHECK_FSM_RULES 297 297 if (casc_fsm_step == GEN_MOORE) { 298 298 std::cerr << "FSM rules error : trying to read on input/output port " … … 316 316 << " on in/out port (writing into a signal) '" << name () << "'\n"; 317 317 #endif 318 #ifdef C HECK_FSM_RULES318 #ifdef CONFIG_CHECK_FSM_RULES 319 319 if ((casc_fsm_step != GEN_MOORE) && ( casc_fsm_step != GEN_MEALY)) { 320 320 std::cerr << "FSM rules error : trying to write on output port " … … 325 325 #endif 326 326 // T& ref = *(T*)(get_pointer()); 327 #if defined(C HECK_MULTIWRITING2PORT)327 #if defined(CONFIG_CHECK_MULTIWRITING2PORT) 328 328 check_multiwriting2port (); 329 329 #endif -
sources/src/sc_sensitive.cc
r1 r27 35 35 36 36 37 #include"sc_sensitive.h" 38 #include"sc_port.h" 39 #include"sc_event.h" 40 #include"sc_event_finder.h" 41 #include"sc_module.h" 42 #include"internal.h" 37 #include "sc_sensitive.h" 38 #include "sc_port.h" 39 #include "sc_event.h" 40 #include "sc_event_finder.h" 41 #include "sc_module.h" 42 #include "internal.h" 43 #ifdef HAVE_CONFIG_H 44 #include "config.h" 45 #endif 43 46 44 47 using namespace std; -
sources/src/sc_sensitive.h
r1 r27 13 13 #define __SC_SENSITIVE_H__ 14 14 15 #include <list>16 #include "sc_fwd.h"17 //#include "sc_event.h"18 //#include "sc_interface.h"19 //#include "internal_ext.h"15 #include <list> 16 #include "sc_fwd.h" 17 //#include "sc_event.h" 18 //#include "sc_interface.h" 19 //#include "internal_ext.h" 20 20 21 21 namespace sc_core { -
sources/src/sc_signal.h
r22 r27 15 15 16 16 // Define registers writing method 17 #include<iostream> 18 #include<cstdlib> 19 #include"sc_fwd.h" 20 #include"sc_nbdefs.h" 21 //#include"sc_event_finder.h" 22 //#include"sc_event.h" 23 #include"sc_time.h" // SC_ZERO_TIME 24 #include"sc_object.h" 25 #include"sc_interface.h" 26 #include"internal_ext.h" 17 #include <iostream> 18 #include <cstdlib> 19 #include "sc_fwd.h" 20 #include "sc_nbdefs.h" 21 //#include "sc_event_finder.h" 22 //#include "sc_event.h" 23 #include "sc_time.h" // SC_ZERO_TIME 24 #include "sc_object.h" 25 #include "sc_interface.h" 26 #include "internal_ext.h" 27 28 #ifdef CONFIG_CHECK_FSM_RULES 27 29 #include "fsm_rules.h" 30 #endif 28 31 29 32 namespace sc_core { … … 42 45 ///////////////////// DEPRECATED 43 46 // C ANSI-only since it is needed to link with extern "C" 44 // this declaration is not in casc.h since the C HECK_FSM_RULES macro47 // this declaration is not in casc.h since the CONFIG_CHECK_FSM_RULES macro 45 48 // is not defined. 46 49 … … 79 82 size_t size = (sizeof (T)-1) / sizeof (base_type); 80 83 size_t i = 0; 81 const base_type *pvalue = (const base_type*)( &value_);84 const base_type *pvalue = (const base_type*)(void*)(&value_); 82 85 do { 83 86 #if 0 … … 98 101 post_multiwrite (pointer_,value_); 99 102 } else { 100 #if defined( DEBUG)103 #if defined(CONFIG_DEBUG) 101 104 if (pending_write_vector_nb >= pending_write_vector_capacity) { 102 105 //if (pending_write_vector_nb >= pending_write_vector_capacity * sizeof(pending_write)) { … … 106 109 exit (-1); 107 110 } 108 #endif // DEBUG111 #endif // CONFIG_DEBUG 109 112 pending_write_vector[pending_write_vector_nb].pointer = pointer_; 110 113 // pending_write_vector[pending_write_vector_nb++].value = *(reinterpret_cast<const base_type*const>(&value_)); => bug ! … … 229 232 sc_signal<T>::init() 230 233 { 231 set_pointer ((tab_t*)&val);234 set_pointer ((tab_t*)(void*)&val); 232 235 set_kind (kind_string); 233 236 sc_interface::init (sizeof (data_type)); … … 247 250 << " on signal " << name () << "\n"; 248 251 #endif 249 #ifdef C HECK_FSM_RULES252 #ifdef CONFIG_CHECK_FSM_RULES 250 253 // we can read value from sc_signal type (used like a register) at any time 251 254 #endif … … 259 262 sc_signal<T>::write( const data_type& value_ ) 260 263 { 261 #ifdef C HECK_FSM_RULES264 #ifdef CONFIG_CHECK_FSM_RULES 262 265 if ((casc_fsm_step != TRANSITION) 263 266 && ( casc_fsm_step != STIMULI)) { … … 268 271 } 269 272 #endif 270 #ifdef DEBUG273 #ifdef CONFIG_DEBUG 271 274 if (get_pointer() == NULL) 272 275 { … … 275 278 } 276 279 #endif 277 #ifdef C HECK_MULTIWRITING2REGISTER280 #ifdef CONFIG_CHECK_MULTIWRITING2REGISTER 278 281 pending_writing2register_record_and_check (get_pointer ()); 279 282 #endif -
sources/src/sc_time.cc
r12 r27 35 35 36 36 37 #include "sc_time.h"37 #include "sc_time.h" 38 38 #include <ctime> 39 39 #include <sys/time.h> 40 40 #include <string> 41 41 #include <sstream> 42 #ifdef HAVE_CONFIG_H 43 #include "config.h" 44 #endif 42 45 43 46 namespace sc_core { -
sources/src/sc_trace.cc
r17 r27 41 41 #include "bit2string.h" 42 42 #include "hex2string.h" 43 #include "assert.h" 44 43 44 #include <cassert> 45 45 #include <list> 46 46 #include <cstdio> … … 48 48 #include <cstring> //strlen 49 49 50 #ifdef HAVE_CONFIG_H 51 #include "config.h" 52 #endif 53 50 54 //----------------------------------------- 51 55 … … 53 57 54 58 //----------------------------------------- 55 #ifdef PAT_TRACE_FORMAT59 #ifdef CONFIG_PAT_TRACE_FORMAT 56 60 57 61 extern "C" { … … 63 67 #include <cstdio> 64 68 65 #endif // PAT_TRACE_FORMAT69 #endif // CONFIG_PAT_TRACE_FORMAT 66 70 //----------------------------------------- 67 71 … … 165 169 { 166 170 sc_trace_file *tf = *ptf; 167 ASSERT(tf != NULL);171 assert(tf != NULL); 168 172 trace (*tf, part); 169 173 } … … 173 177 } 174 178 175 #if 179 #ifdef CONFIG_PAT_TRACE_FORMAT 176 180 static void 177 181 pat_set_value (char *buf, const signal2trace &s) … … 283 287 { 284 288 } 285 #endif // PAT_TRACE_FORMAT289 #endif // CONFIG_PAT_TRACE_FORMAT 286 290 287 291 static … … 414 418 else 415 419 vcd_signal_table = (tab_t*) malloc (sizeof (tab_t) * size); 416 #if 420 #ifdef CONFIG_DEBUG 417 421 if (vcd_signal_table == NULL) 418 422 { … … 486 490 vcd_trace_init (tf); 487 491 } else { 488 #if defined( DEBUG)492 #if defined(CONFIG_DEBUG) 489 493 if (vcd_signal_table == NULL) 490 494 { … … 580 584 &name) 581 585 { 582 #ifdef PAT_TRACE_FORMAT586 #ifdef CONFIG_PAT_TRACE_FORMAT 583 587 //exemple: 584 588 //DECLAR ("a", ":2", "X", IN, "3 downto 0", "" ); … … 630 634 #endif 631 635 DECLAR ((char*)(name.c_str ()), ":1", format, dir,(char *) downto.c_str(), "" ); 632 #endif // PAT_TRACE_FORMAT636 #endif // CONFIG_PAT_TRACE_FORMAT 633 637 } 634 638 -
sources/src/sc_uint.h
r22 r27 25 25 // ---------------------------------------------------------------------------- 26 26 27 #include "sc_nbdefs.h"27 #include "sc_nbdefs.h" 28 28 29 29 namespace sc_dt { -
sources/src/sc_uint_subref_r.cc
r1 r27 36 36 #include <iostream> 37 37 #include "sc_uint.h" 38 #ifdef HAVE_CONFIG_H 39 #include "config.h" 40 #endif 38 41 39 42 using namespace std; -
sources/src/sc_unsigned.h
r1 r27 18 18 // ---------------------------------------------------------------------------- 19 19 20 #include "sc_nbdefs.h"21 #include "sc_logic.h"20 #include "sc_nbdefs.h" 21 #include "sc_logic.h" 22 22 23 23 -
sources/src/sc_vcd_trace.cc
r12 r27 36 36 37 37 38 #include"sc_trace.h" 39 #include"sc_vcd_trace.h" 40 #include"sc_ver.h" 41 #include"internal.h" 42 #include"assert.h" 38 #include "sc_trace.h" 39 #include "sc_vcd_trace.h" 40 #include "sc_ver.h" 41 #include "internal.h" 43 42 44 #include<ctime> 45 #include<string> 43 #include <cassert> 44 #include <ctime> 45 #include <string> 46 47 #ifdef HAVE_CONFIG_H 48 #include "config.h" 49 #endif 46 50 47 51 //-----------------------------------------*/ … … 58 62 if (notrace) 59 63 return NULL; 60 ASSERT(name != NULL);64 assert(name != NULL); 61 65 string filename; 62 66 filename = name; -
sources/src/sc_ver.cc
r17 r27 40 40 #include <cstdlib> //exit 41 41 42 #ifdef HAVE_CONFIG_H 43 #include "config.h" 44 #endif 45 42 46 namespace sc_core { 43 47 … … 61 65 "\n" 62 66 " Cycle Accurate System Simulator\n" 63 #ifdef DEBUG67 #ifdef CONFIG_DEBUG 64 68 " DEBUG version\n" 65 69 #endif -
sources/src/schedulers.cc
r17 r27 35 35 */ 36 36 37 #include<iostream> 38 #include<algorithm> //std::sort 39 #include"sc_module.h" // method_process_t 40 #include"gen_code.h" // gen_scheduling_code_for_dynamic_link & gen_scheduling_code_for_static_func 41 #include"internal.h" // dump_all_graph 42 #include"graph_cass.h" // makegraph 43 #include"process_dependency.h" // MakeProcessDependencyList 44 #include"signal_dependency.h" // MakeSignalDependencyGraph 45 #include"mouchard_scheduling.h" // MakeMouchardScheduling 46 #include"graph_signals.h" // makegraph 47 //#include"module_hierarchy2dot.h" 48 #include"assert.h" 37 #include "sc_module.h" // method_process_t 38 #include "gen_code.h" // gen_scheduling_code_for_dynamic_link & gen_scheduling_code_for_static_func 39 #include "internal.h" // dump_all_graph 40 #include "graph_cass.h" // makegraph 41 #include "process_dependency.h" // MakeProcessDependencyList 42 #include "signal_dependency.h" // MakeSignalDependencyGraph 43 #include "mouchard_scheduling.h" // MakeMouchardScheduling 44 #include "graph_signals.h" // makegraph 45 //#include "module_hierarchy2dot.h" 46 47 #include <cassert> 48 #include <iostream> 49 #include <algorithm> //std::sort 50 51 #ifdef HAVE_CONFIG_H 52 #include "config.h" 53 #endif 49 54 50 55 using namespace std; … … 95 100 const method_process_t *a2) 96 101 { 97 ASSERT(a1 != NULL);98 ASSERT(a2 != NULL);102 assert(a1 != NULL); 103 assert(a2 != NULL); 99 104 sc_module *m1 = a1->module; 100 105 sc_module *m2 = a2->module; … … 114 119 addr1.func = a1->func; 115 120 addr2.func = a2->func; 116 ASSERT(addr1.addr_ll != addr2.addr_ll);121 assert(addr1.addr_ll != addr2.addr_ll); 117 122 if ( sizeof(SC_ENTRY_FUNC) == 4 ) { 118 123 return (addr1.addr_l < addr2.addr_l); … … 130 135 const method_process_t *a2) 131 136 { 132 ASSERT(a1 != NULL);133 ASSERT(a2 != NULL);137 assert(a1 != NULL); 138 assert(a2 != NULL); 134 139 return (a1->module < a2->module); 135 140 } … … 140 145 const method_process_t *a2) 141 146 { 142 ASSERT(a1 != NULL);143 ASSERT(a2 != NULL);147 assert(a1 != NULL); 148 assert(a2 != NULL); 144 149 union { 145 150 SC_ENTRY_FUNC func; … … 237 242 { 238 243 SignalDependencyGraph *sig_graph = MakeAcyclicSignalDependencyGraph (); 239 ASSERT(sig_graph != NULL);244 assert(sig_graph != NULL); 240 245 // Create the process evaluation list 241 246 ProcessDependencyList* process_list = MakeMouchardScheduling (*sig_graph); 242 ASSERT(process_list != NULL);247 assert(process_list != NULL); 243 248 244 249 if (dump_all_graph) … … 284 289 // Uses port dependancies like Dr. Mouchard. 285 290 ProcessDependencyList* process_list = BuchmannScheduling (); 286 base_name = gen_scheduling_code_for_dynamic_link (transition_func_list, moore_func_list,*process_list); 287 gen_scheduling_code_for_static_func (transition_func_list, moore_func_list, *process_list); 291 if (dynamic_link_of_scheduling_code) 292 base_name = gen_scheduling_code_for_dynamic_link (transition_func_list, moore_func_list,*process_list); 293 else 294 gen_scheduling_code_for_static_func (transition_func_list, moore_func_list, *process_list); 288 295 break; 289 296 } … … 295 302 // and does not use an event-driven scheduler. 296 303 ProcessDependencyList* process_list = MouchardScheduling (); 297 base_name = gen_scheduling_code_for_dynamic_link(transition_func_list, moore_func_list,*process_list); 298 gen_scheduling_code_for_static_func (transition_func_list, moore_func_list, *process_list); 304 if (dynamic_link_of_scheduling_code) 305 base_name = gen_scheduling_code_for_dynamic_link(transition_func_list, moore_func_list,*process_list); 306 else 307 gen_scheduling_code_for_static_func (transition_func_list, moore_func_list, *process_list); 299 308 break; 300 309 } … … 307 316 graph2dot("module_graph", *g); 308 317 strong_component_list_t *strong_list = strong_component (g); 309 base_name = gen_scheduling_code_for_dynamic_link(transition_func_list, moore_func_list,*strong_list); 310 gen_scheduling_code_for_quasistatic_func (transition_func_list, moore_func_list, *strong_list); 318 if (dynamic_link_of_scheduling_code) 319 base_name = gen_scheduling_code_for_dynamic_link(transition_func_list, moore_func_list,*strong_list); 320 else 321 gen_scheduling_code_for_quasistatic_func (transition_func_list, moore_func_list, *strong_list); 311 322 break; 312 323 } -
sources/src/schedulers.h
r1 r27 13 13 #define __SCHEDULERS_H__ 14 14 15 #include "sc_fwd.h"16 #include "sc_time.h"15 #include "sc_fwd.h" 16 #include "sc_time.h" 17 17 18 18 namespace sc_core { -
sources/src/serialization.cc
r12 r27 35 35 36 36 37 #include<map> 38 #include<fstream> 39 //#include<vector> // save_module_hierarchy 40 41 #include"internal_ext.h" // tab_t 42 #include"serialization.h" 43 #include"entity.h" 44 #include"sc_module.h" 45 #include"sc_object.h" 46 #include"hex2string.h" 47 #include"assert.h" 37 #include "internal_ext.h" // tab_t 38 #include "serialization.h" 39 #include "entity.h" 40 #include "sc_module.h" 41 #include "sc_object.h" 42 #include "hex2string.h" 43 44 #include <cassert> 45 #include <map> 46 #include <fstream> 47 //#include <vector> // save_module_hierarchy 48 49 #ifdef HAVE_CONFIG_H 50 #include "config.h" 51 #endif 48 52 49 53 using namespace std; … … 84 88 int bit_number) 85 89 { 86 ASSERT(bit_number <= 64);90 assert(bit_number <= 64); 87 91 if (bit_number == 1) { 88 92 bool v = *((const bool*) val); … … 140 144 save_fct_t1 fct) 141 145 { 142 // ASSERT(fct != NULL);146 //assert(fct != NULL); 143 147 //sc_module2save_fct_t1::value_type pair(&mod,fct); 144 148 //save_handler_table.insert (pair); … … 158 162 const sc_module *mod = it->first; 159 163 save_fct_t1 fct = it->second; 160 ASSERT(mod != NULL);161 // ASSERT(fct != NULL);164 assert(mod != NULL); 165 // assert(fct != NULL); 162 166 //o << mod->name () << endl; 163 167 fprintf (o,"module\n%s\n",mod->name ()); … … 185 189 file.close (); 186 190 FILE *f = fopen (filename, "a+"); 187 ASSERT(f != NULL);191 assert(f != NULL); 188 192 save_modules (f); 189 193 fclose (f); -
sources/src/serialization.h
r1 r27 13 13 #define __SERIALIZATION_H__ 14 14 15 #include "serialization_ext.h"16 #include "sc_fwd.h"15 #include "serialization_ext.h" 16 #include "sc_fwd.h" 17 17 18 18 namespace sc_core { -
sources/src/serialization_ext.h
r1 r27 37 37 #define __SERIALIZATION_EXT_H__ 38 38 39 #include <iostream>40 #include "sc_fwd.h"39 #include <iostream> 40 #include "sc_fwd.h" 41 41 42 42 namespace sc_core { -
sources/src/signal_dependency.cc
r12 r27 43 43 #include "sc_module.h" 44 44 #include "sc_ver_ext.h" 45 #ifdef HAVE_CONFIG_H 46 #include "config.h" 47 #endif 45 48 46 49 using namespace std; -
sources/src/simplify_string.cc
r1 r27 35 35 36 36 #include "simplify_string.h" 37 #ifdef HAVE_CONFIG_H 38 #include "config.h" 39 #endif 37 40 38 41 using namespace std; -
sources/src/systemc
r4 r27 29 29 #include"sc_vcd_trace.h" 30 30 #include"sc_pat_trace.h" 31 #include"endianness.h"32 31 33 32 #endif
Note: See TracChangeset
for help on using the changeset viewer.