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

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

Interface et Signal, c'est deux classes enregistres la valeurs des signaux à chaque cycle ... étape préparatoire avan le changement de la classe Vhdl_Testbench

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#ifdef POSITION
22    _position   = new Position ();
23
24    Entity * entity = _position->set_entity (_name       ,
25                                             "@COMPONENT",
26                                             COMBINATORY );
27
28    _interfaces = entity->set_interfaces();
29#else
30    _interfaces = new Interfaces();
31#endif
32
33    // ~~~~~[ Interface : "" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
34
35    Interface * interface_ = _interfaces->set_interface("", IN  ,WEST, "Generalist interface");
36
37     in_CLOCK        = interface_->set_signal_clk              ("clock" ,1, PORT_VHDL_YES_TESTBENCH_NO);
38     in_NRESET       = interface_->set_signal_in  <Tcontrol_t> ("nreset",1);
39
40
41    // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
42
43#ifdef POSITION
44    _position->generate_file();
45#endif
46
47    log_printf(FUNC,@COMPONENT,"allocation","End");
48  };
49
50@NAMESPACE_END
51}; // end namespace behavioural
52}; // end namespace morpheo             
53#endif
Note: See TracBrowser for help on using the repository browser.