Changeset 8 for branches/with_autoconf/src
- Timestamp:
- Jun 25, 2008, 1:08:04 PM (16 years ago)
- Location:
- branches/with_autoconf/src
- Files:
-
- 1 added
- 6 deleted
- 69 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/with_autoconf/src/alias.cc
r3 r8 33 33 */ 34 34 35 #include"alias.h" 36 #include<string> 37 //#include<cstdarg.h> 38 //#include<cstdio.h> 39 #include<iostream> 35 #include "alias.h" 36 #include <string> 37 //#include <cstdarg.h> 38 //#include <cstdio.h> 39 #include <iostream> 40 #ifdef HAVE_CONFIG_H 41 #include "config.h" 42 #endif 40 43 41 44 const char * alias () -
branches/with_autoconf/src/bit2string.cc
r1 r8 41 41 #include <stdlib.h> 42 42 #include <iostream> 43 #ifdef HAVE_CONFIG_H 44 #include "config.h" 45 #endif 43 46 44 47 using namespace std; -
branches/with_autoconf/src/casc.h
r4 r8 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 -
branches/with_autoconf/src/data_field.h
r1 r8 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 -
branches/with_autoconf/src/dump_dot.cc
r4 r8 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; -
branches/with_autoconf/src/dump_used_env.cc
r1 r8 35 35 36 36 #include "dump_used_env.h" 37 #ifdef HAVE_CONFIG_H 38 #include "config.h" 39 #endif 37 40 38 41 std::string -
branches/with_autoconf/src/dump_used_options.cc
r1 r8 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 -
branches/with_autoconf/src/entity.cc
r1 r8 35 35 */ 36 36 37 #include<iomanip> 38 #include<list> 39 #include<map> 40 #include<vector> 41 42 #include"assert.h" 43 #include"entity.h" 44 #include"sc_port.h" 45 #include"sc_signal.h" 46 #include"sc_module.h" 37 #include <iomanip> 38 #include <list> 39 #include <map> 40 #include <vector> 41 42 #include <cassert> 43 #include "entity.h" 44 #include "sc_port.h" 45 #include "sc_signal.h" 46 #include "sc_module.h" 47 #ifdef HAVE_CONFIG_H 48 #include "config.h" 49 #endif 47 50 48 51 using namespace std; … … 174 177 typedef std::map<const tab_t *,equi_list_t::iterator,predic4tab_t2equi_t_t> tab_t2equi_it_t; 175 178 static tab_t2equi_it_t tab2equi_map; 176 ASSERT(pointer != NULL);179 assert(pointer != NULL); 177 180 178 181 // boost … … 239 242 { 240 243 equi_t::const_iterator top_iter = e.begin (); 241 #ifdef DEBUG244 #ifdef CONFIG_DEBUG 242 245 if (top_iter == e.end ()) { 243 246 cerr << "Internal error : no signal in " << e << endl; … … 356 359 } 357 360 358 #if defined(DUMP_SIGNAL S_STATS)361 #if defined(DUMP_SIGNAL_STATS) 359 362 static unsigned int equi_real_size; 360 363 #endif … … 388 391 unsigned int table_size = get_sizeof_signals_table (); 389 392 equi_table = new tab_t[table_size]; //(0xCD); 390 #if defined(DUMP_SIGNAL S_STATS)393 #if defined(DUMP_SIGNAL_STATS) 391 394 equi_real_size = table_size; 392 395 #endif … … 402 405 bind_equi_to_table (equi_t &e, tab_t * const pointer) 403 406 { 404 ASSERT(pointer != NULL);407 assert(pointer != NULL); 405 408 equi_t::iterator i; 406 409 for (i = e.begin (); i != e.end (); ++i) { … … 454 457 o << ")"; 455 458 #else 456 ASSERT(e.object != NULL);459 assert(e.object != NULL); 457 460 o << e.object->name (); 458 461 #endif … … 493 496 print_table_stats (ostream &o) 494 497 { 495 #if defined(DUMP_SIGNAL S_STATS)498 #if defined(DUMP_SIGNAL_STATS) 496 499 int nb_reg = 0; 497 500 int nb_sig = 0; … … 536 539 } 537 540 const entity &ent = *(eq.begin ()); 538 #ifdef DEBUG541 #ifdef CONFIG_DEBUG 539 542 if (ent.type != sc_core::entity::SIGNAL) 540 543 exit(28); … … 543 546 const char *sig_name = ent.object->name (); 544 547 const char *sep = strchr (sig_name,'.'); 545 #ifdef DEBUG548 #ifdef CONFIG_DEBUG 546 549 if (sep == NULL) { 547 550 exit (30); … … 594 597 #endif 595 598 596 #if defined(DUMP_SIGNAL S_STATS)599 #if defined(DUMP_SIGNAL_STATS) 597 600 static unsigned int equi_real_size; 598 601 #endif … … 602 605 { 603 606 #if 0 604 //defined( DEBUG)607 //defined(CONFIG_DEBUG) 605 608 equi_list_t::iterator x_equi = get_equi (x); 606 609 if ((x_equi != equi_list.end())) { … … 639 642 tbind (sc_port_base &x,T &y) 640 643 { 641 // ASSERT(x.get_pointer () != NULL); // x pointer may be NULL642 // ASSERT(y.get_pointer () != NULL); // y pointer may be NULL644 // assert(x.get_pointer () != NULL); // x pointer may be NULL 645 // assert(y.get_pointer () != NULL); // y pointer may be NULL 643 646 equi_list_t::iterator x_equi = get_equi (x); 644 647 equi_list_t::iterator y_equi = get_equi (y); -
branches/with_autoconf/src/entity.h
r1 r8 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 { -
branches/with_autoconf/src/fsm_rules.h
r1 r8 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 { -
branches/with_autoconf/src/gen_code.cc
r1 r8 35 35 */ 36 36 37 #include<stdio.h> 38 #include<stdlib.h> 39 #include<iostream> 40 #include<fstream> 41 42 #include"internal.h" 43 #include"gen_code.h" 44 #include"sc_module.h" 45 #include"sc_ver.h" 46 #include"process_dependency.h" 47 48 #ifdef CHECK_FSM_RULES 49 #define fsm_check_flag "-DCHECK_FSM_RULES" 37 #include <stdio.h> 38 #include <stdlib.h> 39 #include <iostream> 40 #include <fstream> 41 42 #include "internal.h" 43 #include "gen_code.h" 44 #include "sc_module.h" 45 #include "sc_ver.h" 46 #include "process_dependency.h" 47 #ifdef HAVE_CONFIG_H 48 #include "config.h" 49 #endif 50 51 #ifdef CONFIG_CHECK_FSM_RULES 52 #include "fsm_rules.h" 53 #define fsm_check_flag "-DCONFIG_CHECK_FSM_RULES" 50 54 #else 51 55 #define fsm_check_flag 52 56 #endif 53 57 54 #define casc_cflags CFLAGS " " fsm_check_flag 55 56 #if defined(darwin) 57 #define macosx 58 #endif 58 #define casc_cflags GENERATED_MODULE_CFLAGS " " fsm_check_flag 59 59 60 60 using namespace std; … … 86 86 << m.module->name() << "->" << m.name << "()\\n\");\n"; 87 87 o << " p.integer = " << func << ";\n"; 88 #if CPP_CALL88 #ifdef CPP_CALL 89 89 o << " (((sc_module*)(" << m.module << "))->*(p.pmf)) (); /* " 90 90 << m.module->name () << "->" << m.name << "() */\n"; … … 138 138 } 139 139 140 #ifdef DEBUG140 #ifdef CONFIG_DEBUG 141 141 cerr << "opened temporary filename : " << temp << "\n"; 142 142 #endif … … 263 263 264 264 o << "// generated by " << sc_version () << endl 265 << "#include <casc.h>\n\n"266 << "#include <stdio.h>\n\n"267 // << "#include <iostream>\n\n"265 << "#include <casc.h>\n\n" 266 << "#include <stdio.h>\n\n" 267 // << "#include <iostream>\n\n" 268 268 << "namespace sc_core {\n" 269 269 << " typedef void (sc_module::*SC_ENTRY_FUNC)();\n" … … 324 324 325 325 o << "// generated by " << sc_version () << endl 326 << "#include <casc.h>\n\n"327 << "#include <stdio.h>\n\n"328 // << "#include <iostream>\n\n"326 << "#include <casc.h>\n\n" 327 << "#include <stdio.h>\n\n" 328 // << "#include <iostream>\n\n" 329 329 << "namespace sc_core {\n" 330 330 << " typedef void (sc_module::*SC_ENTRY_FUNC)();\n" … … 372 372 // const char *target_arch = getenv ("TARGET_ARCH"); 373 373 const char *default_compiler = 374 #if CPP_CALL374 #ifdef CPP_CALL 375 375 "g++"; 376 376 #else … … 413 413 /* COMPILE */ 414 414 /* ******* */ 415 #if defined(macosx) 416 sprintf(compil_str, 417 "(cd %s ; %s %s -DSCHEDULING_BY_CASC -I%s/include -fno-common -dynamic -o %s -c %s)", 418 temporary_dir, 419 compiler, 420 casc_cflags, 421 systemc_dir, 422 target_name, 423 source_name); 424 // sprintf(compil_str,""); 425 #elif defined(linux) 426 sprintf(compil_str, 427 "(cd %s ; libtool --mode=compile %s %s -DSCHEDULING_BY_CASC -I%s/include -shared -o %s -c %s)", 428 temporary_dir, 429 compiler, 430 casc_cflags, 431 systemc_dir, 432 target_name, 433 source_name); 415 const char *commandline_template = 416 #if defined(CONFIG_OS_DARWIN) 417 "(cd %s ;" " %s %s -DSCHEDULING_BY_CASC -I%s/include -fno-common -dynamic -o %s -c %s)" 418 #elif defined(CONFIG_OS_LINUX) 419 "(cd %s ; libtool --mode=compile %s %s -DSCHEDULING_BY_CASC -I%s/include -shared -o %s -c %s)" 434 420 #else 435 sprintf(compil_str, 436 "(cd %s ; %s %s -DSCHEDULING_BY_CASC -I%s/include -dynamiclib -o %s -c %s)", 437 temporary_dir, 438 compiler, 439 casc_cflags, 440 systemc_dir, 441 target_name, 442 source_name); 443 #endif 421 "(cd %s ;" " %s %s -DSCHEDULING_BY_CASC -I%s/include -dynamiclib -o %s -c %s)" 422 #endif 423 ; 424 sprintf(compil_str, 425 commandline_template, 426 temporary_dir, 427 compiler, 428 casc_cflags, 429 systemc_dir, 430 target_name, 431 source_name); 444 432 445 433 if (dump_stage) … … 456 444 sprintf (target_name, "%s.so", base_name); 457 445 458 #if defined(linux)446 #ifdef CONFIG_OS_LINUX 459 447 sprintf (source_name, "%s.lo", base_name); 460 448 sprintf(compil_str, "(cd %s ; pwd ; libtool --mode=link %s %s -shared -rdynamic -o %s %s)", /* -L. -L%s/lib-%s */ … … 555 543 for (i = 0; i < n; ++i) 556 544 { 557 #if 0 //defined( DEBUG)545 #if 0 //defined(CONFIG_DEBUG) 558 546 sc_module *m = (sc_module*)(fc.instance[i]); 559 547 cerr << m->name () << endl; … … 570 558 void static_simulate_1_cycle (void) 571 559 { 572 #ifdef C HECK_FSM_RULES560 #ifdef CONFIG_CHECK_FSM_RULES 573 561 casc_fsm_step = TRANSITION; 574 562 #endif 575 563 call_functions (pf[0]); // transition 576 564 update (); 577 #ifdef C HECK_FSM_RULES565 #ifdef CONFIG_CHECK_FSM_RULES 578 566 casc_fsm_step = GEN_MOORE; 579 567 #endif 580 568 call_functions (pf[1]); // moore generation 581 #ifdef C HECK_FSM_RULES569 #ifdef CONFIG_CHECK_FSM_RULES 582 570 casc_fsm_step = GEN_MEALY; 583 571 #endif 584 572 call_functions (pf[2]); // mealy generation 585 #ifdef C HECK_FSM_RULES573 #ifdef CONFIG_CHECK_FSM_RULES 586 574 casc_fsm_step = STIMULI; 587 575 #endif … … 629 617 void quasistatic_simulate_1_cycle (void) 630 618 { 631 #ifdef C HECK_FSM_RULES619 #ifdef CONFIG_CHECK_FSM_RULES 632 620 casc_fsm_step = TRANSITION; 633 621 #endif … … 639 627 } 640 628 update (); 641 #ifdef C HECK_FSM_RULES629 #ifdef CONFIG_CHECK_FSM_RULES 642 630 casc_fsm_step = GEN_MOORE; 643 631 #endif … … 647 635 Call (m); 648 636 } 649 #ifdef C HECK_FSM_RULES637 #ifdef CONFIG_CHECK_FSM_RULES 650 638 casc_fsm_step = GEN_MEALY; 651 639 #endif 652 640 quasistatic_mealy_generation (); 653 #ifdef C HECK_FSM_RULES641 #ifdef CONFIG_CHECK_FSM_RULES 654 642 casc_fsm_step = STIMULI; 655 643 #endif -
branches/with_autoconf/src/gen_code.h
r1 r8 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 -
branches/with_autoconf/src/global_functions.cc
r4 r8 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 -
branches/with_autoconf/src/global_functions.h
r4 r8 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 **); -
branches/with_autoconf/src/graph.cc
r1 r8 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); -
branches/with_autoconf/src/graph_cass.cc
r1 r8 129 129 #include "simplify_string.h" // simplify_string 130 130 #include "sc_ver_ext.h" // sc_version for dumping to DOT 131 #ifdef HAVE_CONFIG_H 132 #include "config.h" 133 #endif 131 134 132 135 using namespace std; -
branches/with_autoconf/src/graph_signals.cc
r1 r8 139 139 #include "sc_module.h" 140 140 #include "sc_port.h" 141 #ifdef HAVE_CONFIG_H 142 #include "config.h" 143 #endif 141 144 142 145 using namespace std; -
branches/with_autoconf/src/hex2string.cc
r1 r8 41 41 #include <stdlib.h> 42 42 #include <iostream> 43 #ifdef HAVE_CONFIG_H 44 #include "config.h" 45 #endif 43 46 44 47 using namespace std; -
branches/with_autoconf/src/methodprocess_dependency.cc
r1 r8 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) -
branches/with_autoconf/src/module_hierarchy.cc
r1 r8 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 41 44 using namespace std; … … 71 74 return; //obj_list = &top_level_objects; 72 75 else { 73 ASSERT(parent != &obj);76 assert(parent != &obj); 74 77 const sc_object *pobj = (const sc_module *) parent; 75 78 obj_list = &(object2childs[pobj]); -
branches/with_autoconf/src/module_hierarchy2dot.cc
r1 r8 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) { -
branches/with_autoconf/src/mouchard_scheduling.cc
r1 r8 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; -
branches/with_autoconf/src/port_dependency.cc
r1 r8 44 44 #include "sc_port.h" 45 45 #include "sc_ver_ext.h" 46 #ifdef HAVE_CONFIG_H 47 #include "config.h" 48 #endif 46 49 47 50 using namespace std; … … 107 110 p.destination = &b; 108 111 aPortDependencyGraph.push_back (p); 109 #if DUMP_PORT_DEPENDENCY112 #ifdef DUMP_PORT_DEPENDENCY 110 113 if (a) { 111 114 cerr << "'" << ((sc_object&)b).name() -
branches/with_autoconf/src/process_dependency.cc
r1 r8 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; -
branches/with_autoconf/src/sc_bigint.h
r1 r8 22 22 // ---------------------------------------------------------------------------- 23 23 24 #include "sc_nbdefs.h"24 #include "sc_nbdefs.h" 25 25 26 26 namespace sc_dt { -
branches/with_autoconf/src/sc_biguint.h
r1 r8 18 18 // ---------------------------------------------------------------------------- 19 19 20 #include "sc_nbdefs.h"20 #include "sc_nbdefs.h" 21 21 22 22 namespace sc_dt { -
branches/with_autoconf/src/sc_bit.h
r1 r8 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 // ---------------------------------------------------------------------------- -
branches/with_autoconf/src/sc_bv.h
r1 r8 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 { -
branches/with_autoconf/src/sc_clock.cc
r1 r8 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 } -
branches/with_autoconf/src/sc_clock.h
r1 r8 14 14 #define __SC_CLOCK_H__ 15 15 16 #include "sc_clock_ext.h"16 #include "sc_clock_ext.h" 17 17 18 18 -
branches/with_autoconf/src/sc_event.cc
r1 r8 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; -
branches/with_autoconf/src/sc_event.h
r1 r8 13 13 #define __SC_EVENT_H__ 14 14 15 #include "sc_fwd.h"15 #include "sc_fwd.h" 16 16 17 17 namespace sc_core { -
branches/with_autoconf/src/sc_event_finder.cc
r4 r8 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 { -
branches/with_autoconf/src/sc_event_finder.h
r4 r8 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 { -
branches/with_autoconf/src/sc_int.h
r1 r8 28 28 // ---------------------------------------------------------------------------- 29 29 30 #include "sc_nbdefs.h"30 #include "sc_nbdefs.h" 31 31 32 32 namespace sc_dt { -
branches/with_autoconf/src/sc_interface.cc
r1 r8 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 41 44 42 45 using namespace std; … … 105 108 { 106 109 interface2infos_t::iterator i = interface2infos.find (this); 107 #ifdef DEBUG110 #ifdef CONFIG_DEBUG 108 111 if (i == interface2infos.end ()) { 109 112 cerr << "Internal error : can't find data size of " << this << "\n"; … … 118 121 { 119 122 interface2infos_t::iterator i = interface2infos.find (this); 120 #ifdef DEBUG123 #ifdef CONFIG_DEBUG 121 124 if (i == interface2infos.end ()) { 122 125 cerr << "Internal error : can't find default event of " << this << "\n"; -
branches/with_autoconf/src/sc_interface.h
r1 r8 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 { -
branches/with_autoconf/src/sc_logic.cc
r1 r8 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 { -
branches/with_autoconf/src/sc_logic.h
r1 r8 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 { -
branches/with_autoconf/src/sc_lv.h
r1 r8 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 -
branches/with_autoconf/src/sc_main.cc
r4 r8 35 35 */ 36 36 37 #include<sstream> 38 #include<string> 39 #include<list> 40 #include<set> 41 #include"internal.h" 42 #include"global_functions.h" 43 #include"sc_ver.h" 44 #include"sc_module.h" 45 #include"sc_signal.h" // pending_write_vector 46 #include"dump_dot.h" 47 #include"dump_used_options.h" 48 #include"dump_used_env.h" 49 #include"assert.h" 37 #include <sstream> 38 #include <string> 39 #include <list> 40 #include <set> 41 #include "internal.h" 42 #include "global_functions.h" 43 #include "sc_ver.h" 44 #include "sc_module.h" 45 #include "sc_signal.h" // pending_write_vector 46 #include "dump_dot.h" 47 #include "dump_used_options.h" 48 #include "dump_used_env.h" 49 #include <cassert> 50 #ifdef HAVE_CONFIG_H 51 #include "config.h" 52 #endif 50 53 51 54 // … … 59 62 60 63 bool check_port_dependencies = false; 64 #ifdef CONFIG_DEFAULT_RUNTIME_COMPILATION 65 bool dynamic_link_of_scheduling_code = true; 66 #else 61 67 bool dynamic_link_of_scheduling_code = false; 68 #endif 62 69 bool dump_netlist_info = false; 63 70 bool dump_funclist_info = false; … … 107 114 switch (scheduling_method) { 108 115 case CASS_SCHEDULING : 109 ASSERT(use_port_dependency == false);116 assert(use_port_dependency == false); 110 117 break; 111 118 case BUCHMANN_SCHEDULING : … … 124 131 exit (33); 125 132 } 126 ASSERT(use_port_dependency || use_sensitivity_list);133 assert(use_port_dependency || use_sensitivity_list); 127 134 } 128 135 -
branches/with_autoconf/src/sc_module.cc
r1 r8 49 49 #include "sc_clock.h" // is_clock 50 50 #include "entity.h" 51 #include "assert.h" 51 #include <cassert> 52 #ifdef HAVE_CONFIG_H 53 #include "config.h" 54 #endif 52 55 53 56 // … … 161 164 sensitivity_list_t::iterator i; 162 165 for (i = sensitivity_list.begin (); i != sensitivity_list.end (); ++i) { 163 #if defined( _DEBUG)166 #if defined(CONFIG_DEBUG) && 0 164 167 if (i->get_interface() == NULL) 165 168 { … … 239 242 sensitive (this) 240 243 { 241 ASSERT(nm != NULL);244 assert(nm != NULL); 242 245 #if 0 243 246 cerr << "sc_module constructor with const char * parameter\n"; … … 499 502 if (m_pushed == false) 500 503 return; 501 ASSERT(sc_core::module_name_stack.empty () == false);504 assert(sc_core::module_name_stack.empty () == false); 502 505 sc_core::module_name_stack.pop_back (); 503 506 modules_stack.pop (); … … 505 508 cout << "~sc_module_name <- " << m_name << endl; 506 509 #endif 507 ASSERT(temp_list.empty () == false);510 assert(temp_list.empty () == false); 508 511 sc_module *last1 = temp_list.back(); 509 512 temp_list.pop_back(); … … 527 530 if (m.dont_initialize == false) 528 531 { 529 ASSERT(m.module != NULL);530 #if 532 assert(m.module != NULL); 533 #ifdef CONFIG_DEBUG 531 534 std::cerr << "Warning : SystemCASS doesn't perform SC_METHOD(S) initializations.\n" 532 535 << "Please turn off automatic initialization for '" << m.name -
branches/with_autoconf/src/sc_module.h
r1 r8 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 { -
branches/with_autoconf/src/sc_module_ext.h
r1 r8 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 { -
branches/with_autoconf/src/sc_module_name.h
r1 r8 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 { -
branches/with_autoconf/src/sc_numrep.cc
r1 r8 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 { -
branches/with_autoconf/src/sc_object.cc
r1 r8 39 39 #include <map> 40 40 41 #include "assert.h"41 #include <cassert> 42 42 #include "sc_object.h" 43 43 //#include "sc_port.h" … … 45 45 #include "sc_signal.h" 46 46 #include "module_hierarchy.h" 47 #ifdef HAVE_CONFIG_H 48 #include "config.h" 49 #endif 47 50 48 51 using namespace std; … … 70 73 // out += "."; 71 74 } 72 // ASSERT(name != NULL);75 // assert(name != NULL); 73 76 if (name) 74 77 out += name; … … 202 205 { 203 206 object2name_t::iterator i = object2fullname.find (this); 204 #ifdef DEBUG207 #ifdef CONFIG_DEBUG 205 208 if (i == object2fullname.end ()) { 206 209 cerr << "Internal error : can't find name of " << this << "\n"; … … 216 219 /* 217 220 object2name_t::iterator i = object2fullname.find (this); 218 #ifdef DEBUG221 #ifdef CONFIG_DEBUG 219 222 if (i == object2fullname.end ()) { 220 223 cerr << "Internal error : can't find name of " << this << "\n"; … … 234 237 string out; 235 238 sc_object* obj = *it; 236 ASSERT(obj != NULL);239 assert(obj != NULL); 237 240 build_full_name (out, *obj); 238 241 } … … 242 245 { 243 246 object2infos_t::iterator i = object2infos.find (this); 244 #ifdef DEBUG247 #ifdef CONFIG_DEBUG 245 248 if (i == object2infos.end ()) { 246 249 cerr << "Internal error : can't find kind of " << this << "\n"; -
branches/with_autoconf/src/sc_pat_trace.cc
r1 r8 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<time.h> 44 #include<string> 43 #include <time.h> 44 #include <string> 45 #ifdef HAVE_CONFIG_H 46 #include "config.h" 47 #endif 45 48 46 #ifdef PAT_TRACE_FORMAT49 #ifdef CONFIG_PAT_TRACE_FORMAT 47 50 48 51 //----------------------------------------- -
branches/with_autoconf/src/sc_port.cc
r4 r8 36 36 37 37 38 #include<iomanip> 39 #include<list> 40 #include<map> 41 #include<vector> 42 43 #include"sc_port.h" 44 #include"sc_signal.h" 45 #include"sc_module.h" 46 #include"entity.h" 47 #include"global_functions.h" 48 #include"assert.h" 38 #include <iomanip> 39 #include <list> 40 #include <map> 41 #include <vector> 42 43 #include "sc_port.h" 44 #include "sc_signal.h" 45 #include "sc_module.h" 46 #include "entity.h" 47 #include "global_functions.h" 48 #include <cassert> 49 #ifdef HAVE_CONFIG_H 50 #include "config.h" 51 #endif 49 52 50 53 extern "C" { … … 56 59 using namespace std; 57 60 58 #ifdef C HECK_FSM_RULES59 #include "fsm_rules.h"61 #ifdef CONFIG_CHECK_FSM_RULES 62 #include "fsm_rules.h" 60 63 namespace sc_core { 61 64 casc_fsm_step_t casc_fsm_step = ELABORATION; … … 110 113 sc_port_base::init () 111 114 { 112 #ifdef DEBUG115 #ifdef CONFIG_DEBUG 113 116 if (modules_stack.empty ()) { 114 117 cerr << "Internal error : modules stack empty\n"; … … 235 238 #endif 236 239 #define iter (sc_core::pending_write_vector[i]) 237 #ifdef DEBUG240 #ifdef CONFIG_DEBUG 238 241 if (iter.pointer == NULL) { 239 242 cerr << "Internal error : trying to apply a posted write from an unassigned signal/port\n"; … … 257 260 cerr << "done.\n"; 258 261 #endif 259 #if defined(C HECK_MULTIWRITING2REGISTER)262 #if defined(CONFIG_CHECK_MULTIWRITING2REGISTER) 260 263 sc_core::pending_writing2register_clear (); 261 264 #endif … … 312 315 { 313 316 const tab_t *pointer = port.get_pointer (); 314 // ASSERT(pointer != NULL);317 //assert(pointer != NULL); 315 318 if (pointer == NULL) 316 319 return false; // case : sc_in not bound … … 345 348 { 346 349 /*const*/ sc_port_base *port = i->first; 347 ASSERT(port != NULL);350 assert(port != NULL); 348 351 check_port (*port); 349 352 } … … 352 355 } 353 356 354 #if defined(C HECK_MULTIWRITING2REGISTER)357 #if defined(CONFIG_CHECK_MULTIWRITING2REGISTER) 355 358 typedef set<const tab_t*> pending_writing2register_set_t; 356 359 pending_writing2register_set_t pending_writing2register_set; -
branches/with_autoconf/src/sc_port.h
r1 r8 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> -
branches/with_autoconf/src/sc_port_ext.h
r4 r8 15 15 16 16 // Define registers writing method 17 #include <iostream>18 #include "sc_fwd.h"19 #include "sc_nbdefs.h"20 //#include "sc_event_finder.h"21 #include "sc_event.h"22 #include "sc_object.h"23 #include "sc_interface.h"24 #include "internal_ext.h"25 #include "port_dependency_ext.h"26 #include "fsm_rules.h"17 #include <iostream> 18 #include "sc_fwd.h" 19 #include "sc_nbdefs.h" 20 //#include "sc_event_finder.h" 21 #include "sc_event.h" 22 #include "sc_object.h" 23 #include "sc_interface.h" 24 #include "internal_ext.h" 25 #include "port_dependency_ext.h" 26 #include "fsm_rules.h" 27 27 28 28 … … 53 53 ///////////////////// DEPRECATED 54 54 // C ANSI-only since it is needed to link with extern "C" 55 // this declaration is not in casc.h since the C HECK_FSM_RULES macro55 // this declaration is not in casc.h since the CONFIG_CHECK_FSM_RULES macro 56 56 // is not defined. 57 57 … … 183 183 << " on signal " << name () << "\n"; 184 184 #endif 185 #ifdef C HECK_FSM_RULES185 #ifdef CONFIG_CHECK_FSM_RULES 186 186 if (casc_fsm_step == GEN_MOORE) { 187 187 std::cerr << "FSM rules error : trying to read on input port '" … … 293 293 << " on signal " << name () << "\n"; 294 294 #endif 295 #ifdef C HECK_FSM_RULES295 #ifdef CONFIG_CHECK_FSM_RULES 296 296 if (casc_fsm_step == GEN_MOORE) { 297 297 std::cerr << "FSM rules error : trying to read on input/output port " … … 315 315 << " on in/out port (writing into a signal) '" << name () << "'\n"; 316 316 #endif 317 #ifdef C HECK_FSM_RULES317 #ifdef CONFIG_CHECK_FSM_RULES 318 318 if ((casc_fsm_step != GEN_MOORE) && ( casc_fsm_step != GEN_MEALY)) { 319 319 std::cerr << "FSM rules error : trying to write on output port " … … 324 324 #endif 325 325 // T& ref = *(T*)(get_pointer()); 326 #if defined(C HECK_MULTIWRITING2PORT)326 #if defined(CONFIG_CHECK_MULTIWRITING2PORT) 327 327 check_multiwriting2port (); 328 328 #endif -
branches/with_autoconf/src/sc_sensitive.cc
r1 r8 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; -
branches/with_autoconf/src/sc_sensitive.h
r1 r8 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 { -
branches/with_autoconf/src/sc_signal.h
r1 r8 15 15 16 16 // Define registers writing method 17 #include<iostream> 18 #include"sc_fwd.h" 19 #include"sc_nbdefs.h" 20 //#include"sc_event_finder.h" 21 //#include"sc_event.h" 22 #include"sc_time.h" // SC_ZERO_TIME 23 #include"sc_object.h" 24 #include"sc_interface.h" 25 #include"internal_ext.h" 17 #include <iostream> 18 #include "sc_fwd.h" 19 #include "sc_nbdefs.h" 20 //#include "sc_event_finder.h" 21 //#include "sc_event.h" 22 #include "sc_time.h" // SC_ZERO_TIME 23 #include "sc_object.h" 24 #include "sc_interface.h" 25 #include "internal_ext.h" 26 27 #ifdef CONFIG_CHECK_FSM_RULES 26 28 #include "fsm_rules.h" 29 #endif 27 30 28 31 namespace sc_core { … … 41 44 ///////////////////// DEPRECATED 42 45 // C ANSI-only since it is needed to link with extern "C" 43 // this declaration is not in casc.h since the C HECK_FSM_RULES macro46 // this declaration is not in casc.h since the CONFIG_CHECK_FSM_RULES macro 44 47 // is not defined. 45 48 … … 97 100 post_multiwrite (pointer_,value_); 98 101 } else { 99 #if defined( DEBUG)102 #if defined(CONFIG_DEBUG) 100 103 if (pending_write_vector_nb >= pending_write_vector_capacity) { 101 104 //if (pending_write_vector_nb >= pending_write_vector_capacity * sizeof(pending_write)) { … … 105 108 exit (-1); 106 109 } 107 #endif // DEBUG110 #endif // CONFIG_DEBUG 108 111 pending_write_vector[pending_write_vector_nb].pointer = pointer_; 109 112 // pending_write_vector[pending_write_vector_nb++].value = *(reinterpret_cast<const base_type*const>(&value_)); => bug ! … … 244 247 << " on signal " << name () << "\n"; 245 248 #endif 246 #ifdef C HECK_FSM_RULES249 #ifdef CONFIG_CHECK_FSM_RULES 247 250 // we can read value from sc_signal type (used like a register) at any time 248 251 #endif … … 256 259 sc_signal<T>::write( const data_type& value_ ) 257 260 { 258 #ifdef C HECK_FSM_RULES261 #ifdef CONFIG_CHECK_FSM_RULES 259 262 if ((casc_fsm_step != TRANSITION) 260 263 && ( casc_fsm_step != STIMULI)) { … … 265 268 } 266 269 #endif 267 #ifdef DEBUG270 #ifdef CONFIG_DEBUG 268 271 if (get_pointer() == NULL) 269 272 { … … 272 275 } 273 276 #endif 274 #ifdef C HECK_MULTIWRITING2REGISTER277 #ifdef CONFIG_CHECK_MULTIWRITING2REGISTER 275 278 pending_writing2register_record_and_check (get_pointer ()); 276 279 #endif -
branches/with_autoconf/src/sc_time.cc
r4 r8 35 35 36 36 37 #include "sc_time.h"37 #include "sc_time.h" 38 38 #include <time.h> 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 { -
branches/with_autoconf/src/sc_trace.cc
r1 r8 41 41 #include "bit2string.h" 42 42 #include "hex2string.h" 43 #include "assert.h"43 #include <cassert> 44 44 45 45 #include <list> 46 46 #include <stdio.h> 47 47 #include <iostream> 48 #ifdef HAVE_CONFIG_H 49 #include "config.h" 50 #endif 48 51 49 52 //----------------------------------------- … … 52 55 53 56 //----------------------------------------- 54 #ifdef PAT_TRACE_FORMAT57 #ifdef CONFIG_PAT_TRACE_FORMAT 55 58 56 59 extern "C" { … … 62 65 #include <stdio.h> 63 66 64 #endif // PAT_TRACE_FORMAT67 #endif // CONFIG_PAT_TRACE_FORMAT 65 68 //----------------------------------------- 66 69 … … 164 167 { 165 168 sc_trace_file *tf = *ptf; 166 ASSERT(tf != NULL);169 assert(tf != NULL); 167 170 trace (*tf, part); 168 171 } … … 172 175 } 173 176 174 #if 177 #ifdef CONFIG_PAT_TRACE_FORMAT 175 178 static void 176 179 pat_set_value (char *buf, const signal2trace &s) … … 282 285 { 283 286 } 284 #endif // PAT_TRACE_FORMAT287 #endif // CONFIG_PAT_TRACE_FORMAT 285 288 286 289 static … … 413 416 else 414 417 vcd_signal_table = (tab_t*) malloc (sizeof (tab_t) * size); 415 #if 418 #ifdef CONFIG_DEBUG 416 419 if (vcd_signal_table == NULL) 417 420 { … … 485 488 vcd_trace_init (tf); 486 489 } else { 487 #if defined( DEBUG)490 #if defined(CONFIG_DEBUG) 488 491 if (vcd_signal_table == NULL) 489 492 { … … 579 582 &name) 580 583 { 581 #ifdef PAT_TRACE_FORMAT584 #ifdef CONFIG_PAT_TRACE_FORMAT 582 585 //exemple: 583 586 //DECLAR ("a", ":2", "X", IN, "3 downto 0", "" ); … … 629 632 #endif 630 633 DECLAR ((char*)(name.c_str ()), ":1", format, dir,(char *) downto.c_str(), "" ); 631 #endif // PAT_TRACE_FORMAT634 #endif // CONFIG_PAT_TRACE_FORMAT 632 635 } 633 636 -
branches/with_autoconf/src/sc_uint.h
r1 r8 24 24 // ---------------------------------------------------------------------------- 25 25 26 #include "sc_nbdefs.h"26 #include "sc_nbdefs.h" 27 27 28 28 namespace sc_dt { -
branches/with_autoconf/src/sc_uint_subref_r.cc
r1 r8 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; -
branches/with_autoconf/src/sc_unsigned.h
r1 r8 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 -
branches/with_autoconf/src/sc_vcd_trace.cc
r1 r8 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" 42 #include <cassert> 43 43 44 #include<time.h> 45 #include<string> 44 #include <time.h> 45 #include <string> 46 #ifdef HAVE_CONFIG_H 47 #include "config.h" 48 #endif 46 49 47 50 //-----------------------------------------*/ … … 58 61 if (notrace) 59 62 return NULL; 60 ASSERT(name != NULL);63 assert(name != NULL); 61 64 string filename; 62 65 filename = name; -
branches/with_autoconf/src/sc_ver.cc
r1 r8 38 38 #include <string> 39 39 #include <iostream> 40 #ifdef HAVE_CONFIG_H 41 #include "config.h" 42 #endif 40 43 41 44 namespace sc_core { … … 60 63 "\n" 61 64 " Cycle Accurate System Simulator\n" 62 #ifdef DEBUG65 #ifdef CONFIG_DEBUG 63 66 " DEBUG version\n" 64 67 #endif -
branches/with_autoconf/src/schedulers.cc
r1 r8 35 35 */ 36 36 37 #include<iostream> 38 #include"sc_module.h" // method_process_t 39 #include"gen_code.h" // gen_scheduling_code_for_dynamic_link & gen_scheduling_code_for_static_func 40 #include"internal.h" // dump_all_graph 41 #include"graph_cass.h" // makegraph 42 #include"process_dependency.h" // MakeProcessDependencyList 43 #include"signal_dependency.h" // MakeSignalDependencyGraph 44 #include"mouchard_scheduling.h" // MakeMouchardScheduling 45 #include"graph_signals.h" // makegraph 46 //#include"module_hierarchy2dot.h" 47 #include"assert.h" 37 #include <iostream> 38 #include "sc_module.h" // method_process_t 39 #include "gen_code.h" // gen_scheduling_code_for_dynamic_link & gen_scheduling_code_for_static_func 40 #include "internal.h" // dump_all_graph 41 #include "graph_cass.h" // makegraph 42 #include "process_dependency.h" // MakeProcessDependencyList 43 #include "signal_dependency.h" // MakeSignalDependencyGraph 44 #include "mouchard_scheduling.h" // MakeMouchardScheduling 45 #include "graph_signals.h" // makegraph 46 //#include "module_hierarchy2dot.h" 47 #include <cassert> 48 #ifdef HAVE_CONFIG_H 49 #include "config.h" 50 #endif 48 51 49 52 using namespace std; … … 94 97 const method_process_t *a2) 95 98 { 96 ASSERT(a1 != NULL);97 ASSERT(a2 != NULL);99 assert(a1 != NULL); 100 assert(a2 != NULL); 98 101 sc_module *m1 = a1->module; 99 102 sc_module *m2 = a2->module; … … 113 116 addr1.func = a1->func; 114 117 addr2.func = a2->func; 115 ASSERT(addr1.addr_ll != addr2.addr_ll);118 assert(addr1.addr_ll != addr2.addr_ll); 116 119 if ( sizeof(SC_ENTRY_FUNC) == 4 ) { 117 120 return (addr1.addr_l < addr2.addr_l); … … 129 132 const method_process_t *a2) 130 133 { 131 ASSERT(a1 != NULL);132 ASSERT(a2 != NULL);134 assert(a1 != NULL); 135 assert(a2 != NULL); 133 136 return (a1->module < a2->module); 134 137 } … … 139 142 const method_process_t *a2) 140 143 { 141 ASSERT(a1 != NULL);142 ASSERT(a2 != NULL);144 assert(a1 != NULL); 145 assert(a2 != NULL); 143 146 union { 144 147 SC_ENTRY_FUNC func; … … 236 239 { 237 240 SignalDependencyGraph *sig_graph = MakeAcyclicSignalDependencyGraph (); 238 ASSERT(sig_graph != NULL);241 assert(sig_graph != NULL); 239 242 // Create the process evaluation list 240 243 ProcessDependencyList* process_list = MakeMouchardScheduling (*sig_graph); 241 ASSERT(process_list != NULL);244 assert(process_list != NULL); 242 245 243 246 if (dump_all_graph) … … 283 286 // Uses port dependancies like Dr. Mouchard. 284 287 ProcessDependencyList* process_list = BuchmannScheduling (); 285 base_name = gen_scheduling_code_for_dynamic_link (transition_func_list, moore_func_list,*process_list); 286 gen_scheduling_code_for_static_func (transition_func_list, moore_func_list, *process_list); 288 if (dynamic_link_of_scheduling_code) 289 base_name = gen_scheduling_code_for_dynamic_link (transition_func_list, moore_func_list,*process_list); 290 else 291 gen_scheduling_code_for_static_func (transition_func_list, moore_func_list, *process_list); 287 292 break; 288 293 } … … 294 299 // and does not use an event-driven scheduler. 295 300 ProcessDependencyList* process_list = MouchardScheduling (); 296 base_name = gen_scheduling_code_for_dynamic_link(transition_func_list, moore_func_list,*process_list); 297 gen_scheduling_code_for_static_func (transition_func_list, moore_func_list, *process_list); 301 if (dynamic_link_of_scheduling_code) 302 base_name = gen_scheduling_code_for_dynamic_link(transition_func_list, moore_func_list,*process_list); 303 else 304 gen_scheduling_code_for_static_func (transition_func_list, moore_func_list, *process_list); 298 305 break; 299 306 } … … 306 313 graph2dot("module_graph", *g); 307 314 strong_component_list_t *strong_list = strong_component (g); 308 base_name = gen_scheduling_code_for_dynamic_link(transition_func_list, moore_func_list,*strong_list); 309 gen_scheduling_code_for_quasistatic_func (transition_func_list, moore_func_list, *strong_list); 315 if (dynamic_link_of_scheduling_code) 316 base_name = gen_scheduling_code_for_dynamic_link(transition_func_list, moore_func_list,*strong_list); 317 else 318 gen_scheduling_code_for_quasistatic_func (transition_func_list, moore_func_list, *strong_list); 310 319 break; 311 320 } -
branches/with_autoconf/src/schedulers.h
r1 r8 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 { -
branches/with_autoconf/src/serialization.cc
r1 r8 35 35 36 36 37 #include<vector> 38 #include<map> 39 #include<fstream> // save_module_hierarchy 40 #include"internal_ext.h" // tab_t 41 #include"serialization.h" 42 #include"entity.h" 43 #include"sc_module.h" 44 #include"sc_object.h" 45 #include"hex2string.h" 46 #include"assert.h" 37 #include <vector> 38 #include <map> 39 #include <fstream> // save_module_hierarchy 40 #include "internal_ext.h" // tab_t 41 #include "serialization.h" 42 #include "entity.h" 43 #include "sc_module.h" 44 #include "sc_object.h" 45 #include "hex2string.h" 46 #include <cassert> 47 #ifdef HAVE_CONFIG_H 48 #include "config.h" 49 #endif 47 50 48 51 using namespace std; … … 83 86 int bit_number) 84 87 { 85 ASSERT(bit_number <= 64);88 assert(bit_number <= 64); 86 89 if (bit_number == 1) { 87 90 bool v = *((const bool*) val); … … 139 142 save_fct_t1 fct) 140 143 { 141 // ASSERT(fct != NULL);144 //assert(fct != NULL); 142 145 //sc_module2save_fct_t1::value_type pair(&mod,fct); 143 146 //save_handler_table.insert (pair); … … 157 160 const sc_module *mod = it->first; 158 161 save_fct_t1 fct = it->second; 159 ASSERT(mod != NULL);160 // ASSERT(fct != NULL);162 assert(mod != NULL); 163 // assert(fct != NULL); 161 164 //o << mod->name () << endl; 162 165 fprintf (o,"module\n%s\n",mod->name ()); … … 184 187 file.close (); 185 188 FILE *f = fopen (filename, "a+"); 186 ASSERT(f != NULL);189 assert(f != NULL); 187 190 save_modules (f); 188 191 fclose (f); -
branches/with_autoconf/src/serialization.h
r1 r8 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 { -
branches/with_autoconf/src/serialization_ext.h
r1 r8 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 { -
branches/with_autoconf/src/signal_dependency.cc
r1 r8 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; -
branches/with_autoconf/src/simplify_string.cc
r1 r8 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; -
branches/with_autoconf/src/systemc
r4 r8 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.