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

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

New component : Read_unit (instance between a write queue and a optionnal execute_queue)

File size: 1.4 KB
Line 
1/*
2 * $Id$
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    string rename;
27
28    log_printf(FUNC,@COMPONENT,FUNCTION,"Begin");
29
30    _component   = new Component (_usage);
31
32    Entity * entity = _component->set_entity (_name       
33                                              ,"@COMPONENT"
34#ifdef POSITION
35                                              ,COMBINATORY
36#endif
37                                              );
38
39    _interfaces = entity->set_interfaces();
40
41    // ~~~~~[ Interface : "" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
42
43      Interface * interface = _interfaces->set_interface(""
44#ifdef POSITION
45                                                         ,IN
46                                                         ,SOUTH,
47                                                         "Generalist interface"
48#endif
49                                                         );
50
51     in_CLOCK        = interface->set_signal_clk              ("clock" ,1, CLOCK_VHDL_YES);
52     in_NRESET       = interface->set_signal_in  <Tcontrol_t> ("nreset",1, RESET_VHDL_YES);
53
54    // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
55
56#ifdef POSITION
57    _component->generate_file();
58#endif
59
60    log_printf(FUNC,@COMPONENT,FUNCTION,"End");
61  };
62
63@NAMESPACE_END
64}; // end namespace behavioural
65}; // end namespace morpheo             
Note: See TracBrowser for help on using the repository browser.