Changeset 57 for trunk/IPs/systemC/processor/Morpheo/Behavioural/include
- Timestamp:
- Sep 28, 2007, 2:58:08 PM (17 years ago)
- Location:
- trunk/IPs/systemC/processor/Morpheo/Behavioural/include
- Files:
-
- 2 added
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Component.h
r44 r57 20 20 #include "Common/include/ToString.h" 21 21 #include "Common/include/Debug.h" 22 #include "Behavioural/include/Usage.h" 22 23 23 24 using namespace std; … … 26 27 namespace behavioural { 27 28 29 typedef uint8_t Tinstance_t; 30 31 #define INSTANCE_NONE 0x0 32 #define INSTANCE_LIBRARY 0x1 33 #define INSTANCE_COMPONENT 0x2 34 #define INSTANCE_POSITION 0x4 35 #define INSTANCE_ALL 0x7 36 37 typedef struct 38 { 39 public : Tinstance_t _instance; 40 public : Entity * _entity ; 41 } Tcomponent_t; 42 28 43 class Component 29 44 { 30 45 // -----[ fields ]---------------------------------------------------- 46 private : const Tusage_t _usage; 31 47 private : Entity * _entity ; 32 private : list< Entity *>* _list_component;33 48 private : list<Tcomponent_t*> * _list_component; 49 34 50 // -----[ methods ]--------------------------------------------------- 35 public : Component ( void);51 public : Component (Tusage_t usage=USE_ALL); 36 52 public : Component (const Component & component); 37 53 public : ~Component (); … … 52 68 ,uint32_t size_y 53 69 #endif 70 ,Tinstance_t instance=INSTANCE_ALL 54 71 ); 55 72 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Entity.h
r44 r57 18 18 #include "Common/include/ToString.h" 19 19 #include "Common/include/Debug.h" 20 #include "Behavioural/include/Usage.h" 20 21 21 22 using namespace std; … … 32 33 private : const schema_t _schema ; 33 34 #endif 35 private : const Tusage_t _usage; 36 34 37 private : Interfaces * _interfaces ; 35 38 … … 50 53 ,schema_t schema 51 54 #endif 55 ,Tusage_t usage=USE_ALL 52 56 ); 53 57 public : Entity (const Entity & entity); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Interface.h
r44 r57 25 25 #include "Common/include/ErrorMorpheo.h" 26 26 #include "Common/include/Debug.h" 27 #include "Behavioural/include/Usage.h" 27 28 28 29 using namespace std; … … 38 39 protected : const direction_t _direction ; 39 40 protected : const localisation_t _localisation ; 41 #endif 42 protected : const Tusage_t _usage; 43 44 #ifdef POSITION 40 45 protected : string _comment ; 41 46 #endif … … 59 64 ,localisation_t localisation 60 65 #endif 66 ,Tusage_t usage=USE_ALL 61 67 ); 62 68 … … 97 103 98 104 Signal * sig = set_signal (name, IN , size, presence_port); 99 sc_in_clk * port = new sc_in_clk (sig->_name.c_str()); 100 101 sig->alloc<bool> (static_cast<void *>(port)); 105 sc_in_clk * port; 106 107 if (_usage & USE_SYSTEMC) 108 { 109 port = new sc_in_clk (sig->_name.c_str()); 110 sig->alloc<bool> (static_cast<void *>(port)); 111 } 112 else 113 { 114 port = NULL; 115 } 102 116 103 117 log_printf(FUNC,Behavioural,"set_signal_clk","End"); … … 118 132 119 133 Signal * sig = set_signal (name, IN , size, presence_port); 120 sc_in <T> * port = new sc_in <T> (sig->_name.c_str()); 121 122 sig->alloc<T> (static_cast<void *>(port)); 134 sc_in <T> * port; 135 136 if (_usage & USE_SYSTEMC) 137 { 138 port = new sc_in <T> (sig->_name.c_str()); 139 sig->alloc<T> (static_cast<void *>(port)); 140 } 141 else 142 { 143 port = NULL; 144 } 123 145 124 146 log_printf(FUNC,Behavioural,"set_signal_in","End"); … … 139 161 140 162 Signal * sig = set_signal (name, OUT , size, presence_port); 141 sc_out <T> * port = new sc_out <T> (sig->_name.c_str()); 142 143 sig->alloc<T> (static_cast<void *>(port)); 163 sc_out <T> * port; 164 165 if (_usage & USE_SYSTEMC) 166 { 167 port = new sc_out <T> (sig->_name.c_str()); 168 sig->alloc<T> (static_cast<void *>(port)); 169 } 170 else 171 { 172 port = NULL; 173 } 144 174 145 175 log_printf(FUNC,Behavioural,"set_signal_out","End"); … … 155 185 156 186 Signal * sig = set_signal (name, INTERNAL , size, PORT_VHDL_NO_TESTBENCH_NO); 157 sc_signal <T> * port = new sc_signal <T> (sig->_name.c_str()); 158 159 sig->alloc<T> (static_cast<void *>(port)); 187 sc_signal <T> * port; 188 189 if (_usage & USE_SYSTEMC) 190 { 191 port = new sc_signal <T> (sig->_name.c_str()); 192 sig->alloc<T> (static_cast<void *>(port)); 193 } 194 else 195 { 196 port = NULL; 197 } 160 198 161 199 log_printf(FUNC,Behavioural,"set_signal_internal","End"); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Interface_fifo.h
r55 r57 45 45 ,localisation_t localisation 46 46 #endif 47 ,Tusage_t usage=USE_ALL 47 48 ); 48 49 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Interfaces.h
r44 r57 18 18 #include "Behavioural/include/Vhdl.h" 19 19 #endif 20 #include "Behavioural/include/Usage.h" 20 21 21 22 using namespace std; … … 28 29 // -----[ fields ]---------------------------------------------------- 29 30 private : const string _name; 31 private : const Tusage_t _usage; 30 32 private : list<Interface_fifo*> * _list_interface; 31 33 32 34 // -----[ methods ]--------------------------------------------------- 33 public : Interfaces (string name); 35 public : Interfaces (string name, 36 Tusage_t usage=USE_ALL); 34 37 public : Interfaces (const Interfaces & interfaces); 35 38 public : ~Interfaces ();
Note: See TracChangeset
for help on using the changeset viewer.