- Timestamp:
- Dec 10, 2008, 7:31:39 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Counter/src/Counter.cpp
r82 r88 32 32 log_printf(FUNC,Counter,"Counter","Begin"); 33 33 34 #ifdef SYSTEMC 34 #if DEBUG_Counter == true 35 log_printf(INFO,Counter,FUNCTION,_("<%s> Parameters"),_name.c_str()); 36 37 std::cout << param << std::endl; 38 #endif 39 40 log_printf(INFO,Core,FUNCTION,_("<%s> Allocation"),_name.c_str()); 35 41 allocation (); 36 #endif37 42 38 43 #ifdef STATISTICS 39 // Allocation of statistics 40 statistics_declaration(param_statistics); 44 if (usage_is_set(_usage,USE_STATISTICS)) 45 { 46 log_printf(INFO,Core,FUNCTION,_("<%s> Allocation of statistics"),_name.c_str()); 47 48 // Allocation of statistics 49 statistics_declaration(param_statistics); 50 } 41 51 #endif 42 52 43 53 #ifdef VHDL 44 // generate the vhdl 45 vhdl(); 54 if (usage_is_set(_usage,USE_VHDL)) 55 { 56 // generate the vhdl 57 log_printf(INFO,Core,FUNCTION,_("<%s> Generate the vhdl"),_name.c_str()); 58 59 vhdl(); 60 } 46 61 #endif 47 62 48 63 #ifdef SYSTEMC 49 64 65 if (usage_is_set(_usage,USE_SYSTEMC)) 66 { 50 67 #if defined(STATISTICS) or defined(VHDL_TESTBENCH) 51 SC_METHOD (transition); 52 dont_initialize (); 53 sensitive << (*(in_CLOCK)).pos(); 68 log_printf(INFO,Core,FUNCTION,_("<%s> Method - transition"),_name.c_str()); 69 70 SC_METHOD (transition); 71 dont_initialize (); 72 sensitive << (*(in_CLOCK)).pos(); 54 73 #endif 55 74 56 SC_METHOD (genMealy); 57 dont_initialize (); 58 for (uint32_t i=0; i<_param._nb_port; i++) 59 sensitive << *(in_COUNTER_DATA [i]) 60 << *(in_COUNTER_ADDSUB [i]); 61 75 log_printf(INFO,Core,FUNCTION,_("<%s> Method - genMealy"),_name.c_str()); 76 SC_METHOD (genMealy); 77 dont_initialize (); 78 for (uint32_t i=0; i<_param._nb_port; i++) 79 sensitive << *(in_COUNTER_DATA [i]) 80 << *(in_COUNTER_ADDSUB [i]); 81 62 82 #ifdef SYSTEMCASS_SPECIFIC 63 // List dependency information 64 for (uint32_t i=0; i<_param._nb_port; i++) 65 { 66 (*(out_COUNTER_DATA [i])) (*(in_COUNTER_DATA [i])); 67 (*(out_COUNTER_DATA [i])) (*(in_COUNTER_ADDSUB [i])); 83 // List dependency information 84 for (uint32_t i=0; i<_param._nb_port; i++) 85 { 86 (*(out_COUNTER_DATA [i])) (*(in_COUNTER_DATA [i])); 87 (*(out_COUNTER_DATA [i])) (*(in_COUNTER_ADDSUB [i])); 88 } 89 #endif 68 90 } 69 #endif70 91 71 92 #endif … … 76 97 { 77 98 log_printf(FUNC,Counter,"~Counter","Begin"); 78 #ifdef SYSTEMC 79 deallocation (); 99 100 #ifdef STATISTICS 101 if (usage_is_set(_usage,USE_STATISTICS)) 102 { 103 delete _stat; 104 } 80 105 #endif 81 106 82 #ifdef STATISTICS 83 de lete _stat;84 #endif 107 log_printf(INFO,Core,FUNCTION,_("<%s> Deallocation"),_name.c_str()); 108 deallocation (); 109 85 110 log_printf(FUNC,Counter,"~Counter","End"); 86 111 };
Note: See TracChangeset
for help on using the changeset viewer.