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

Last change on this file since 42 was 42, checked in by rosiere, 17 years ago

Modification des classes d'encapsulation des interfaces :

  • gère les signaux à écrire dans le vhdl
  • les traces pour le testbench
  • la génération des vhdl structurelles

-> test sur la Pattern History Table

File size: 1.2 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  void @COMPONENT::allocation (void)
16  {
17    string rename;
18
19    log_printf(FUNC,@COMPONENT,"allocation","Begin");
20
21    _component   = new Component ();
22
23    Entity * entity = _component->set_entity (_name       
24#ifdef POSITION
25                                              ,"@COMPONENT"
26                                              ,COMBINATORY
27#endif
28                                              );
29
30    _interfaces = entity->set_interfaces();
31
32    // ~~~~~[ Interface : "" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
33
34      Interface * interface = _interfaces->set_interface(""
35#ifdef POSITION
36                                                         ,IN
37                                                         ,SOUTH,
38                                                         "Generalist interface"
39#endif
40                                                         );
41
42     in_CLOCK        = interface->set_signal_clk              ("clock" ,1, PORT_VHDL_YES_TESTBENCH_NO);
43     in_NRESET       = interface->set_signal_in  <Tcontrol_t> ("nreset",1);
44
45
46    // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
47
48#ifdef POSITION
49    _component->generate_file();
50#endif
51
52    Log_printf(FUNC,@COMPONENT,"allocation","End");
53  };
54
55@NAMESPACE_END
56}; // end namespace behavioural
57}; // end namespace morpheo             
58#endif
Note: See TracBrowser for help on using the repository browser.