Changeset 41 for trunk/IPs/systemC/processor/Morpheo/Behavioural/include
- Timestamp:
- Jun 7, 2007, 9:13:47 PM (18 years ago)
- Location:
- trunk/IPs/systemC/processor/Morpheo/Behavioural/include
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Debug_component.h
r38 r41 7 7 #define DEBUG_Group false 8 8 #define DEBUG_Shifter false 9 #define DEBUG_Register_File false 10 #define DEBUG_RegisterFile_Multi_Banked false 11 #define DEBUG_RegisterFile_Multi_Banked_Glue false 9 #define DEBUG_Register_File false 10 #define DEBUG_RegisterFile_Monolithic false 11 #define DEBUG_RegisterFile_Multi_Banked false 12 #define DEBUG_RegisterFile_Multi_Banked_Glue false 12 13 #define DEBUG_Select false 13 14 #define DEBUG_Select_Priority_Fixed false -
trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Direction.h
r31 r41 7 7 namespace behavioural { 8 8 9 typedef enum { IN, OUT, INOUT } direction_t; 9 typedef enum { IN, OUT } direction_t; 10 //typedef enum { IN, OUT, INOUT } direction_t; 10 11 11 12 }; // end namespace behavioural … … 17 18 case morpheo::behavioural::IN : return "in" ; break; 18 19 case morpheo::behavioural::OUT : return "out" ; break; 19 20 // case morpheo::behavioural::INOUT : return "inout" ; break; 20 21 default : return "" ; break; 21 22 } -
trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Interface.h
r40 r41 21 21 #ifdef VHDL 22 22 #include "Behavioural/include/Vhdl.h" 23 #endif24 #ifdef VHDL_TESTBENCH25 #include "Behavioural/include/Vhdl_Testbench.h"26 23 #endif 27 24 #include "Include/ToString.h" … … 53 50 54 51 #ifdef VHDL_TESTBENCH 55 private : list<string> * _list_cycle;52 private : uint32_t _nb_cycle ; 56 53 #endif 57 54 … … 80 77 public : sc_in_clk * set_signal_clk (string name , 81 78 uint32_t size , 82 presence_port_t presence_port= PORT_VHDL_YES_TESTBENCH_YES)79 presence_port_t presence_port=CLOCK_VHDL_YES) 83 80 { 84 81 log_printf(FUNC,Behavioural,"set_signal_clk","Begin"); 85 82 86 Signal * sig = set_signal (name, IN , size, presence_port); 83 if ((presence_port != CLOCK_VHDL_YES) and 84 (presence_port != CLOCK_VHDL_NO )) 85 throw ErrorMorpheo ("Signal \""+name+"\" is a clock, bad presence_port."); 86 87 Signal * sig = set_signal (name, IN , size, presence_port); 87 88 sc_in_clk * signal = new sc_in_clk (sig->_name.c_str()); 88 89 … … 98 99 { 99 100 log_printf(FUNC,Behavioural,"set_signal_in","Begin"); 101 102 if ((presence_port == CLOCK_VHDL_YES) or 103 (presence_port == CLOCK_VHDL_NO )) 104 throw ErrorMorpheo ("Signal \""+name+"\" is not a clock, bad presence_port."); 100 105 101 106 Signal * sig = set_signal (name, IN , size, presence_port); … … 117 122 log_printf(FUNC,Behavioural,"set_signal_out","Begin"); 118 123 124 if ((presence_port == CLOCK_VHDL_YES) or 125 (presence_port == CLOCK_VHDL_NO )) 126 throw ErrorMorpheo ("Signal \""+name+"\" is not a clock, bad presence_port."); 127 119 128 Signal * sig = set_signal (name, OUT , size, presence_port); 120 129 sc_out <T> * port = new sc_out <T> (sig->_name.c_str()); … … 131 140 #ifdef VHDL 132 141 public : void set_port (Vhdl * & vhdl); 142 #ifdef VHDL_TESTBENCH 143 public : void set_signal (Vhdl * & vhdl); 144 public : void get_signal (list<string> * & list_signal); 145 #endif 133 146 #endif 134 147 #ifdef VHDL_TESTBENCH 135 public : void set_port (Vhdl_Testbench * & vhdl_testbench); 148 public : uint32_t get_cycle (void); 149 public : string get_clock (void); 150 151 public : void testbench (void); 152 public : void testbench_cycle (void); 153 public : void testbench_body (Vhdl * & vhdl , 154 string counter_name ); 155 public : string testbench_test (Vhdl * & vhdl , 156 string counter_name); 157 public : string testbench_test_ok (Vhdl * & vhdl ); 158 protected : string testbench_test_name (Vhdl * & vhdl); 159 protected : string testbench_test_ok_name(Vhdl * & vhdl); 160 136 161 #endif 137 162 … … 139 164 public : void port_map (void * entity, 140 165 void * interface); 141 #endif142 143 #ifdef VHDL_TESTBENCH144 public : void testbench_cycle (void);145 public : void testbench (Vhdl_Testbench * & vhdl_testbench);146 166 #endif 147 167 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Interface_fifo.h
r40 r41 23 23 #ifdef VHDL_TESTBENCH 24 24 private : bool _test_exhaustive; 25 private : list<uint32_t> * _list_cycle ; 26 25 27 #endif 26 28 … … 72 74 73 75 #ifdef VHDL_TESTBENCH 76 public : uint32_t get_cycle (void); 77 78 public : void testbench (void); 74 79 public : bool testbench_transaction(void); 75 public : void testbench (Vhdl_Testbench * & vhdl_testbench); 80 public : void testbench_cycle (void); 81 public : string testbench_test (Vhdl * & vhdl , 82 string counter_name); 76 83 #endif 77 84 }; -
trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Interfaces.h
r40 r41 18 18 #include "Behavioural/include/Vhdl.h" 19 19 #endif 20 #ifdef VHDL_TESTBENCH21 #include "Behavioural/include/Vhdl_Testbench.h"22 #endif23 20 24 21 using namespace std; … … 30 27 { 31 28 // -----[ fields ]---------------------------------------------------- 29 private : const string _name; 32 30 private : list<Interface_fifo*> * _list_interface; 33 31 34 32 // -----[ methods ]--------------------------------------------------- 35 public : Interfaces ( void);33 public : Interfaces (string name); 36 34 public : Interfaces (const Interfaces & interfaces); 37 35 public : ~Interfaces (); … … 48 46 #ifdef VHDL 49 47 public : void set_port (Vhdl * & vhdl ); 48 # ifdef VHDL_TESTBENCH 49 private : void get_signal (list<string> * & list_signal ); 50 private : void set_signal (Vhdl * & vhdl ); 51 # endif 50 52 #endif 51 53 #ifdef VHDL_TESTBENCH 52 public : void set_port (Vhdl_Testbench * & vhdl_testbench); 54 private : uint32_t get_cycle (void); 55 private : string get_clock (void); 56 57 private : void testbench_generate_file (void); 58 public : void testbench (void); 59 private : string testbench_body (Vhdl * & vhdl , 60 string counter_name ); 53 61 #endif 54 62 55 63 public : Interface_fifo * find_interface (string name); 56 57 #ifdef VHDL_TESTBENCH58 public : void testbench (Vhdl_Testbench * & vhdl_testbench);59 #endif60 64 61 65 public : XML toXML (void); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Signal.h
r40 r41 16 16 #include <iostream> 17 17 18 #ifdef VHDL _TESTBENCH19 #include "Behavioural/include/Vhdl _Testbench.h"18 #ifdef VHDL 19 #include "Behavioural/include/Vhdl.h" 20 20 #endif 21 21 … … 42 42 PORT_VHDL_YES_TESTBENCH_NO , 43 43 PORT_VHDL_NO_TESTBENCH_YES , 44 PORT_VHDL_NO_TESTBENCH_NO } presence_port_t; 44 PORT_VHDL_NO_TESTBENCH_NO , 45 CLOCK_VHDL_YES , 46 CLOCK_VHDL_NO } presence_port_t; 45 47 46 48 class Signal … … 109 111 } 110 112 111 public : void testbench (Vhdl_Testbench * & vhdl_testbench);112 113 113 public : template <typename T> 114 114 void alloc (void * port) … … 136 136 _type_info = UNKNOW; 137 137 } 138 139 public : void testbench (void); 140 public : void testbench_body (Vhdl * & vhdl , 141 string counter_name ); 142 public : void testbench_test_ok(Vhdl * & vhdl ); 138 143 #endif 139 144 #ifdef VHDL 145 public : void set_port (Vhdl * & vhdl); 146 # ifdef VHDL_TESTBENCH 147 public : string get_clock (void); 148 public : void set_signal (Vhdl * & vhdl); 149 public : void get_name_vhdl (list<string> * & list_signal); 150 # endif 151 #endif 140 152 public : XML toXML (void); 141 153 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Vhdl_Testbench.h
r40 r41 38 38 }; 39 39 40 // -----[ fields ]----------------------------------------------------41 private : const string _name ;42 private : const bool _exhaustive ;40 // // -----[ fields ]---------------------------------------------------- 41 // private : const string _name ; 42 // private : const bool _exhaustive ; 43 43 44 private : string _clock_name ;45 private : uint32_t _num_cycle ;44 // private : string _clock_name ; 45 // private : uint32_t _num_cycle ; 46 46 47 private : uint32_t _size_input ;48 private : uint32_t _size_output;47 // private : uint32_t _size_input ; 48 // private : uint32_t _size_output; 49 49 50 private : list<string> _list_input ;51 private : list<string> _list_input_cycle;52 private : list<uint32_t> _list_input_size ;50 // private : list<string> _list_input ; 51 // private : list<string> _list_input_cycle; 52 // private : list<uint32_t> _list_input_size ; 53 53 54 private : list<string> _list_output;55 private : list<string> _list_output_cycle;56 private : list<uint32_t> _list_output_size ;54 // private : list<string> _list_output; 55 // private : list<string> _list_output_cycle; 56 // private : list<uint32_t> _list_output_size ; 57 57 58 private : list<bool> _list_test;59 private : list<string> _list_port;60 private : list<label_t> _list_label;58 // private : list<bool> _list_test; 59 // private : list<string> _list_port; 60 // private : list<label_t> _list_label; 61 61 62 private : list<uint32_t>::iterator _num_input ;63 private : list<uint32_t>::iterator _num_output;62 // private : list<uint32_t>::iterator _num_input ; 63 // private : list<uint32_t>::iterator _num_output; 64 64 65 private : Vhdl * _vhdl;65 // private : Vhdl * _vhdl; 66 66 67 67 // -----[ methods ]--------------------------------------------------- 68 68 public : Vhdl_Testbench (string name, 69 bool exhaustive=true) ;70 public : virtual ~Vhdl_Testbench ();69 bool exhaustive=true){}; 70 public : ~Vhdl_Testbench (){}; 71 71 72 public : void generate_file (void) ;72 public : void generate_file (void){}; 73 73 74 74 public : void set_port (string name , 75 75 direction_t direction , 76 uint32_t size ) ;76 uint32_t size ){}; 77 77 public : void set_clock (string name , 78 bool model_have_clock) ;79 public : void new_cycle (void) ;78 bool model_have_clock){}; 79 public : void new_cycle (void){}; 80 80 81 private : uint32_t get_input (void) ;82 private : void set_input (void) ;83 public : void add_input (uint32_t value ) ;81 private : uint32_t get_input (void){return 0;}; 82 private : void set_input (void){}; 83 public : void add_input (uint32_t value ){}; 84 84 85 private : uint32_t get_output (void) ;86 private : void set_output (void) ;87 public : void add_output (uint32_t value ) ;85 private : uint32_t get_output (void){return 0;}; 86 private : void set_output (void){}; 87 public : void add_output (uint32_t value ){}; 88 88 89 private : uint32_t get_test (void) ;90 public : void add_test (bool must_test ) ;89 private : uint32_t get_test (void){return 0;}; 90 public : void add_test (bool must_test ){}; 91 91 92 private : void get_label (void) ;93 public : void add_label (string label ) ;92 private : void get_label (void){}; 93 public : void add_label (string label ){}; 94 94 95 private : void generate_process_clock (uint32_t counter ) ;96 private : void generate_instance (void) ;95 private : void generate_process_clock (uint32_t counter ){}; 96 private : void generate_instance (void){}; 97 97 }; 98 98
Note: See TracChangeset
for help on using the changeset viewer.