source: trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component_vbe/include/New_Component.h @ 113

Last change on this file since 113 was 113, checked in by rosiere, 15 years ago

1) Add modelsim simulation systemC
2) Modelsim cosimulation systemC / VHDL is not finish !!!! (cf execute_queue and write_unit)
3) Add multi architecture
5) Add template for comparator, multiplier and divider
6) Change Message
Warning) Various test macro have change, many selftest can't compile

File size: 3.5 KB
Line 
1#ifndef morpheo_behavioural_@DEFINE_@COMPONENT_h
2#define morpheo_behavioural_@DEFINE_@COMPONENT_h
3
4/*
5 * $Id$
6 *
7 * [ Description ]
8 *
9 */
10
11#ifdef SYSTEMC
12#include "systemc.h"
13#endif
14
15#include "Behavioural/@DIRECTORY/include/Wrapper_@COMPONENT.h"
16#include "Behavioural/@DIRECTORY/include/Parameters.h"
17#include "Behavioural/@DIRECTORY/include/Types.h"
18#ifdef STATISTICS
19#include "Behavioural/include/Stat.h"
20#endif
21#include "Behavioural/include/Component.h"
22#ifdef VHDL
23#include "Behavioural/include/Vhdl.h"
24#endif
25#include "Behavioural/include/Usage.h"
26#include "Behavioural/include/Simulation.h"
27
28#include "Common/include/ToString.h"
29#include "Common/include/Debug.h"
30
31#include <iostream>
32
33namespace morpheo {
34namespace behavioural {
35
36@NAMESPACE_BEGIN
37
38  class @COMPONENT
39#if SYSTEMC
40    : public sc_module
41#endif
42  {
43    // -----[ fields ]----------------------------------------------------
44    // Parameters
45  protected : const std::string  _name;
46  protected : const Parameters * _param;
47  public    :       Tusage_t     _usage;
48
49#ifdef STATISTICS
50  public    : Stat                           * _stat;
51#endif
52
53  public    : Component                      * _component;
54  private   : Interfaces                     * _interfaces;
55
56#ifdef SYSTEMC
57    // ~~~~~[ Interface ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
58    // ~~~~~[ Interface : "" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
59  public    : SC_CLOCK                      *  in_CLOCK        ;
60  public    : SC_IN (Tcontrol_t)            *  in_NRESET       ;
61
62    // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
63
64    // ~~~~~[ Register ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
65
66    // ~~~~~[ Internal ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
67#endif
68
69#ifdef MODELSIM_COSIMULATION
70    // ~~~~~[ Wrapper ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
71  private : Wrapper_@COMPONENT * _wrapper;
72#endif
73
74    // -----[ Methods ]---------------------------------------------------
75
76#ifdef SYSTEMC
77    SC_HAS_PROCESS (@COMPONENT);
78#endif
79  public  :          @COMPONENT             
80  (
81#ifdef SYSTEMC
82   sc_module_name                                name,
83#else                                         
84   std::string                                   name,
85#endif                                         
86#ifdef STATISTICS
87   morpheo::behavioural::Parameters_Statistics * param_statistics,
88#endif
89   Parameters                                  * param,
90   morpheo::behavioural::Tusage_t                usage
91   );
92  public  :          ~@COMPONENT             (void);
93                                               
94  private : void        allocation                (
95#ifdef STATISTICS
96                                                   morpheo::behavioural::Parameters_Statistics * param_statistics
97#else
98                                                   void
99#endif
100                                                   );
101  private : void        deallocation              (void);
102                                               
103#ifdef SYSTEMC                                 
104  public  : void        transition                (void);
105//public  : void        genMoore                  (void);
106#endif                                         
107
108#if VHDL                                       
109  public  : void        vhdl                      (void);
110  private : void        vhdl_declaration          (Vhdl * & vhdl);
111  private : void        vhdl_body                 (Vhdl * & vhdl);
112#endif                                         
113
114#ifdef STATISTICS
115  public  : void        statistics_allocation     (morpheo::behavioural::Parameters_Statistics * param_statistics);
116  public  : void        statistics_deallocation   (void);
117#endif
118#if defined(STATISTICS) or defined(VHDL_TESTBENCH)
119  private : void        end_cycle                 (void);
120#endif
121  };
122
123@NAMESPACE_END
124}; // end namespace behavioural
125}; // end namespace morpheo             
126
127#endif
Note: See TracBrowser for help on using the repository browser.