1 | #ifndef morpheo_behavioural_Component_h |
---|
2 | #define morpheo_behavioural_Component_h |
---|
3 | |
---|
4 | /* |
---|
5 | * $Id$ |
---|
6 | * |
---|
7 | * [ Description ] |
---|
8 | * |
---|
9 | */ |
---|
10 | |
---|
11 | #include <stdint.h> |
---|
12 | #include <iostream> |
---|
13 | #include <list> |
---|
14 | #include <map> |
---|
15 | #ifdef VHDL |
---|
16 | #include "Behavioural/include/Vhdl.h" |
---|
17 | #endif |
---|
18 | //#include "Behavioural/include/Description.h" |
---|
19 | #include "Behavioural/include/Entity.h" |
---|
20 | #include "Common/include/ToString.h" |
---|
21 | #include "Common/include/Debug.h" |
---|
22 | |
---|
23 | using namespace std; |
---|
24 | |
---|
25 | namespace morpheo { |
---|
26 | namespace behavioural { |
---|
27 | |
---|
28 | class Component |
---|
29 | { |
---|
30 | // -----[ fields ]---------------------------------------------------- |
---|
31 | private : Entity * _entity ; |
---|
32 | private : list<Entity *> * _list_component; |
---|
33 | |
---|
34 | // -----[ methods ]--------------------------------------------------- |
---|
35 | public : Component (void); |
---|
36 | public : Component (const Component & component); |
---|
37 | public : ~Component (); |
---|
38 | |
---|
39 | public : Entity * set_entity (string name |
---|
40 | ,string type |
---|
41 | #ifdef POSITION |
---|
42 | ,schema_t schema |
---|
43 | #endif |
---|
44 | ); |
---|
45 | private : string get_entity (void); |
---|
46 | |
---|
47 | public : void set_component (Component * component |
---|
48 | #ifdef POSITION |
---|
49 | ,uint32_t pos_x |
---|
50 | ,uint32_t pos_y |
---|
51 | ,uint32_t size_x |
---|
52 | ,uint32_t size_y |
---|
53 | #endif |
---|
54 | ); |
---|
55 | |
---|
56 | private : string get_component (void); |
---|
57 | |
---|
58 | private : Entity * find_entity (string name); |
---|
59 | private : Interface * find_interface (string name , |
---|
60 | Entity * entity); |
---|
61 | |
---|
62 | #ifdef VHDL |
---|
63 | public : void vhdl_instance (Vhdl * & vhdl); |
---|
64 | #endif |
---|
65 | |
---|
66 | public : void port_map (string component_src , |
---|
67 | string port_src , |
---|
68 | string component_dest, |
---|
69 | string port_dest ); |
---|
70 | |
---|
71 | #ifdef POSITION |
---|
72 | public : void interface_map (string component_src , |
---|
73 | string port_dest, |
---|
74 | string component_dest, |
---|
75 | string port_dest ); |
---|
76 | |
---|
77 | public : XML toXML (void); |
---|
78 | |
---|
79 | public : void generate_file (void); |
---|
80 | #endif |
---|
81 | public : friend ostream& operator<< (ostream& output_stream, |
---|
82 | morpheo::behavioural::Component & x); |
---|
83 | }; |
---|
84 | |
---|
85 | }; // end namespace behavioural |
---|
86 | }; // end namespace morpheo |
---|
87 | |
---|
88 | #endif |
---|