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

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