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