source: trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component/src/New_Component_allocation.cpp @ 53

Last change on this file since 53 was 53, checked in by rosiere, 17 years ago
  • Banc de registre multi banc
  • Banc de registre générique.
File size: 1.3 KB
Line 
1#ifdef SYSTEMC
2/*
3 * $Id$
4 *
5 * [ Description ]
6 *
7 */
8
9#include "Behavioural/@DIRECTORY/include/@COMPONENT.h"
10
11namespace morpheo                    {
12namespace behavioural {
13@NAMESPACE_BEGIN
14
15
16#undef  FUNCTION
17#define FUNCTION "@COMPONENT::allocation"
18  void @COMPONENT::allocation (void)
19  {
20    string rename;
21
22    log_printf(FUNC,@COMPONENT,FUNCTION,"Begin");
23
24    _component   = new Component ();
25
26    Entity * entity = _component->set_entity (_name       
27                                              ,"@COMPONENT"
28#ifdef POSITION
29                                              ,COMBINATORY
30#endif
31                                              );
32
33    _interfaces = entity->set_interfaces();
34
35    // ~~~~~[ Interface : "" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
36
37      Interface * interface = _interfaces->set_interface(""
38#ifdef POSITION
39                                                         ,IN
40                                                         ,SOUTH,
41                                                         "Generalist interface"
42#endif
43                                                         );
44
45     in_CLOCK        = interface->set_signal_clk              ("clock" ,1, CLOCK_VHDL_YES);
46     in_NRESET       = interface->set_signal_in  <Tcontrol_t> ("nreset",1, RESET_VHDL_YES);
47
48    // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
49
50#ifdef POSITION
51    _component->generate_file();
52#endif
53
54    log_printf(FUNC,@COMPONENT,FUNCTION,"End");
55  };
56
57@NAMESPACE_END
58}; // end namespace behavioural
59}; // end namespace morpheo             
60#endif
Note: See TracBrowser for help on using the repository browser.