source: trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Component.h @ 71

Last change on this file since 71 was 71, checked in by rosiere, 16 years ago

Modification of Statisctics
Add a new systemC component : Load_Store_Queue (tested with one benchmark and one configuration). Store don't supported the Data Buss Error (Load is supported)

File size: 3.3 KB
Line 
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#include "Behavioural/include/Usage.h"
23
24namespace morpheo              {
25namespace behavioural          {
26
27  typedef uint8_t Tinstance_t;
28
29#define INSTANCE_NONE         0x0
30#define INSTANCE_LIBRARY      0x1
31#define INSTANCE_COMPONENT    0x2
32#define INSTANCE_POSITION     0x4
33#define INSTANCE_ALL          0x7
34
35  typedef struct
36  {
37    public : Tinstance_t _instance;
38    public : Entity    * _entity  ;
39  } Tcomponent_t;   
40 
41  class Component
42  {
43    // -----[ fields ]----------------------------------------------------
44  private   : const Tusage_t        _usage;
45  private   : Entity              * _entity        ;
46  private   : list<Tcomponent_t*> * _list_component;
47
48    // -----[ methods ]---------------------------------------------------
49  public    :                       Component         (Tusage_t usage=USE_ALL);
50  public    :                       Component         (const Component & component);
51  public    :                       ~Component        ();
52
53  public    : Entity *              set_entity        (std::string        name   
54                                                       ,std::string        type 
55#ifdef POSITION
56                                                       ,schema_t      schema
57#endif
58                                                       );
59  private   : std::string                get_entity        (void);
60
61  public    : void                  set_component     (Component * component
62#ifdef POSITION
63                                                       ,uint32_t   pos_x 
64                                                       ,uint32_t   pos_y 
65                                                       ,uint32_t   size_x
66                                                       ,uint32_t   size_y
67#endif
68                                                       ,Tinstance_t instance=INSTANCE_ALL
69                                                       );
70
71  private   : std::string                get_component     (void);
72
73  private   : Entity *              find_entity       (std::string name);
74//private   : Interface *           find_interface    (std::string   name  ,
75//                                                     Entity * entity);
76
77#ifdef VHDL
78  public    : void                  vhdl_instance     (Vhdl * & vhdl);
79#endif
80
81
82  private   : Signal *              signal_internal   (Entity * entity_productor,
83                                                       Signal * signal_productor);
84
85  public    : void                  port_map          (std::string component_src ,
86                                                       std::string port_src      ,
87                                                       std::string component_dest,
88                                                       std::string port_dest    );
89  public    : void                  port_map          (std::string component_src ,
90                                                       std::string port_src      );
91
92  public    : bool                  test_map          (void);
93
94#ifdef POSITION
95  public    : void                  interface_map     (std::string component_src ,
96                                                       std::string port_dest,
97                                                       std::string component_dest,
98                                                       std::string port_dest     );
99
100  public    : XML                   toXML             (void);
101
102  public    : void                  generate_file     (void);
103#endif   
104  public    : friend ostream&       operator<<        (ostream& output_stream,
105                                                       morpheo::behavioural::Component & x);
106  };
107
108}; // end namespace behavioural         
109}; // end namespace morpheo             
110
111#endif
Note: See TracBrowser for help on using the repository browser.