source: trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component_vbe/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.5 KB
RevLine 
[2]1/*
2 * $Id: New_Component_allocation.cpp 81 2008-04-15 18:40:01Z rosiere $
3 *
[73]4 * [ Description ]
[2]5 *
6 */
7
8#include "Behavioural/@DIRECTORY/include/@COMPONENT.h"
[73]9#include "Behavioural/include/Allocation.h"
[2]10
11namespace morpheo                    {
12namespace behavioural {
13@NAMESPACE_BEGIN
14
[53]15
16#undef  FUNCTION
17#define FUNCTION "@COMPONENT::allocation"
[74]18  void @COMPONENT::allocation (
19#ifdef STATISTICS
20                               morpheo::behavioural::Parameters_Statistics * param_statistics
21#else
22                               void
23#endif
24                               )
[2]25  {
[53]26    log_printf(FUNC,@COMPONENT,FUNCTION,"Begin");
[2]27
[68]28    _component   = new Component (_usage);
[42]29
30    Entity * entity = _component->set_entity (_name       
[50]31                                              ,"@COMPONENT"
[40]32#ifdef POSITION
[42]33                                              ,COMBINATORY
34#endif
35                                              );
[2]36
[40]37    _interfaces = entity->set_interfaces();
38
[78]39    // ~~~~~[ Interface : "" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
40    {
[42]41      Interface * interface = _interfaces->set_interface(""
42#ifdef POSITION
43                                                         ,IN
44                                                         ,SOUTH,
45                                                         "Generalist interface"
46#endif
47                                                         );
[78]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    }
[73]52    // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
[2]53
[40]54#ifdef POSITION
[81]55    if (usage_is_set(_usage,USE_POSITION))
56        _component->generate_file();
[40]57#endif
58
[53]59    log_printf(FUNC,@COMPONENT,FUNCTION,"End");
[2]60  };
61
62@NAMESPACE_END
63}; // end namespace behavioural
64}; // end namespace morpheo             
Note: See TracBrowser for help on using the repository browser.