- Timestamp:
- Jan 31, 2008, 6:46:41 PM (16 years ago)
- Location:
- trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Shifter/include
- Files:
-
- 1 deleted
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Shifter/include/Parameters.h
r2 r75 48 48 public : const bool _have_direction_right ; 49 49 50 string toString_rotate (rotate_t x)51 {52 switch (x)53 {54 case without_rotate : return "without_rotate" ;55 case internal_rotate : return "internal_rotate";56 case external_rotate : return "external_rotate";57 default : return "";58 }59 };60 61 string toString_direction (direction_t x)62 {63 switch (x)64 {65 case internal_right_shift : return "internal_right_shift";66 case internal_left_shift : return "internal_left_shift" ;67 case external_direction : return "external_direction" ;68 default : return "";69 }70 };71 72 string toString_carry (carry_t x)73 {74 switch (x)75 {76 case internal_logic : return "internal_logic" ;77 case internal_arithmetic : return "internal_arithmetic" ;78 case external_carry : return "external_carry" ;79 case external_completion : return "external_completion" ;80 default : return "";81 }82 };83 84 50 //-----[ methods ]----------------------------------------------------------- 85 51 public : Parameters (uint32_t size_data , … … 93 59 public : ~Parameters () ; 94 60 95 public : string msg_error (void); 96 97 public : string print (uint32_t depth); 98 public : friend ostream& operator<< (ostream& output_stream, 99 morpheo::behavioural::generic::shifter::Parameters & x); 61 public : std::string msg_error (void); 62 public : std::string print (uint32_t depth); 63 public : friend std::ostream& operator<< (std::ostream& output_stream, 64 morpheo::behavioural::generic::shifter::Parameters & x); 100 65 }; 101 66 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Shifter/include/Shifter.h
r44 r75 19 19 #include "Behavioural/Generic/Shifter/include/Types.h" 20 20 #ifdef STATISTICS 21 #include "Behavioural/ Generic/Shifter/include/Statistics.h"21 #include "Behavioural/include/Stat.h" 22 22 #endif 23 23 #ifdef VHDL … … 25 25 #endif 26 26 #include "Behavioural/include/Component.h" 27 28 using namespace std;29 27 30 28 namespace morpheo { … … 41 39 // -----[ fields ]---------------------------------------------------- 42 40 // Parameters 43 protected : const st ring _name;41 protected : const std::string _name; 44 42 45 43 protected : const Parameters _param; 46 44 #ifdef STATISTICS 47 p rivate : Statistics* _stat;45 public : Stat * _stat; 48 46 #endif 49 47 … … 79 77 public : Shifter ( 80 78 #ifdef SYSTEMC 81 sc_module_name name,79 sc_module_name name, 82 80 #else 83 st ringname,81 std::string name, 84 82 #endif 85 83 #ifdef STATISTICS 86 morpheo::behavioural::Parameters_Statistics param_statistics,84 morpheo::behavioural::Parameters_Statistics * param_statistics, 87 85 #endif 88 Parameters param );86 Parameters param ); 89 87 90 88 public : Shifter (Parameters param ); … … 106 104 private : void vhdl_body (Vhdl * & vhdl); 107 105 #endif 106 108 107 #ifdef STATISTICS 109 public : string statistics (uint32_t depth);108 public : void statistics_declaration (morpheo::behavioural::Parameters_Statistics * param_statistics); 110 109 #endif 111 112 #ifdef VHDL_TESTBENCH 113 private : void vhdl_testbench_transition (void); 110 #if defined(STATISTICS) or defined(VHDL_TESTBENCH) 111 private : void end_cycle (void); 114 112 #endif 115 116 113 }; 117 114 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Shifter/include/Types.h
r44 r75 1 #ifdef SYSTEMC2 1 #ifndef morpheo_behavioural_generic_shifter_Type_h 3 2 #define morpheo_behavioural_generic_shifter_Type_h … … 10 9 */ 11 10 12 #include "Common/include/Types.h" 11 #include "Behavioural/include/Types.h" 12 #include "Common/include/ToString.h" 13 13 14 14 namespace morpheo { … … 49 49 }; // end namespace generic 50 50 }; // end namespace behavioural 51 52 template<> inline std::string toString<morpheo::behavioural::generic::shifter::rotate_t>(const morpheo::behavioural::generic::shifter::rotate_t& x) 53 { 54 switch (x) 55 { 56 case morpheo::behavioural::generic::shifter::without_rotate : return "without_rotate" ; 57 case morpheo::behavioural::generic::shifter::internal_rotate : return "internal_rotate"; 58 case morpheo::behavioural::generic::shifter::external_rotate : return "external_rotate"; 59 default : return ""; 60 } 61 }; 62 63 template<> inline std::string toString<morpheo::behavioural::generic::shifter::direction_t>(const morpheo::behavioural::generic::shifter::direction_t& x) 64 { 65 switch (x) 66 { 67 case morpheo::behavioural::generic::shifter::internal_right_shift : return "internal_right_shift"; 68 case morpheo::behavioural::generic::shifter::internal_left_shift : return "internal_left_shift" ; 69 case morpheo::behavioural::generic::shifter::external_direction : return "external_direction" ; 70 default : return ""; 71 } 72 }; 73 74 template<> inline std::string toString<morpheo::behavioural::generic::shifter::carry_t>(const morpheo::behavioural::generic::shifter::carry_t& x) 75 { 76 switch (x) 77 { 78 case morpheo::behavioural::generic::shifter::internal_logic : return "internal_logic" ; 79 case morpheo::behavioural::generic::shifter::internal_arithmetic : return "internal_arithmetic" ; 80 case morpheo::behavioural::generic::shifter::external_carry : return "external_carry" ; 81 case morpheo::behavioural::generic::shifter::external_completion : return "external_completion" ; 82 default : return ""; 83 } 84 }; 85 86 51 87 }; // end namespace morpheo 52 88 53 89 #endif 54 #endif
Note: See TracChangeset
for help on using the changeset viewer.