Changeset 71 for trunk/IPs/systemC/processor/Morpheo/Behavioural/include
- Timestamp:
- Jan 19, 2008, 12:09:01 PM (17 years ago)
- Location:
- trunk/IPs/systemC/processor/Morpheo/Behavioural/include
- Files:
-
- 3 added
- 14 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Component.h
r62 r71 21 21 #include "Common/include/Debug.h" 22 22 #include "Behavioural/include/Usage.h" 23 24 using namespace std;25 23 26 24 namespace morpheo { … … 53 51 public : ~Component (); 54 52 55 public : Entity * set_entity (st ring name56 ,st ring type53 public : Entity * set_entity (std::string name 54 ,std::string type 57 55 #ifdef POSITION 58 56 ,schema_t schema 59 57 #endif 60 58 ); 61 private : st ring get_entity (void);59 private : std::string get_entity (void); 62 60 63 61 public : void set_component (Component * component … … 71 69 ); 72 70 73 private : st ring get_component (void);71 private : std::string get_component (void); 74 72 75 private : Entity * find_entity (st ring name);76 //private : Interface * find_interface (st ring name ,73 private : Entity * find_entity (std::string name); 74 //private : Interface * find_interface (std::string name , 77 75 // Entity * entity); 78 76 … … 85 83 Signal * signal_productor); 86 84 87 public : void port_map (st ring component_src ,88 st ring port_src ,89 st ring component_dest,90 st ring port_dest );91 public : void port_map (st ring component_src ,92 st ring port_src );85 public : void port_map (std::string component_src , 86 std::string port_src , 87 std::string component_dest, 88 std::string port_dest ); 89 public : void port_map (std::string component_src , 90 std::string port_src ); 93 91 94 92 public : bool test_map (void); 95 93 96 94 #ifdef POSITION 97 public : void interface_map (st ring component_src ,98 st ring port_dest,99 st ring component_dest,100 st ring port_dest );95 public : void interface_map (std::string component_src , 96 std::string port_dest, 97 std::string component_dest, 98 std::string port_dest ); 101 99 102 100 public : XML toXML (void); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Configuration_Parameters.h
r44 r71 15 15 #include "Common/include/ErrorMorpheo.h" 16 16 #include "Common/include/ToString.h" 17 using namespace std;18 17 19 18 namespace morpheo { … … 24 23 // -----[ fields ]---------------------------------------------------- 25 24 // Constant 26 public : const st ring _name ;25 public : const std::string _name ; 27 26 public : const uint32_t _value ; 28 27 public : const uint32_t _min ; 29 28 public : const uint32_t _max ; 30 public : const st ring _step ;29 public : const std::string _step ; 31 30 public : const uint32_t _default; 32 31 public : const uint32_t _level ; 33 public : const st ring _comment;32 public : const std::string _comment; 34 33 35 34 // -----[ methods ]--------------------------------------------------- 36 public : Configuration_Parameters (st ring name ,35 public : Configuration_Parameters (std::string name , 37 36 uint32_t value , 38 37 uint32_t min , 39 38 uint32_t max , 40 st ring step ,39 std::string step , 41 40 uint32_t value_default, 42 41 uint32_t level , 43 st ring comment);42 std::string comment); 44 43 public : ~Configuration_Parameters (); 45 44 46 45 // methods to print and test parameters_configuration 47 public : st ring print (uint32_t depth);46 public : std::string print (uint32_t depth); 48 47 public : friend ostream& operator<< (ostream& output_stream, 49 48 morpheo::behavioural::Configuration_Parameters & x); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Constants.h
r62 r71 11 11 12 12 //-------------------------------------------------------[ Memory ]----- 13 #define OPERATION_MEMORY_LOAD 0x0 // 000_0000 13 14 #define OPERATION_MEMORY_LOAD_8_Z 0x0 // 000_0000 14 15 #define OPERATION_MEMORY_LOAD_16_Z 0x20 // 010_0000 … … 55 56 (x == OPERATION_MEMORY_STORE_HEAD_KO)) 56 57 58 #define is_operation_memory_load_signed(x) \ 59 ((x == OPERATION_MEMORY_LOAD_8_S ) or \ 60 (x == OPERATION_MEMORY_LOAD_16_S) or \ 61 (x == OPERATION_MEMORY_LOAD_32_S) or \ 62 (x == OPERATION_MEMORY_LOAD_64_S) ) 63 57 64 #define MEMORY_ACCESS_8 0x0 58 65 #define MEMORY_ACCESS_16 0x1 … … 60 67 #define MEMORY_ACCESS_64 0x3 61 68 69 #define MEMORY_SIZE_8 8 70 #define MEMORY_SIZE_16 16 71 #define MEMORY_SIZE_32 32 72 #define MEMORY_SIZE_64 64 73 62 74 #define MASK_MEMORY_ACCESS_8 0x0 63 75 #define MASK_MEMORY_ACCESS_16 0x1 64 76 #define MASK_MEMORY_ACCESS_32 0x3 65 77 #define MASK_MEMORY_ACCESS_64 0x7 78 79 #define memory_size(x) \ 80 (((x==OPERATION_MEMORY_LOAD_16_Z)or \ 81 (x==OPERATION_MEMORY_LOAD_16_S)or \ 82 (x==OPERATION_MEMORY_STORE_16 ))?MEMORY_SIZE_16: \ 83 (((x==OPERATION_MEMORY_LOAD_32_Z)or \ 84 (x==OPERATION_MEMORY_LOAD_32_S)or \ 85 (x==OPERATION_MEMORY_STORE_32 ))?MEMORY_SIZE_32: \ 86 (((x==OPERATION_MEMORY_LOAD_64_Z)or \ 87 (x==OPERATION_MEMORY_LOAD_64_S)or \ 88 (x==OPERATION_MEMORY_STORE_64 ))?MEMORY_SIZE_64:MEMORY_SIZE_8))) 66 89 67 90 #define memory_access(x) \ … … 86 109 (x==OPERATION_MEMORY_LOAD_64_S)or \ 87 110 (x==OPERATION_MEMORY_STORE_64 ))?MASK_MEMORY_ACCESS_64:MASK_MEMORY_ACCESS_8))) 88 89 111 90 112 //====================================================[ Exception ]===== … … 131 153 #define EXCEPTION_MEMORY_BUS_ERROR 0x4 // Access at a invalid physical address 132 154 #define EXCEPTION_MEMORY_MISS_SPECULATION 0x5 // Load miss speculation 155 #define EXCEPTION_MEMORY_LOAD_SPECULATIVE 0x6 // The load is speculative : write in register file, but don't commit 133 156 134 157 //==================================================[ dcache_type ]===== 135 # define DCACHE_LOAD 0x0 // 0000 136 # define DCACHE_LOCK 0x1 // 0001 137 # define DCACHE_INVALIDATE 0x2 // 0010 138 # define DCACHE_PREFETCH 0x3 // 0011 139 //#define DCACHE_ 0x4 // 0100 140 //#define DCACHE_ 0x5 // 0101 141 # define DCACHE_FLUSH 0x6 // 0110 142 # define DCACHE_SYNCHRONIZATION 0x7 // 0111 143 144 # define DCACHE_STORE_8 0x8 // 1000 145 # define DCACHE_STORE_16 0x9 // 1001 146 # define DCACHE_STORE_32 0xa // 1010 147 # define DCACHE_STORE_64 0xb // 1011 148 //#define DCACHE_ 0xc // 1100 149 //#define DCACHE_ 0xd // 1101 150 //#define DCACHE_ 0xe // 1110 151 //#define DCACHE_ 0xf // 1111 158 # define DCACHE_LOAD 0x0 // 0000 159 # define DCACHE_LOCK 0x1 // 0001 160 # define DCACHE_INVALIDATE 0x2 // 0010 161 # define DCACHE_PREFETCH 0x3 // 0011 162 //#define DCACHE_ 0x4 // 0100 163 //#define DCACHE_ 0x5 // 0101 164 # define DCACHE_FLUSH 0x6 // 0110 165 # define DCACHE_SYNCHRONIZATION 0x7 // 0111 166 # define DCACHE_STORE_8 0x8 // 1000 167 # define DCACHE_STORE_16 0x9 // 1001 168 # define DCACHE_STORE_32 0xa // 1010 169 # define DCACHE_STORE_64 0xb // 1011 170 //#define DCACHE_ 0xc // 1100 171 //#define DCACHE_ 0xd // 1101 172 //#define DCACHE_ 0xe // 1110 173 //#define DCACHE_ 0xf // 1111 152 174 153 175 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Debug_component.h
r69 r71 21 21 #define DEBUG_Multi_Execute_unit false 22 22 #define DEBUG_Execute_unit false 23 #define DEBUG_Load_store_unit false23 #define DEBUG_Load_store_unit true 24 24 #define DEBUG_Multi_Read_unit false 25 25 #define DEBUG_Read_unit false 26 26 #define DEBUG_Read_queue false 27 #define DEBUG_Reservation_station true27 #define DEBUG_Reservation_station false 28 28 #define DEBUG_Register_unit false 29 29 #define DEBUG_Register_unit_Glue false -
trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Entity.h
r62 r71 20 20 #include "Behavioural/include/Usage.h" 21 21 22 using namespace std;23 24 22 namespace morpheo { 25 23 namespace behavioural { … … 28 26 { 29 27 // -----[ fields ]---------------------------------------------------- 30 private : const st ring _name ;31 private : const st ring _type ;28 private : const std::string _name ; 29 private : const std::string _type ; 32 30 #ifdef POSITION 33 31 private : const schema_t _schema ; … … 38 36 39 37 #ifdef POSITION 40 private : st ring _comment ;38 private : std::string _comment ; 41 39 42 40 private : bool _is_map ; … … 48 46 49 47 // -----[ methods ]--------------------------------------------------- 50 public : Entity ( st ring name51 ,st ring type48 public : Entity ( std::string name 49 ,std::string type 52 50 #ifdef POSITION 53 51 ,schema_t schema … … 58 56 public : ~Entity (); 59 57 60 public : st ring get_name (void);61 public : st ring get_type (void);58 public : std::string get_name (void); 59 public : std::string get_type (void); 62 60 63 61 #ifdef POSITION 64 public : void set_comment (st ring comment);65 private : st ring get_comment (void );62 public : void set_comment (std::string comment); 63 private : std::string get_comment (void ); 66 64 #endif 67 65 public : Interfaces * set_interfaces (void); 68 private : st ring get_interfaces (void);66 private : std::string get_interfaces (void); 69 67 public : Interfaces * get_interfaces_list(void); 70 68 71 public : Interface * find_interface (st ring name);72 public : Signal * find_signal (st ring name);69 public : Interface * find_interface (std::string name); 70 public : Signal * find_signal (std::string name); 73 71 public : bool find_signal (Signal * signal); 74 72 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Environnement.h
r68 r71 18 18 # define SYSTEMC_VHDL_COMPATIBILITY 19 19 #endif 20 21 #if (defined(DEBUG)) 22 # define DEBUG_TEST 23 #endif -
trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Interface.h
r62 r71 28 28 #include "Behavioural/include/Usage.h" 29 29 30 using namespace std;31 32 30 namespace morpheo { 33 31 namespace behavioural { … … 36 34 { 37 35 // -----[ fields ]---------------------------------------------------- 38 protected : const st ring _name ;36 protected : const std::string _name ; 39 37 #ifdef POSITION 40 38 protected : const direction_t _direction ; … … 44 42 45 43 #ifdef POSITION 46 protected : st ring _comment ;44 protected : std::string _comment ; 47 45 #endif 48 46 … … 60 58 61 59 // -----[ methods ]--------------------------------------------------- 62 public : Interface (st ring name60 public : Interface (std::string name 63 61 #ifdef POSITION 64 62 ,direction_t direction … … 71 69 public : ~Interface (); 72 70 73 public : st ring get_name ();74 75 #ifdef POSITION 76 public : void set_comment (st ring comment);77 protected : st ring get_comment (void );78 #endif 79 80 protected : st ring signal_name (string name_interface,81 st ring name_signal ,71 public : std::string get_name (); 72 73 #ifdef POSITION 74 public : void set_comment (std::string comment); 75 protected : std::string get_comment (void ); 76 #endif 77 78 protected : std::string signal_name (std::string name_interface, 79 std::string name_signal , 82 80 direction_t direction ); 83 81 84 public : Signal * find_signal (st ring name);82 public : Signal * find_signal (std::string name); 85 83 public : bool find_signal (Signal * signal); 86 84 87 protected : st ring get_signal (void);88 public : Signal * set_signal (st ring name ,85 protected : std::string get_signal (void); 86 public : Signal * set_signal (std::string name , 89 87 direction_t direction, 90 88 uint32_t size , … … 93 91 94 92 #ifdef SYSTEMC 95 public : sc_in_clk * set_signal_clk (st ring name ,93 public : sc_in_clk * set_signal_clk (std::string name , 96 94 uint32_t size , 97 95 presence_port_t presence_port=CLOCK_VHDL_YES) … … 122 120 123 121 public : template <typename T> 124 sc_in <T> * set_signal_in (st ring name ,122 sc_in <T> * set_signal_in (std::string name , 125 123 uint32_t size , 126 124 presence_port_t presence_port=PORT_VHDL_YES_TESTBENCH_YES) … … 151 149 152 150 public : template <typename T> 153 sc_out <T> * set_signal_out (st ring name ,151 sc_out <T> * set_signal_out (std::string name , 154 152 uint32_t size , 155 153 presence_port_t presence_port=PORT_VHDL_YES_TESTBENCH_YES) … … 180 178 181 179 public : template <typename T> 182 sc_signal <T> * set_signal_internal (st ring name,180 sc_signal <T> * set_signal_internal (std::string name, 183 181 uint32_t size) 184 182 { … … 209 207 # ifdef VHDL_TESTBENCH 210 208 public : void set_signal (Vhdl * & vhdl); 211 public : void get_signal (list<st ring> * & list_signal);209 public : void get_signal (list<std::string> * & list_signal); 212 210 # endif 213 211 #endif … … 220 218 public : void testbench_cycle (void); 221 219 public : void testbench_body (Vhdl * & vhdl , 222 st ring counter_name ,223 st ring reset_name );224 public : st ring testbench_test (Vhdl * & vhdl ,225 st ring counter_name,226 st ring reset_name);227 public : st ring testbench_test_ok (Vhdl * & vhdl );228 protected : st ring testbench_test_name (Vhdl * & vhdl);229 protected : st ring testbench_test_ok_name(Vhdl * & vhdl);230 protected : st ring testbench_test_transaction_name(Vhdl * & vhdl);220 std::string counter_name , 221 std::string reset_name ); 222 public : std::string testbench_test (Vhdl * & vhdl , 223 std::string counter_name, 224 std::string reset_name); 225 public : std::string testbench_test_ok (Vhdl * & vhdl ); 226 protected : std::string testbench_test_name (Vhdl * & vhdl); 227 protected : std::string testbench_test_ok_name(Vhdl * & vhdl); 228 protected : std::string testbench_test_transaction_name(Vhdl * & vhdl); 231 229 #endif 232 230 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Interfaces.h
r62 r71 20 20 #include "Behavioural/include/Usage.h" 21 21 22 using namespace std;23 22 24 23 namespace morpheo { … … 28 27 { 29 28 // -----[ fields ]---------------------------------------------------- 30 private : const st ring _name;29 private : const std::string _name; 31 30 private : const Tusage_t _usage; 32 31 private : list<Interface_fifo*> * _list_interface; 33 32 34 33 // -----[ methods ]--------------------------------------------------- 35 public : Interfaces (st ring name,34 public : Interfaces (std::string name, 36 35 Tusage_t usage=USE_ALL); 37 36 public : Interfaces (const Interfaces & interfaces); 38 37 public : ~Interfaces (); 39 38 40 public : Interface_fifo * set_interface (st ring name39 public : Interface_fifo * set_interface (std::string name 41 40 #ifdef POSITION 42 41 ,direction_t direction … … 45 44 ); 46 45 #ifdef POSITION 47 public : Interface_fifo * set_interface (st ring name ,46 public : Interface_fifo * set_interface (std::string name , 48 47 direction_t direction , 49 48 localisation_t localisation, 50 st ring comment );49 std::string comment ); 51 50 #endif 52 private : st ring get_interface (void);51 private : std::string get_interface (void); 53 52 public :list<Interface_fifo*>* get_interface_list (void); 54 53 … … 56 55 public : void set_port (Vhdl * & vhdl ); 57 56 # ifdef VHDL_TESTBENCH 58 private : void get_signal (list<st ring> * & list_signal );57 private : void get_signal (list<std::string> * & list_signal ); 59 58 private : void set_signal (Vhdl * & vhdl ); 60 59 # endif … … 67 66 private : void testbench_generate_file (void); 68 67 public : void testbench (void); 69 private : st ring testbench_body (Vhdl * & vhdl ,70 st ring counter_name ,71 st ring reset_name );68 private : std::string testbench_body (Vhdl * & vhdl , 69 std::string counter_name , 70 std::string reset_name ); 72 71 #endif 73 72 74 public : Interface_fifo * find_interface (st ring name);75 public : Signal * find_signal (st ring name);73 public : Interface_fifo * find_interface (std::string name); 74 public : Signal * find_signal (std::string name); 76 75 public : bool find_signal (Signal * signal); 77 76 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Parameters.h
r62 r71 18 18 #include "Common/include/Debug.h" 19 19 20 using namespace std;21 22 20 namespace morpheo { 23 21 namespace behavioural { … … 37 35 38 36 // methods to print and test parameters 39 public : virtual st ring print (uint32_t depth) = 0;40 public : virtual st ring msg_error (void) = 0;37 public : virtual std::string print (uint32_t depth) = 0; 38 public : virtual std::string msg_error (void) = 0; 41 39 42 40 // methods to generate configuration file -
trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Parameters_Statistics.h
r50 r71 12 12 #include "Common/include/Debug.h" 13 13 #include <stdint.h> 14 using namespace std;15 14 16 15 namespace morpheo { -
trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Signal.h
r65 r71 26 26 #include "Common/include/ToString.h" 27 27 #include "Common/include/Debug.h" 28 29 using namespace std;30 28 31 29 namespace morpheo { … … 53 51 54 52 // -----[ fields ]---------------------------------------------------- 55 private : const st ring _name ;53 private : const std::string _name ; 56 54 private : const direction_t _direction ; 57 55 private : const presence_port_t _presence_port ; … … 68 66 69 67 #ifdef VHDL_TESTBENCH 70 private : list<st ring> * _list_value ;68 private : list<std::string> * _list_value ; 71 69 #endif 72 70 73 71 // -----[ methods ]--------------------------------------------------- 74 public : Signal (st ring name ,72 public : Signal (std::string name , 75 73 direction_t direction , 76 74 uint32_t size , … … 79 77 public : ~Signal (); 80 78 81 public : st ring get_name (void);79 public : std::string get_name (void); 82 80 public : uint32_t get_size (void); 83 81 public : void set_size (uint32_t size); … … 184 182 185 183 public : void set_signal (Vhdl * & vhdl); 186 public : void get_name_vhdl (list<st ring> * & list_signal);184 public : void get_name_vhdl (list<std::string> * & list_signal); 187 185 188 186 public : void testbench (void); 189 187 public : void testbench_body (Vhdl * & vhdl , 190 st ring counter_name ,191 st ring reset_name );188 std::string counter_name , 189 std::string reset_name ); 192 190 public : void testbench_test_ok(Vhdl * & vhdl ); 193 191 # endif -
trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Statistics.h
r53 r71 18 18 #include "Common/include/Percent.h" 19 19 20 using namespace std;21 22 20 namespace morpheo { 23 21 namespace behavioural { … … 26 24 { 27 25 // -----[ fields ]---------------------------------------------------- 28 protected : const st ring _name;26 protected : const std::string _name; 29 27 protected : const Parameters_Statistics * _parameters_statistics; 30 28 … … 33 31 34 32 // -----[ methods ]--------------------------------------------------- 35 public : Statistics (st ring name ,33 public : Statistics (std::string name , 36 34 Parameters_Statistics * parameters_statistics); 37 35 public : virtual ~Statistics (); … … 40 38 protected : uint32_t compute_cycle_end (uint32_t num_statistics, uint32_t nb_cycle); 41 39 42 public : virtual st ring print_body (uint32_t depth) = 0;43 public : virtual st ring print (uint32_t depth) = 0;44 public : void generate_file (st ring stat );40 public : virtual std::string print_body (uint32_t depth) = 0; 41 public : virtual std::string print (uint32_t depth) = 0; 42 public : void generate_file (std::string stat ); 45 43 public : void generate_file (void); 46 44 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Vhdl.h
r69 r71 20 20 #include "Common/include/ErrorMorpheo.h" 21 21 22 using namespace std; 22 namespace morpheo { 23 namespace behavioural { 23 24 24 namespace morpheo { 25 namespace behavioural { 25 std::string std_logic (uint32_t size); 26 std::string std_logic_conv (uint32_t size, std::string value); 27 std::string std_logic_conv (uint32_t size, uint32_t value); 28 std::string std_logic_range (uint32_t size, uint32_t max , uint32_t min ); 29 std::string std_logic_range (uint32_t max , uint32_t min ); 30 std::string std_logic_range (uint32_t size); 31 std::string std_logic_others (uint32_t size, uint32_t cst ); 26 32 27 string std_logic (uint32_t size); 28 string std_logic_conv (uint32_t size, string value); 29 string std_logic_conv (uint32_t size, uint32_t value); 30 string std_logic_range (uint32_t size, uint32_t max , uint32_t min ); 31 string std_logic_range (uint32_t max , uint32_t min ); 32 string std_logic_range (uint32_t size); 33 string std_logic_others (uint32_t size, uint32_t cst ); 33 class Vhdl 34 { 35 // -----[ fields ]---------------------------------------------------- 36 private : const std::string _name ; 34 37 35 class Vhdl 36 { 37 // -----[ fields ]---------------------------------------------------- 38 private : const string _name ; 38 private : std::list<std::string> _list_library_work ; 39 private : std::list<std::string> _list_signal ; 40 private : std::list<std::string> _list_type ; 41 private : std::list<std::string> _list_alias ; 42 private : std::list<std::string> _list_port ; 43 private : std::list<std::string> _list_body ; 39 44 40 private : list<string> _list_library_work ; 41 private : list<string> _list_signal ; 42 private : list<string> _list_type ; 43 private : list<string> _list_alias ; 44 private : list<string> _list_port ; 45 private : list<string> _list_body ; 46 47 // -----[ methods ]--------------------------------------------------- 48 public : Vhdl (string name); 49 public : ~Vhdl (); 50 51 public : void generate_file (void); 52 public : void generate_file (bool generate_package, 53 bool generate_model ); 45 // -----[ methods ]--------------------------------------------------- 46 public : Vhdl (std::string name); 47 public : ~Vhdl (); 54 48 55 private : void generate_file_package (void); 56 private : void generate_file_model (void); 57 58 private : string get_package (uint32_t depth , 59 string filename , 60 string package_name , 61 string entity_name ); 62 private : string get_model (uint32_t depth , 63 string filename , 64 string entity_name , 65 string architecture_name ); 66 private : string get_header (uint32_t depth , 67 string filename ); 68 private : string get_entity (uint32_t depth , 69 string name ); 70 private : string get_architecture (uint32_t depth , 71 string name , 72 string entity_name ); 73 private : string get_component (uint32_t depth , 74 string name ); 49 public : void generate_file (void); 50 public : void generate_file (bool generate_package, 51 bool generate_model ); 75 52 76 private : string get_port (uint32_t depth ); 77 public : void set_port (string name , 78 direction_t direction , 79 string type ); 80 public : void set_port (string name , 81 direction_t direction , 82 uint32_t size ); 83 private : string get_signal (uint32_t depth ); 84 public : void set_signal (string name , 85 string type ); 86 public : void set_signal (string name , 87 uint32_t signal ); 88 public : void set_signal (string name , 89 string type , 90 string init ); 91 public : void set_signal (string name , 92 uint32_t size , 93 string init ); 94 public : void set_signal (string name , 95 uint32_t size , 96 uint32_t init ); 97 public : void set_constant (string name , 98 string type , 99 string init ); 100 public : void set_constant (string name , 101 uint32_t size , 102 string init ); 103 public : void set_constant (string name , 104 uint32_t size , 105 uint32_t init ); 53 private : void generate_file_package (void); 54 private : void generate_file_model (void); 106 55 107 private : string get_type (uint32_t depth ); 108 public : void set_type (string name , 109 string type ); 110 private : string get_alias (uint32_t depth ); 111 public : void set_alias (string name1 , 112 string type1 , 113 string name2 , 114 string range2 ); 115 public : void set_alias (string name1 , 116 uint32_t size1 , 117 string name2 , 118 string range2 ); 56 private : std::string get_package (uint32_t depth , 57 std::string filename , 58 std::string package_name , 59 std::string entity_name ); 60 private : std::string get_model (uint32_t depth , 61 std::string filename , 62 std::string entity_name , 63 std::string architecture_name ); 64 private : std::string get_header (uint32_t depth , 65 std::string filename ); 66 private : std::string get_entity (uint32_t depth , 67 std::string name ); 68 private : std::string get_architecture (uint32_t depth , 69 std::string name , 70 std::string entity_name ); 71 private : std::string get_component (uint32_t depth , 72 std::string name ); 119 73 120 public : string get_list (list<string> liste , 121 uint32_t depth , 122 string separator , 123 bool last_separator ); 124 public : void set_list (list<string> & liste , 125 string text ); 74 private : std::string get_port (uint32_t depth ); 75 public : void set_port (std::string name , 76 direction_t direction , 77 std::string type ); 78 public : void set_port (std::string name , 79 direction_t direction , 80 uint32_t size ); 81 private : std::string get_signal (uint32_t depth ); 82 public : void set_signal (std::string name , 83 std::string type ); 84 public : void set_signal (std::string name , 85 uint32_t signal ); 86 public : void set_signal (std::string name , 87 std::string type , 88 std::string init ); 89 public : void set_signal (std::string name , 90 uint32_t size , 91 std::string init ); 92 public : void set_signal (std::string name , 93 uint32_t size , 94 uint32_t init ); 95 public : void set_constant (std::string name , 96 std::string type , 97 std::string init ); 98 public : void set_constant (std::string name , 99 uint32_t size , 100 std::string init ); 101 public : void set_constant (std::string name , 102 uint32_t size , 103 uint32_t init ); 126 104 127 private : string get_body (uint32_t depth ); 128 public : void set_body (string text ); 105 private : std::string get_type (uint32_t depth ); 106 public : void set_type (std::string name , 107 std::string type ); 108 private : std::string get_alias (uint32_t depth ); 109 public : void set_alias (std::string name1 , 110 std::string type1 , 111 std::string name2 , 112 std::string range2 ); 113 public : void set_alias (std::string name1 , 114 uint32_t size1 , 115 std::string name2 , 116 std::string range2 ); 129 117 130 public : void set_body_component (string name_instance , 131 string name_component , 132 list<string> list_port_map ); 133 public : void set_body_component_port_map (list<string> & list_port_map , 134 string name_port , 135 uint32_t size_port , 136 string name_signal , 137 uint32_t size_signal ); 118 public : std::string get_list (std::list<std::string> liste , 119 uint32_t depth , 120 std::string separator , 121 bool last_separator ); 122 public : void set_list (std::list<std::string> & liste , 123 std::string text ); 138 124 139 private : string get_library_ieee (uint32_t depth ); 140 private : string get_library_work (uint32_t depth ); 141 public : void set_library_work (string package_name ); 125 private : std::string get_body (uint32_t depth ); 126 public : void set_body (std::string text ); 142 127 143 private : string direction_toString (direction_t direction); 144 }; 128 public : void set_body_component (std::string name_instance , 129 std::string name_component , 130 std::list<std::string> list_port_map ); 131 public : void set_body_component_port_map (std::list<std::string> & list_port_map , 132 std::string name_port , 133 uint32_t size_port , 134 std::string name_signal , 135 uint32_t size_signal ); 145 136 146 }; // end namespace behavioural 137 private : std::string get_library_ieee (uint32_t depth ); 138 private : std::string get_library_work (uint32_t depth ); 139 public : void set_library_work (std::string package_name ); 140 141 private : std::string direction_toString (direction_t direction); 142 }; 143 144 }; // end namespace behavioural 147 145 }; // end namespace morpheo 148 146 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/include/XML.h
r44 r71 16 16 #include "Common/include/Debug.h" 17 17 18 using namespace std;19 20 18 namespace morpheo { 21 19 namespace behavioural { … … 25 23 { 26 24 // -----[ fields ]---------------------------------------------------- 27 private : const st ring _name ;28 private : st ring _filename_extension;29 private : st ring _body ;30 private : list<string> _list_balise_name ;25 private : const std::string _name ; 26 private : std::string _filename_extension; 27 private : std::string _body ; 28 private : std::list<std::string> _list_balise_name ; 31 29 32 30 // -----[ methods ]--------------------------------------------------- 33 public : XML (st ring name);31 public : XML (std::string name); 34 32 public : ~XML (void); 35 33 36 public : bool balise_open (st ring name); // no attribut37 public : bool balise_open_begin (st ring name);34 public : bool balise_open (std::string name); // no attribut 35 public : bool balise_open_begin (std::string name); 38 36 public : bool balise_open_end (void); 39 37 public : bool balise_close (void); 40 public : bool singleton (st ring name); // no attribut41 public : bool singleton_begin (st ring name);38 public : bool singleton (std::string name); // no attribut 39 public : bool singleton_begin (std::string name); 42 40 public : bool singleton_end (void); 43 public : bool attribut (st ring name,string value);41 public : bool attribut (std::string name, std::string value); 44 42 public : bool insert_XML (XML xml ); 45 43 46 public : void filename_extension (st ring extension);44 public : void filename_extension (std::string extension); 47 45 public : void generate_file (void); 48 public : void generate_file (st ring encoding);49 public : st ring get_body (void);50 public : st ring get_body (uint32_t depth);46 public : void generate_file (std::string encoding); 47 public : std::string get_body (void); 48 public : std::string get_body (uint32_t depth); 51 49 52 public : bool comment (st ring text);53 public : bool text (st ring text);50 public : bool comment (std::string text); 51 public : bool text (std::string text); 54 52 55 private : st ring indent (uint32_t depth );56 private : st ring indent (void);53 private : std::string indent (uint32_t depth ); 54 private : std::string indent (void); 57 55 private : uint32_t depth (void); 58 56 59 private : void header (st ring encoding);57 private : void header (std::string encoding); 60 58 }; 61 59 }; // end namespace behavioural
Note: See TracChangeset
for help on using the changeset viewer.