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

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

1) Add Vhdl component
2) Inhib VHDL Seltest interface

  • Property svn:keywords set to Id
File size: 3.2 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 135 2009-07-17 08:59:05Z 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#define IFETCH_QUEUE_STATE_SIZE 2
31
32  class ifetch_queue_entry_t
33  {
34  public : ifetch_queue_state_t   _state                      ;
35  public : Tinstruction_t       * _instruction                ;
36  public : Tcontrol_t           * _instruction_enable         ;
37  public : Tgeneral_address_t     _address                    ;
38  public : Tinst_ifetch_ptr_t     _inst_ifetch_ptr            ;
39  public : Tbranch_state_t        _branch_state               ;
40  public : Tprediction_ptr_t      _branch_update_prediction_id;
41  public : Texception_t           _exception                  ;
42   
43  public : ifetch_queue_entry_t (uint32_t nb_instruction)
44    {
45      _instruction        = new Tinstruction_t [nb_instruction];
46      _instruction_enable = new Tcontrol_t     [nb_instruction];
47    }
48
49  public : ~ifetch_queue_entry_t (void)
50    {
51      delete [] _instruction       ;
52      delete [] _instruction_enable;
53    }
54  };
55
56}; // end namespace ifetch_queue
57}; // end namespace ifetch_unit
58}; // end namespace front_end
59}; // end namespace multi_front_end
60}; // end namespace core
61}; // end namespace behavioural
62 
63  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)
64  {
65    switch (x)
66      {
67      case morpheo::behavioural::core::multi_front_end::front_end::ifetch_unit::ifetch_queue::IFETCH_QUEUE_STATE_EMPTY          : return "empty"         ; break;
68//    case morpheo::behavioural::core::multi_front_end::front_end::ifetch_unit::ifetch_queue::IFETCH_QUEUE_STATE_WAIT_REQ       : return "wait_req"      ; break;
69      case morpheo::behavioural::core::multi_front_end::front_end::ifetch_unit::ifetch_queue::IFETCH_QUEUE_STATE_WAIT_RSP       : return "wait_rsp"      ; break;
70      case morpheo::behavioural::core::multi_front_end::front_end::ifetch_unit::ifetch_queue::IFETCH_QUEUE_STATE_HAVE_RSP       : return "have_rsp"      ; break;
71      case morpheo::behavioural::core::multi_front_end::front_end::ifetch_unit::ifetch_queue::IFETCH_QUEUE_STATE_ERROR_WAIT_RSP : return "error_wait_rsp"; break;
72      default    : return ""      ; break;
73      }
74  };
75
76
77}; // end namespace morpheo             
78#endif
Note: See TracBrowser for help on using the repository browser.