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