source: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Ifetch_unit/Ifetch_queue/include/Types.h @ 85

Last change on this file since 85 was 85, checked in by rosiere, 16 years ago
  • Ifetch_unit : systemC test ok
  • modif shell script and makefile.tools : SHELL=/bin/bash
  • Property svn:keywords set to Id
File size: 3.3 KB
Line 
1#ifndef morpheo_behavioural_core_multi_front_end_front_end_ifetch_unit_ifetch_queue_Types_h
2#define morpheo_behavioural_core_multi_front_end_front_end_ifetch_unit_ifetch_queue_Types_h
3
4/*
5 * $Id: Types.h 85 2008-05-14 13:09:48Z rosiere $
6 *
7 * [ Description ]
8 *
9 */
10
11#include "Behavioural/include/Types.h"
12
13namespace morpheo {
14namespace behavioural {
15namespace core {
16namespace multi_front_end {
17namespace front_end {
18namespace ifetch_unit {
19namespace ifetch_queue {
20
21  typedef enum
22    {
23      IFETCH_QUEUE_STATE_EMPTY         ,  // slot is empty
24    //IFETCH_QUEUE_STATE_WAIT_REQ      ,  // slot is allocated               - wait request to   cache
25      IFETCH_QUEUE_STATE_WAIT_RSP      ,  // slot have send a request        - wait respons from cache
26      IFETCH_QUEUE_STATE_HAVE_RSP      ,  // slot have a bloc of instruction - wait accept by decod
27      IFETCH_QUEUE_STATE_ERROR_WAIT_RSP   // A event occure -> flush the queue but, ack rsp
28    } ifetch_queue_state_t;
29
30  class ifetch_queue_entry_t
31  {
32  public : ifetch_queue_state_t   _state                      ;
33  public : Tinstruction_t       * _instruction                ;
34  public : Tcontrol_t           * _instruction_enable         ;
35  public : Tgeneral_address_t     _address                    ;
36  public : Tinst_ifetch_ptr_t     _inst_ifetch_ptr            ;
37  public : Tbranch_state_t        _branch_state               ;
38  public : Tprediction_ptr_t      _branch_update_prediction_id;
39  public : Texception_t           _exception                  ;
40   
41  public : ifetch_queue_entry_t (uint32_t nb_instruction)
42    {
43      _instruction        = new Tinstruction_t [nb_instruction];
44      _instruction_enable = new Tcontrol_t     [nb_instruction];
45    }
46
47  public : ~ifetch_queue_entry_t (void)
48    {
49      delete _instruction       ;
50      delete _instruction_enable;
51    }
52
53//   public : friend std::ostream& operator<< (std::ostream& output,
54//                                          ifetch_queue_entry_t & x)
55//     {
56//       output << ;
57//       return output;
58//     }
59
60  };
61
62}; // end namespace ifetch_queue
63}; // end namespace ifetch_unit
64}; // end namespace front_end
65}; // end namespace multi_front_end
66}; // end namespace core
67}; // end namespace behavioural
68 
69  template<> inline std::string toString<morpheo::behavioural::core::multi_front_end::front_end::ifetch_unit::ifetch_queue::ifetch_queue_state_t>(const morpheo::behavioural::core::multi_front_end::front_end::ifetch_unit::ifetch_queue::ifetch_queue_state_t& x)
70  {
71    switch (x)
72      {
73      case morpheo::behavioural::core::multi_front_end::front_end::ifetch_unit::ifetch_queue::IFETCH_QUEUE_STATE_EMPTY          : return "empty"         ; break;
74//    case morpheo::behavioural::core::multi_front_end::front_end::ifetch_unit::ifetch_queue::IFETCH_QUEUE_STATE_WAIT_REQ       : return "wait_req"      ; break;
75      case morpheo::behavioural::core::multi_front_end::front_end::ifetch_unit::ifetch_queue::IFETCH_QUEUE_STATE_WAIT_RSP       : return "wait_rsp"      ; break;
76      case morpheo::behavioural::core::multi_front_end::front_end::ifetch_unit::ifetch_queue::IFETCH_QUEUE_STATE_HAVE_RSP       : return "have_rsp"      ; break;
77      case morpheo::behavioural::core::multi_front_end::front_end::ifetch_unit::ifetch_queue::IFETCH_QUEUE_STATE_ERROR_WAIT_RSP : return "error_wait_rsp"; break;
78      default    : return ""      ; break;
79      }
80  };
81
82
83}; // end namespace morpheo             
84#endif
Note: See TracBrowser for help on using the repository browser.