[29] | 1 | #ifndef morpheo_behavioural_Interfaces_h |
---|
| 2 | #define morpheo_behavioural_Interfaces_h |
---|
| 3 | |
---|
| 4 | /* |
---|
| 5 | * $Id$ |
---|
| 6 | * |
---|
| 7 | * [ Description ] |
---|
| 8 | * |
---|
| 9 | */ |
---|
| 10 | |
---|
| 11 | #include <stdint.h> |
---|
| 12 | #include <iostream> |
---|
| 13 | #include <list> |
---|
[40] | 14 | #include "Behavioural/include/Interface_fifo.h" |
---|
[44] | 15 | #include "Common/include/ToString.h" |
---|
| 16 | #include "Common/include/Debug.h" |
---|
[29] | 17 | #ifdef VHDL |
---|
| 18 | #include "Behavioural/include/Vhdl.h" |
---|
| 19 | #endif |
---|
[57] | 20 | #include "Behavioural/include/Usage.h" |
---|
[29] | 21 | |
---|
| 22 | using namespace std; |
---|
| 23 | |
---|
| 24 | namespace morpheo { |
---|
| 25 | namespace behavioural { |
---|
| 26 | |
---|
| 27 | class Interfaces |
---|
| 28 | { |
---|
| 29 | // -----[ fields ]---------------------------------------------------- |
---|
[41] | 30 | private : const string _name; |
---|
[57] | 31 | private : const Tusage_t _usage; |
---|
[40] | 32 | private : list<Interface_fifo*> * _list_interface; |
---|
[29] | 33 | |
---|
| 34 | // -----[ methods ]--------------------------------------------------- |
---|
[57] | 35 | public : Interfaces (string name, |
---|
| 36 | Tusage_t usage=USE_ALL); |
---|
[31] | 37 | public : Interfaces (const Interfaces & interfaces); |
---|
[29] | 38 | public : ~Interfaces (); |
---|
| 39 | |
---|
[42] | 40 | public : Interface_fifo * set_interface (string name |
---|
| 41 | #ifdef POSITION |
---|
| 42 | ,direction_t direction |
---|
| 43 | ,localisation_t localisation |
---|
| 44 | #endif |
---|
| 45 | ); |
---|
| 46 | #ifdef POSITION |
---|
[40] | 47 | public : Interface_fifo * set_interface (string name , |
---|
[31] | 48 | direction_t direction , |
---|
| 49 | localisation_t localisation, |
---|
| 50 | string comment ); |
---|
[42] | 51 | #endif |
---|
[31] | 52 | private : string get_interface (void); |
---|
[42] | 53 | public :list<Interface_fifo*>* get_interface_list (void); |
---|
[29] | 54 | |
---|
| 55 | #ifdef VHDL |
---|
| 56 | public : void set_port (Vhdl * & vhdl ); |
---|
[41] | 57 | # ifdef VHDL_TESTBENCH |
---|
| 58 | private : void get_signal (list<string> * & list_signal ); |
---|
| 59 | private : void set_signal (Vhdl * & vhdl ); |
---|
| 60 | # endif |
---|
[29] | 61 | #endif |
---|
| 62 | #ifdef VHDL_TESTBENCH |
---|
[41] | 63 | private : uint32_t get_cycle (void); |
---|
[42] | 64 | private : Signal * get_clock (void); |
---|
| 65 | private : Signal * get_reset (void); |
---|
[41] | 66 | |
---|
| 67 | private : void testbench_generate_file (void); |
---|
| 68 | public : void testbench (void); |
---|
| 69 | private : string testbench_body (Vhdl * & vhdl , |
---|
[42] | 70 | string counter_name , |
---|
| 71 | string reset_name ); |
---|
[29] | 72 | #endif |
---|
| 73 | |
---|
[40] | 74 | public : Interface_fifo * find_interface (string name); |
---|
[42] | 75 | public : Signal * find_signal (string name); |
---|
| 76 | public : bool find_signal (Signal * signal); |
---|
[31] | 77 | |
---|
[42] | 78 | #ifdef POSITION |
---|
[29] | 79 | public : XML toXML (void); |
---|
[31] | 80 | public : XML toXML_mapping (void); |
---|
| 81 | #endif |
---|
[29] | 82 | public : friend ostream& operator<< (ostream& output_stream, |
---|
| 83 | morpheo::behavioural::Interfaces & x); |
---|
| 84 | |
---|
| 85 | }; |
---|
| 86 | |
---|
| 87 | }; // end namespace behavioural |
---|
| 88 | }; // end namespace morpheo |
---|
| 89 | |
---|
| 90 | #endif |
---|