source: trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component_vst/src/New_Component_allocation.cpp @ 81

Last change on this file since 81 was 81, checked in by rosiere, 16 years ago
  • Finish Environment (and test)
  • Continue predictor_unit
  • Add external tools
  • svn keyword "Id" set
  • Property svn:keywords set to Id
File size: 1.7 KB
Line 
1/*
2 * $Id: New_Component_allocation.cpp 81 2008-04-15 18:40:01Z rosiere $
3 *
4 * [ Description ]
5 *
6 */
7
8#include "Behavioural/@DIRECTORY/include/@COMPONENT.h"
9#include "Behavioural/include/Allocation.h"
10
11namespace morpheo                    {
12namespace behavioural {
13@NAMESPACE_BEGIN
14
15
16#undef  FUNCTION
17#define FUNCTION "@COMPONENT::allocation"
18  void @COMPONENT::allocation (
19#ifdef STATISTICS
20                               morpheo::behavioural::Parameters_Statistics * param_statistics
21#else
22                               void
23#endif
24                               )
25  {
26    log_printf(FUNC,@COMPONENT,FUNCTION,"Begin");
27
28    _component   = new Component (_usage);
29
30    Entity * entity = _component->set_entity (_name       
31                                              ,"@COMPONENT"
32#ifdef POSITION
33                                              ,COMBINATORY
34#endif
35                                              );
36
37    _interfaces = entity->set_interfaces();
38   
39    // ~~~~~[ Interface : "" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
40    {
41      Interface * interface = _interfaces->set_interface(""
42#ifdef POSITION
43                                                         ,IN
44                                                         ,SOUTH,
45                                                         "Generalist interface"
46#endif
47                                                         );
48     
49      in_CLOCK        = interface->set_signal_clk              ("clock" ,1, CLOCK_VHDL_YES);
50      in_NRESET       = interface->set_signal_in  <Tcontrol_t> ("nreset",1, RESET_VHDL_YES);
51    }
52   
53    // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
54   
55    // ~~~~~[ Instanciation ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
56    std::string src,dest;
57
58
59    // ~~~~~[ Others ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
60     _component->test_map();
61
62#ifdef POSITION
63     if (usage_is_set(_usage,USE_POSITION))
64         _component->generate_file();
65#endif
66
67    log_printf(FUNC,@COMPONENT,FUNCTION,"End");
68  };
69
70@NAMESPACE_END
71}; // end namespace behavioural
72}; // end namespace morpheo             
Note: See TracBrowser for help on using the repository browser.