Changeset 31 for trunk/IPs/systemC/processor/Morpheo/Behavioural/include
- Timestamp:
- May 28, 2007, 10:38:18 PM (17 years ago)
- Location:
- trunk/IPs/systemC/processor/Morpheo/Behavioural/include
- Files:
-
- 3 added
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Direction.h
r25 r31 1 #ifdef VHDL2 3 1 #ifndef morpheo_behavioural_Direction_h 4 2 #define morpheo_behavioural_Direction_h … … 13 11 }; // end namespace behavioural 14 12 15 template<>inline std::string toString<morpheo::behavioural::direction_t>(const morpheo::behavioural::direction_t& x)16 {17 switch (x)18 {19 case morpheo::behavioural::IN : return "in" ; break;20 case morpheo::behavioural::OUT : return "out" ; break;21 case morpheo::behavioural::INOUT : return "inout" ; break;22 default : return "" ; break;23 }24 }25 13 template<> inline std::string toString<morpheo::behavioural::direction_t>(const morpheo::behavioural::direction_t& x) 14 { 15 switch (x) 16 { 17 case morpheo::behavioural::IN : return "in" ; break; 18 case morpheo::behavioural::OUT : return "out" ; break; 19 case morpheo::behavioural::INOUT : return "inout" ; break; 20 default : return "" ; break; 21 } 22 } 23 26 24 }; // end namespace morpheo 27 25 28 26 #endif 29 #endif -
trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Interface.h
r29 r31 26 26 #endif 27 27 #include "Include/ToString.h" 28 #include "Include/ErrorMorpheo.h" 28 29 #include "Include/Debug.h" 29 30 … … 35 36 class Interface 36 37 { 38 friend class Interfaces; 39 37 40 // -----[ fields ]---------------------------------------------------- 38 41 private : const string _name ; … … 40 43 private : const localisation_t _localisation ; 41 44 private : string _comment ; 42 private : list<Signal> _list_signal ; 45 46 #ifdef POSITION 47 private : bool _is_map ; 48 private : void * _entity_map ; // Entity -> erreur cyclique 49 private : void * _interface_map; // pour être homogène avec _entity_map 50 #endif 51 private : list<Signal> * _list_signal ; 43 52 44 53 // -----[ methods ]--------------------------------------------------- … … 47 56 localisation_t localisation); 48 57 58 public : Interface (const Interface & interface); 49 59 public : ~Interface (); 50 60 51 61 public : void set_comment (string comment); 52 p ublic: string get_comment (void );62 private : string get_comment (void ); 53 63 54 p ublic : string set_signal (Signal signal);55 public : stringset_signal (string name ,64 private : string get_signal (void); 65 public : Signal * set_signal (string name , 56 66 direction_t direction, 57 67 uint32_t size , … … 63 73 presence_port_t presence_port=PORT_VHDL_YES_TESTBENCH_YES) 64 74 { 65 string str= set_signal (name, IN , size, presence_port);66 sc_in_clk * signal = new sc_in_clk (s tr.c_str());75 Signal * sig = set_signal (name, IN , size, presence_port); 76 sc_in_clk * signal = new sc_in_clk (sig->_name.c_str()); 67 77 return signal; 68 78 }; … … 73 83 presence_port_t presence_port=PORT_VHDL_YES_TESTBENCH_YES) 74 84 { 75 string str= set_signal (name, IN , size, presence_port);76 sc_in <T> * signal = new sc_in <T> (s tr.c_str());85 Signal * sig = set_signal (name, IN , size, presence_port); 86 sc_in <T> * signal = new sc_in <T> (sig->_name.c_str()); 77 87 return signal; 78 88 }; … … 83 93 presence_port_t presence_port=PORT_VHDL_YES_TESTBENCH_YES) 84 94 { 85 string str= set_signal (name, OUT , size, presence_port);86 sc_out <T> * signal = new sc_out <T> (s tr.c_str());95 Signal * sig = set_signal (name, OUT , size, presence_port); 96 sc_out <T> * signal = new sc_out <T> (sig->_name.c_str()); 87 97 return signal; 88 98 }; 89 99 #endif 90 91 public : string get_signal (void);92 100 93 101 #ifdef VHDL … … 98 106 #endif 99 107 108 #ifdef POSITION 109 public : void port_map (void * entity, 110 void * interface); 111 #endif 112 100 113 public : XML toXML (void); 101 114 #ifdef POSITION 115 public : XML toXML_mapping (void); 116 #endif 102 117 public : friend ostream& operator<< (ostream& output_stream, 103 118 morpheo::behavioural::Interface & x); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Interfaces.h
r29 r31 30 30 { 31 31 // -----[ fields ]---------------------------------------------------- 32 private : list<Interface> 32 private : list<Interface> * _list_interface; 33 33 34 34 // -----[ methods ]--------------------------------------------------- 35 35 public : Interfaces (void); 36 36 public : Interfaces (const Interfaces & interfaces); 37 37 public : ~Interfaces (); 38 38 39 public : void set_interface (Interface interface); 40 public : string get_interface (void); 39 public : Interface * set_interface (string name , 40 direction_t direction , 41 localisation_t localisation); 42 public : Interface * set_interface (string name , 43 direction_t direction , 44 localisation_t localisation, 45 string comment ); 46 private : string get_interface (void); 41 47 42 48 #ifdef VHDL … … 47 53 #endif 48 54 55 public : Interface * find_interface (string name); 56 49 57 public : XML toXML (void); 50 58 #ifdef POSITION 59 public : XML toXML_mapping (void); 60 #endif 51 61 public : friend ostream& operator<< (ostream& output_stream, 52 62 morpheo::behavioural::Interfaces & x); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Localisation.h
r29 r31 1 #ifdef VHDL2 3 1 #ifndef morpheo_behavioural_Localisation_h 4 2 #define morpheo_behavioural_Localisation_h … … 28 26 29 27 #endif 30 #endif -
trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Signal.h
r29 r31 28 28 class Signal 29 29 { 30 friend class Interface; 31 30 32 // -----[ fields ]---------------------------------------------------- 31 p ublic: const string _name ;32 p ublic: const direction_t _direction ;33 p ublic: const uint32_t _size ;34 p ublic: const presence_port_t _presence_port;33 private : const string _name ; 34 private : const direction_t _direction ; 35 private : const uint32_t _size ; 36 private : const presence_port_t _presence_port; 35 37 36 38 // -----[ methods ]--------------------------------------------------- … … 39 41 uint32_t size , 40 42 presence_port_t presence_port = PORT_VHDL_YES_TESTBENCH_YES); 43 public : Signal (const Signal &); 41 44 public : ~Signal (); 42 45 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/include/XML.h
r29 r31 24 24 { 25 25 // -----[ fields ]---------------------------------------------------- 26 private : const string _name ; 27 private : string _body ; 28 private : list<string> _list_balise_name; 26 private : const string _name ; 27 private : string _filename_extension; 28 private : string _body ; 29 private : list<string> _list_balise_name ; 29 30 30 31 // -----[ methods ]--------------------------------------------------- … … 42 43 public : bool insert_XML (XML xml ); 43 44 45 public : void filename_extension (string extension); 44 46 public : void generate_file (void); 45 47 public : void generate_file (string encoding);
Note: See TracChangeset
for help on using the changeset viewer.