source: trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Comparator/include/Comparator.h @ 112

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

1) Stat_list : fix retire old and new register bug
2) Stat_list : remove read_counter and valid flag, because validation of destination is in retire step (not in commit step)
3) Model : add class Model (cf Morpheo.sim)
4) Allocation : alloc_interface_begin and alloc_interface_end to delete temporary array.
5) Script : add distexe.sh
6) Add Comparator, Multiplier, Divider. But this component are not implemented
7) Software : add Dhrystone

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