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> |
---|
14 | #include "Behavioural/include/Interface_fifo.h" |
---|
15 | #include "Common/include/ToString.h" |
---|
16 | #include "Common/include/Debug.h" |
---|
17 | #ifdef VHDL |
---|
18 | #include "Behavioural/include/Vhdl.h" |
---|
19 | #endif |
---|
20 | #include "Behavioural/include/Usage.h" |
---|
21 | |
---|
22 | using namespace std; |
---|
23 | |
---|
24 | namespace morpheo { |
---|
25 | namespace behavioural { |
---|
26 | |
---|
27 | class Interfaces |
---|
28 | { |
---|
29 | // -----[ fields ]---------------------------------------------------- |
---|
30 | private : const string _name; |
---|
31 | private : const Tusage_t _usage; |
---|
32 | private : list<Interface_fifo*> * _list_interface; |
---|
33 | |
---|
34 | // -----[ methods ]--------------------------------------------------- |
---|
35 | public : Interfaces (string name, |
---|
36 | Tusage_t usage=USE_ALL); |
---|
37 | public : Interfaces (const Interfaces & interfaces); |
---|
38 | public : ~Interfaces (); |
---|
39 | |
---|
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 |
---|
47 | public : Interface_fifo * set_interface (string name , |
---|
48 | direction_t direction , |
---|
49 | localisation_t localisation, |
---|
50 | string comment ); |
---|
51 | #endif |
---|
52 | private : string get_interface (void); |
---|
53 | public :list<Interface_fifo*>* get_interface_list (void); |
---|
54 | |
---|
55 | #ifdef VHDL |
---|
56 | public : void set_port (Vhdl * & vhdl ); |
---|
57 | # ifdef VHDL_TESTBENCH |
---|
58 | private : void get_signal (list<string> * & list_signal ); |
---|
59 | private : void set_signal (Vhdl * & vhdl ); |
---|
60 | # endif |
---|
61 | #endif |
---|
62 | #ifdef VHDL_TESTBENCH |
---|
63 | private : uint32_t get_cycle (void); |
---|
64 | private : Signal * get_clock (void); |
---|
65 | private : Signal * get_reset (void); |
---|
66 | |
---|
67 | private : void testbench_generate_file (void); |
---|
68 | public : void testbench (void); |
---|
69 | private : string testbench_body (Vhdl * & vhdl , |
---|
70 | string counter_name , |
---|
71 | string reset_name ); |
---|
72 | #endif |
---|
73 | |
---|
74 | public : Interface_fifo * find_interface (string name); |
---|
75 | public : Signal * find_signal (string name); |
---|
76 | public : bool find_signal (Signal * signal); |
---|
77 | |
---|
78 | #ifdef POSITION |
---|
79 | public : XML toXML (void); |
---|
80 | public : XML toXML_mapping (void); |
---|
81 | #endif |
---|
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 |
---|