source: trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Parameters.h @ 78

Last change on this file since 78 was 78, checked in by rosiere, 16 years ago

Add :

  • Execute_loop (must be test systemC)
  • Prediction
    • Direction : predifined scheme
    • Branch Target Buffer
  • iFetch_unit
    • ifetch_queue
    • pc management
  • Decod_unit
    • coming soon : support for custom operation
  • Rename_unit
    • RAT
    • Free_list
    • Dependence RAW check
    • Load store unit pointer
  • New Environnement (hierarchy_memory will remove in a next version)


Modif :

  • Manage Custom Operation
  • All component in execute_loop to use the new statistics management

Not Finish :

  • Return Address Stack
  • Environnement
File size: 4.2 KB
Line 
1#ifndef morpheo_behavioural_Parameters_h
2#define morpheo_behavioural_Parameters_h
3
4/*
5 * $Id$
6 *
7 * [ Description ]
8 *
9 */
10
11#include <stdint.h>
12#include <iostream>
13#include <math.h>
14#include "Behavioural/include/Environnement.h"
15#include "Behavioural/include/Constants.h"
16#include "Behavioural/include/Test.h"
17#include "Common/include/ErrorMorpheo.h"
18#include "Common/include/ToString.h"
19#include "Common/include/Log2.h"
20#include "Common/include/Debug.h"
21
22namespace morpheo     {
23namespace behavioural {
24
25  class Parameters_test
26  {
27  private   : std::string _component;
28  protected : std::string _error;
29  protected : std::string _warning;
30  protected : std::string _information;
31
32  public    : Parameters_test (std::string component) 
33    {
34      _component = component;
35      _error     = "";
36      _warning   = "";
37    };
38  public    : ~Parameters_test (void) {};
39
40  public    : bool        have_error  (void)            { return (_error.length() != 0);};
41  public    : void        error       (std::string str) { _error       += "[   ERROR   ] <" + _component + "> " + str + "\n";}
42  public    : void        warning     (std::string str) { _warning     += "[  WARNING  ] <" + _component + "> " + str + "\n";}
43  public    : void        information (std::string str) { _information += "[INFORMATION] <" + _component + "> " + str + "\n";}
44  public    : std::string print       (void)            { return _error + _warning + _information;};
45  };
46
47  // Virtual Class - Interface of each component
48  class Parameters
49  {
50    // -----[ fields ]----------------------------------------------------
51  public   : static const uint32_t   _size_instruction            = 32;
52  public   : static const uint32_t   _nb_operation                = MAX_OPERATION;
53  public   : static const uint32_t   _nb_type                     = MAX_TYPE;
54  public   : static const uint32_t   _size_operation              = SIZE_OPERATION;
55  public   : static const uint32_t   _size_type                   = SIZE_TYPE;     
56  public   : static const uint32_t   _size_exception              = SIZE_EXCEPTION;
57  public   : static const uint32_t   _size_exception_use          = SIZE_EXCEPTION_USE;
58  public   : static const uint32_t   _size_exception_memory       = SIZE_EXCEPTION_MEMORY;
59  public   : static const uint32_t   _size_exception_custom       = SIZE_EXCEPTION_CUSTOM;
60  public   : static const uint32_t   _size_exception_alu          = SIZE_EXCEPTION_ALU   ;
61  public   : static const uint32_t   _size_exception_decod        = SIZE_EXCEPTION_DECOD ;
62  public   : static const uint32_t   _size_exception_ifetch       = SIZE_EXCEPTION_IFETCH;
63  public   : static const uint32_t   _size_icache_type            = SIZE_ICACHE_TYPE;
64  public   : static const uint32_t   _size_icache_error           = SIZE_ICACHE_ERROR;
65  public   : static const uint32_t   _size_dcache_type            = SIZE_DCACHE_TYPE;
66  public   : static const uint32_t   _size_dcache_error           = SIZE_DCACHE_ERROR;
67  public   : static const uint32_t   _nb_general_register_logic   = 32;
68  public   : static const uint32_t   _nb_special_register_logic   = NB_SPR_LOGIC;
69  public   : static const uint32_t   _size_general_register_logic = 5;
70  public   : static const uint32_t   _size_special_register_logic = LOG2_NB_SPR_LOGIC;
71  public   : static const uint32_t   _size_event_state            = SIZE_EVENT_STATE;
72  public   : static const uint32_t   _size_event_type             = SIZE_EVENT_TYPE;
73  public   : static const uint32_t   _size_branch_state           = SIZE_BRANCH_STATE;
74  public   : static const uint32_t   _size_branch_condition       = SIZE_BRANCH_CONDITION;
75
76    // -----[ methods ]---------------------------------------------------
77  public   :                          Parameters           (void);
78  public   : virtual                 ~Parameters           ();
79       
80    // methods to print and test parameters
81  public   : virtual std::string     print                 (uint32_t depth) = 0;
82  public   : virtual Parameters_test msg_error             (void) = 0;
83
84    // methods to generate configuration file
85   
86    // methods to test
87  public   :         void            test                  (void);
88  };
89}; // end namespace behavioural         
90}; // end namespace morpheo             
91
92#endif
Note: See TracBrowser for help on using the repository browser.