[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 |
---|
| 20 | |
---|
| 21 | using namespace std; |
---|
| 22 | |
---|
| 23 | namespace morpheo { |
---|
| 24 | namespace behavioural { |
---|
| 25 | |
---|
| 26 | class Interfaces |
---|
| 27 | { |
---|
| 28 | // -----[ fields ]---------------------------------------------------- |
---|
[41] | 29 | private : const string _name; |
---|
[40] | 30 | private : list<Interface_fifo*> * _list_interface; |
---|
[29] | 31 | |
---|
| 32 | // -----[ methods ]--------------------------------------------------- |
---|
[41] | 33 | public : Interfaces (string name); |
---|
[31] | 34 | public : Interfaces (const Interfaces & interfaces); |
---|
[29] | 35 | public : ~Interfaces (); |
---|
| 36 | |
---|
[42] | 37 | public : Interface_fifo * set_interface (string name |
---|
| 38 | #ifdef POSITION |
---|
| 39 | ,direction_t direction |
---|
| 40 | ,localisation_t localisation |
---|
| 41 | #endif |
---|
| 42 | ); |
---|
| 43 | #ifdef POSITION |
---|
[40] | 44 | public : Interface_fifo * set_interface (string name , |
---|
[31] | 45 | direction_t direction , |
---|
| 46 | localisation_t localisation, |
---|
| 47 | string comment ); |
---|
[42] | 48 | #endif |
---|
[31] | 49 | private : string get_interface (void); |
---|
[42] | 50 | public :list<Interface_fifo*>* get_interface_list (void); |
---|
[29] | 51 | |
---|
| 52 | #ifdef VHDL |
---|
| 53 | public : void set_port (Vhdl * & vhdl ); |
---|
[41] | 54 | # ifdef VHDL_TESTBENCH |
---|
| 55 | private : void get_signal (list<string> * & list_signal ); |
---|
| 56 | private : void set_signal (Vhdl * & vhdl ); |
---|
| 57 | # endif |
---|
[29] | 58 | #endif |
---|
| 59 | #ifdef VHDL_TESTBENCH |
---|
[41] | 60 | private : uint32_t get_cycle (void); |
---|
[42] | 61 | private : Signal * get_clock (void); |
---|
| 62 | private : Signal * get_reset (void); |
---|
[41] | 63 | |
---|
| 64 | private : void testbench_generate_file (void); |
---|
| 65 | public : void testbench (void); |
---|
| 66 | private : string testbench_body (Vhdl * & vhdl , |
---|
[42] | 67 | string counter_name , |
---|
| 68 | string reset_name ); |
---|
[29] | 69 | #endif |
---|
| 70 | |
---|
[40] | 71 | public : Interface_fifo * find_interface (string name); |
---|
[42] | 72 | public : Signal * find_signal (string name); |
---|
| 73 | public : bool find_signal (Signal * signal); |
---|
[31] | 74 | |
---|
[42] | 75 | #ifdef POSITION |
---|
[29] | 76 | public : XML toXML (void); |
---|
[31] | 77 | public : XML toXML_mapping (void); |
---|
| 78 | #endif |
---|
[29] | 79 | public : friend ostream& operator<< (ostream& output_stream, |
---|
| 80 | morpheo::behavioural::Interfaces & x); |
---|
| 81 | |
---|
| 82 | }; |
---|
| 83 | |
---|
| 84 | }; // end namespace behavioural |
---|
| 85 | }; // end namespace morpheo |
---|
| 86 | |
---|
| 87 | #endif |
---|