Changeset 40 for trunk/IPs/systemC/processor/Morpheo/Behavioural/include
- Timestamp:
- Jun 5, 2007, 11:06:46 PM (17 years ago)
- Location:
- trunk/IPs/systemC/processor/Morpheo/Behavioural/include
- Files:
-
- 1 added
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Configuration_Parameters.h
r3 r40 12 12 #include <iostream> 13 13 #include "Behavioural/include/XML.h" 14 #include "Behavioural/include/Environnement.h" 14 15 #include "Include/ErrorMorpheo.h" 15 16 #include "Include/ToString.h" -
trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Environnement.h
r2 r40 6 6 # error "To have the vhdl's test bench, you must set flags SYSTEMC" 7 7 #endif 8 9 #if (defined(VHDL_TESTBENCH) and not defined(VHDL)) 10 # error "To have the vhdl's test bench, you must set flags VHDL" 11 #endif -
trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Interface.h
r38 r40 39 39 40 40 // -----[ fields ]---------------------------------------------------- 41 pr ivate: const string _name ;42 pr ivate: const direction_t _direction ;43 pr ivate: const localisation_t _localisation ;44 pr ivate: string _comment ;41 protected : const string _name ; 42 protected : const direction_t _direction ; 43 protected : const localisation_t _localisation ; 44 protected : string _comment ; 45 45 46 private : list<Signal *> * _list_signal ; 47 46 protected : list<Signal *> * _list_signal ; 48 47 49 48 #ifdef POSITION 50 pr ivate: bool _is_map ;51 pr ivate: void * _entity_map ; // Entity -> erreur cyclique52 pr ivate: void * _interface_map; // pour être homogène avec _entity_map49 protected : bool _is_map ; 50 protected : void * _entity_map ; // Entity -> erreur cyclique 51 protected : void * _interface_map; // pour être homogène avec _entity_map 53 52 #endif 54 53 54 #ifdef VHDL_TESTBENCH 55 private : list<string> * _list_cycle ; 56 #endif 57 55 58 // -----[ methods ]--------------------------------------------------- 56 59 public : Interface (string name , … … 62 65 63 66 public : void set_comment (string comment); 64 pr ivate: string get_comment (void );67 protected : string get_comment (void ); 65 68 66 private : string get_signal (void); 69 protected : string signal_name (string name_interface, 70 string name_signal , 71 direction_t direction ); 72 73 protected : string get_signal (void); 67 74 public : Signal * set_signal (string name , 68 75 direction_t direction, … … 135 142 136 143 #ifdef VHDL_TESTBENCH 144 public : void testbench_cycle (void); 137 145 public : void testbench (Vhdl_Testbench * & vhdl_testbench); 138 146 #endif -
trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Interfaces.h
r38 r40 12 12 #include <iostream> 13 13 #include <list> 14 #include "Behavioural/include/Interface .h"14 #include "Behavioural/include/Interface_fifo.h" 15 15 #include "Include/ToString.h" 16 16 #include "Include/Debug.h" … … 30 30 { 31 31 // -----[ fields ]---------------------------------------------------- 32 private : list<Interface *> * _list_interface;32 private : list<Interface_fifo*> * _list_interface; 33 33 34 34 // -----[ methods ]--------------------------------------------------- … … 37 37 public : ~Interfaces (); 38 38 39 public : Interface *set_interface (string name ,39 public : Interface_fifo * set_interface (string name , 40 40 direction_t direction , 41 41 localisation_t localisation); 42 public : Interface *set_interface (string name ,42 public : Interface_fifo * set_interface (string name , 43 43 direction_t direction , 44 44 localisation_t localisation, … … 53 53 #endif 54 54 55 public : Interface *find_interface (string name);55 public : Interface_fifo * find_interface (string name); 56 56 57 57 #ifdef VHDL_TESTBENCH -
trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Signal.h
r38 r40 23 23 #include "Behavioural/include/XML.h" 24 24 #include "Include/ErrorMorpheo.h" 25 #include "Include/ToBase2.h" 25 26 #include "Include/ToString.h" 26 27 #include "Include/Debug.h" … … 56 57 private : void * _signal ; 57 58 private : type_info_t _type_info ; 59 60 private : list<string> * _list_value ; 58 61 #endif 59 62 … … 67 70 68 71 #ifdef VHDL_TESTBENCH 72 public :template <typename T> 73 T read (void) 74 { 75 switch (_direction) 76 { 77 case IN : {return read_in <T>();} 78 case OUT : {return read_out <T>();} 79 default : throw (ErrorMorpheo ("Signal \""+_name+"\" : direction unknow.")); 80 } 81 } 82 83 public :template <typename T> 84 T read_in (void) 85 { 86 switch (_type_info) 87 { 88 case BOOL : return (static_cast<sc_in <bool > *>(_signal)->read()); 89 case UINT8_T : return (static_cast<sc_in <uint8_t > *>(_signal)->read()); 90 case UINT16_T : return (static_cast<sc_in <uint16_t> *>(_signal)->read()); 91 case UINT32_T : return (static_cast<sc_in <uint32_t> *>(_signal)->read()); 92 case UINT64_T : return (static_cast<sc_in <uint64_t> *>(_signal)->read()); 93 default : throw (ErrorMorpheo ("Signal \""+_name+"\" : type unknow.")); 94 } 95 } 96 97 public :template <typename T> 98 T read_out(void) 99 { 100 switch (_type_info) 101 { 102 case BOOL : return (static_cast<sc_out <bool > *>(_signal)->read()); 103 case UINT8_T : return (static_cast<sc_out <uint8_t > *>(_signal)->read()); 104 case UINT16_T : return (static_cast<sc_out <uint16_t> *>(_signal)->read()); 105 case UINT32_T : return (static_cast<sc_out <uint32_t> *>(_signal)->read()); 106 case UINT64_T : return (static_cast<sc_out <uint64_t> *>(_signal)->read()); 107 default : throw (ErrorMorpheo ("Signal \""+_name+"\" : type unknow.")); 108 } 109 } 110 69 111 public : void testbench (Vhdl_Testbench * & vhdl_testbench); 70 112 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Statistics.h
r2 r40 13 13 #include <stdint.h> 14 14 #include <iostream> 15 #include "Behavioural/include/Environnement.h" 15 16 #include "Behavioural/include/Parameters_Statistics.h" 16 17 #include "Include/Average.h" -
trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Vhdl.h
r29 r40 14 14 #include <iostream> 15 15 #include <list> 16 #include "Behavioural/include/Environnement.h" 16 17 #include "Behavioural/include/Direction.h" 17 18 #include "Include/ToString.h" -
trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Vhdl_Testbench.h
r2 r40 11 11 */ 12 12 13 #include "Behavioural/include/Environnement.h" 13 14 #include "Behavioural/include/Vhdl.h" 14 15 #include "Include/ToString.h" … … 39 40 // -----[ fields ]---------------------------------------------------- 40 41 private : const string _name ; 42 private : const bool _exhaustive ; 43 41 44 private : string _clock_name ; 42 45 private : uint32_t _num_cycle ; … … 48 51 private : list<string> _list_input_cycle; 49 52 private : list<uint32_t> _list_input_size ; 53 50 54 private : list<string> _list_output; 51 55 private : list<string> _list_output_cycle; 52 56 private : list<uint32_t> _list_output_size ; 57 53 58 private : list<bool> _list_test; 54 59 private : list<string> _list_port; … … 61 66 62 67 // -----[ methods ]--------------------------------------------------- 63 public : Vhdl_Testbench (string name); 68 public : Vhdl_Testbench (string name, 69 bool exhaustive=true); 64 70 public : virtual ~Vhdl_Testbench (); 65 71
Note: See TracChangeset
for help on using the changeset viewer.