- Timestamp:
- Dec 10, 2008, 7:31:39 PM (16 years ago)
- Location:
- trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Counter
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Counter/SelfTest/Makefile
r81 r88 24 24 library_clean : Counter_library_clean 25 25 26 local_clean : 27 26 28 include ../Makefile.deps 27 29 include $(DIR_MORPHEO)/Behavioural/Makefile.flags -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Counter/SelfTest/src/test.cpp
r82 r88 37 37 #endif 38 38 39 Tusage_t _usage = USE_ALL; 40 41 // _usage = usage_unset(_usage,USE_SYSTEMC ); 42 // _usage = usage_unset(_usage,USE_VHDL ); 43 // _usage = usage_unset(_usage,USE_VHDL_TESTBENCH ); 44 // _usage = usage_unset(_usage,USE_VHDL_TESTBENCH_ASSERT); 45 // _usage = usage_unset(_usage,USE_POSITION ); 46 // _usage = usage_unset(_usage,USE_STATISTICS ); 47 // _usage = usage_unset(_usage,USE_INFORMATION ); 48 39 49 Counter * _Counter = new Counter (name.c_str(), 40 50 #ifdef STATISTICS … … 42 52 #endif 43 53 param, 44 USE_ALL);54 _usage); 45 55 46 56 #ifdef SYSTEMC -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Counter/include/Counter.h
r82 r88 85 85 public : ~Counter (void); 86 86 87 #ifdef SYSTEMC88 87 private : void allocation (void); 89 88 private : void deallocation (void); 90 89 90 #ifdef SYSTEMC 91 91 #if defined(STATISTICS) or defined(VHDL_TESTBENCH) 92 92 public : void transition (void); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Counter/include/Parameters.h
r81 r88 29 29 public : Parameters (uint32_t size_data, 30 30 uint32_t nb_port ); 31 public : Parameters (Parameters & param) ;31 // public : Parameters (Parameters & param) ; 32 32 public : ~Parameters () ; 33 34 public : void copy (void); 33 35 34 36 public : Parameters_test msg_error (void); -
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 }; -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Counter/src/Counter_allocation.cpp
r82 r88 1 #ifdef SYSTEMC2 1 /* 3 2 * $Id$ 4 3 * 5 * [ 4 * [ Description ] 6 5 * 7 6 */ … … 29 28 _interfaces = entity->set_interfaces(); 30 29 31 // ~~~~~[ 30 // ~~~~~[ Interface : "" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 32 31 { 33 32 Interface * interface = _interfaces->set_interface("" … … 43 42 } 44 43 45 // ~~~~~[ 44 // ~~~~~[ Interface : "counter" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 46 45 { 47 46 in_COUNTER_DATA = new SC_IN (Tdata_t) * [_param._nb_port]; … … 64 63 } 65 64 } 65 66 66 #ifdef POSITION 67 _component->generate_file(); 67 if (usage_is_set(_usage,USE_POSITION)) 68 _component->generate_file(); 68 69 #endif 69 70 70 // ~~~~~[ 71 // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 71 72 log_printf(FUNC,Counter,"allocation","End"); 72 73 }; … … 77 78 }; // end namespace behavioural 78 79 }; // end namespace morpheo 79 #endif -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Counter/src/Counter_deallocation.cpp
r81 r88 1 #ifdef SYSTEMC2 1 /* 3 2 * $Id$ … … 19 18 log_printf(FUNC,Counter,"deallocation","Begin"); 20 19 21 delete in_CLOCK; 22 delete in_NRESET; 23 24 delete [] in_COUNTER_DATA ; 25 delete [] in_COUNTER_ADDSUB; 26 delete [] out_COUNTER_DATA ; 27 20 if (usage_is_set(_usage,USE_SYSTEMC)) 21 { 22 delete in_CLOCK; 23 delete in_NRESET; 24 25 delete [] in_COUNTER_DATA ; 26 delete [] in_COUNTER_ADDSUB; 27 delete [] out_COUNTER_DATA ; 28 } 29 28 30 // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 29 31 … … 38 40 }; // end namespace behavioural 39 41 }; // end namespace morpheo 40 #endif -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Counter/src/Counter_end_cycle.cpp
r81 r88 20 20 21 21 #ifdef STATISTICS 22 _stat->end_cycle(); 22 if (usage_is_set(_usage,USE_STATISTICS)) 23 _stat->end_cycle(); 23 24 #endif 24 25 … … 26 27 // Evaluation before read the ouput signal 27 28 // sc_start(0); 28 _interfaces->testbench(); 29 if (usage_is_set(_usage,USE_VHDL_TESTBENCH)) 30 _interfaces->testbench(); 29 31 #endif 30 32 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Counter/src/Parameters.cpp
r81 r88 25 25 }; 26 26 27 Parameters::Parameters (Parameters & param):28 _size_data(param._size_data),29 _nb_port (param._nb_port ),30 _data_max (param._data_max )31 {32 log_printf(FUNC,Counter,"Parameters","Begin");33 test();34 log_printf(FUNC,Counter,"Parameters","End");35 };27 // Parameters::Parameters (Parameters & param): 28 // _size_data(param._size_data), 29 // _nb_port (param._nb_port ), 30 // _data_max (param._data_max ) 31 // { 32 // log_printf(FUNC,Counter,"Parameters","Begin"); 33 // test(); 34 // log_printf(FUNC,Counter,"Parameters","End"); 35 // }; 36 36 37 37 Parameters::~Parameters () … … 41 41 }; 42 42 43 void Parameters::copy (void) 44 { 45 log_printf(FUNC,Counter,"copy","Begin"); 46 log_printf(FUNC,Counter,"copy","End"); 47 }; 48 43 49 }; // end namespace counter 44 50 }; // end namespace generic 45 46 51 }; // end namespace behavioural 47 52 }; // end namespace morpheo
Note: See TracChangeset
for help on using the changeset viewer.