[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" |
---|
[29] | 15 | #include "Include/ToString.h" |
---|
| 16 | #include "Include/Debug.h" |
---|
| 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 | |
---|
[40] | 37 | public : Interface_fifo * set_interface (string name , |
---|
[31] | 38 | direction_t direction , |
---|
| 39 | localisation_t localisation); |
---|
[40] | 40 | public : Interface_fifo * set_interface (string name , |
---|
[31] | 41 | direction_t direction , |
---|
| 42 | localisation_t localisation, |
---|
| 43 | string comment ); |
---|
| 44 | private : string get_interface (void); |
---|
[29] | 45 | |
---|
| 46 | #ifdef VHDL |
---|
| 47 | public : void set_port (Vhdl * & vhdl ); |
---|
[41] | 48 | # ifdef VHDL_TESTBENCH |
---|
| 49 | private : void get_signal (list<string> * & list_signal ); |
---|
| 50 | private : void set_signal (Vhdl * & vhdl ); |
---|
| 51 | # endif |
---|
[29] | 52 | #endif |
---|
| 53 | #ifdef VHDL_TESTBENCH |
---|
[41] | 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 ); |
---|
[29] | 61 | #endif |
---|
| 62 | |
---|
[40] | 63 | public : Interface_fifo * find_interface (string name); |
---|
[31] | 64 | |
---|
[29] | 65 | public : XML toXML (void); |
---|
[31] | 66 | #ifdef POSITION |
---|
| 67 | public : XML toXML_mapping (void); |
---|
| 68 | #endif |
---|
[29] | 69 | public : friend ostream& operator<< (ostream& output_stream, |
---|
| 70 | morpheo::behavioural::Interfaces & x); |
---|
| 71 | |
---|
| 72 | }; |
---|
| 73 | |
---|
| 74 | }; // end namespace behavioural |
---|
| 75 | }; // end namespace morpheo |
---|
| 76 | |
---|
| 77 | #endif |
---|