source: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod/Instruction/include/Types.h @ 134

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

1) valgrind fix
2) debug file on/off

  • Property svn:keywords set to Id
File size: 3.3 KB
Line 
1#ifndef morpheo_behavioural_core_multi_front_end_front_end_decod_unit_decod_instruction_Types_h
2#define morpheo_behavioural_core_multi_front_end_front_end_decod_unit_decod_instruction_Types_h
3
4/*
5 * $Id: Types.h 134 2009-07-15 08:41:01Z rosiere $
6 *
7 * [ Description ]
8 *
9 */
10
11#include "Common/include/BitManipulation.h"
12#include "Common/include/Log2.h"
13#include "Behavioural/include/Types.h"
14
15namespace morpheo {
16namespace behavioural {
17namespace core {
18namespace multi_front_end {
19namespace front_end {
20namespace decod_unit {
21namespace decod {
22
23  typedef struct 
24  {
25    // set by ifetch
26    Tinstruction_t      _instruction       ;
27    Tgeneral_data_t     _address_previous  ;
28    Tgeneral_data_t     _address           ;
29    Tgeneral_data_t     _address_next      ; // if event, is address_epcr
30    Tcontext_t          _context_id        ;
31    Tcontrol_t          _is_delay_slot     ;
32//  Tbranch_state_t     _branch_state               ;
33//  Tprediction_ptr_t   _branch_update_prediction_id;
34                                           
35    // set by predictor                   
36//  Tdepth_t            _depth             ;
37                                           
38    // set by decod                       
39    Ttype_t             _type              ;
40    Toperation_t        _operation         ;
41    Tcontrol_t          _no_execute        ;
42    Tcontrol_t          _has_immediat      ;
43    Tgeneral_data_t     _immediat          ;
44    Tcontrol_t          _read_ra           ;
45    Tgeneral_address_t  _num_reg_ra        ;
46    Tcontrol_t          _read_rb           ;
47    Tgeneral_address_t  _num_reg_rb        ;
48    Tcontrol_t          _read_rc           ;
49    Tspecial_address_t  _num_reg_rc        ;
50    Tcontrol_t          _write_rd          ;
51    Tgeneral_address_t  _num_reg_rd        ;
52    Tcontrol_t          _write_re          ;
53    Tspecial_address_t  _num_reg_re        ;
54    Texception_t        _exception_use     ;
55    Texception_t        _exception         ;
56    Tbranch_condition_t _branch_condition  ;
57//  Tcontrol_t          _branch_stack_write;
58    Tcontrol_t          _branch_direction  ;
59    Tevent_type_t       _event_type        ;
60  } decod_instruction_t;
61
62  class decod_param_t
63  {
64  public : uint32_t           _size_data ;
65  public : Tgeneral_data_t    _mask_data ;
66  public : Tgeneral_data_t    _mask_shift;
67  public : void (*** _function_decod ) (decod_instruction_t *, decod_param_t *); // [type][opcod]
68  public : void (*** _function_custom) (decod_instruction_t *, decod_param_t *); // [type][opcod]
69 
70  public : decod_param_t (uint32_t size_data,
71                          void (*** function_decod ) (decod_instruction_t *, decod_param_t *),
72                          void (*** function_custom) (decod_instruction_t *, decod_param_t *))
73    {
74      _size_data       = size_data;
75      _mask_data       = gen_mask<Tgeneral_data_t> (size_data);
76      _mask_shift      = gen_mask<Tgeneral_data_t> (log2(size_data));
77      _function_decod  = function_decod;
78      _function_custom = function_custom;
79    };
80  public : ~decod_param_t (void)
81    {
82    };
83  };
84
85
86  typedef void function_decod_t 
87  (morpheo::behavioural::core::multi_front_end::front_end::decod_unit::decod::decod_instruction_t *, 
88   morpheo::behavioural::core::multi_front_end::front_end::decod_unit::decod::decod_param_t       *);
89 
90
91}; // end namespace decod
92}; // end namespace decod_unit
93}; // end namespace front_end
94}; // end namespace multi_front_end
95}; // end namespace core
96}; // end namespace behavioural
97}; // end namespace morpheo             
98
99#endif
Note: See TracBrowser for help on using the repository browser.