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

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

Decod :

  • Correct selftest
  • Set Instruction address on (32/64)-2 bits,
  • Decod Custom Instruction : valid and tested. (add an test to verify the decod information)
  • Property svn:keywords set to Id
File size: 3.2 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 86 2008-05-14 17:08:56Z 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          _has_immediat      ;
42    Tgeneral_data_t     _immediat          ;
43    Tcontrol_t          _read_ra           ;
44    Tgeneral_address_t  _num_reg_ra        ;
45    Tcontrol_t          _read_rb           ;
46    Tgeneral_address_t  _num_reg_rb        ;
47    Tcontrol_t          _read_rc           ;
48    Tspecial_address_t  _num_reg_rc        ;
49    Tcontrol_t          _write_rd          ;
50    Tgeneral_address_t  _num_reg_rd        ;
51    Tcontrol_t          _write_re          ;
52    Tspecial_address_t  _num_reg_re        ;
53    Texception_t        _exception_use     ;
54    Tbranch_condition_t _branch_condition  ;
55//     Tcontrol_t          _branch_stack_write;
56    Tcontrol_t          _branch_direction  ;
57    Tevent_type_t       _event_type        ;
58  } decod_instruction_t;
59
60  class decod_param_t
61  {
62  public : uint32_t           _size_data ;
63  public : Tgeneral_data_t    _mask_data ;
64  public : Tgeneral_data_t    _mask_shift;
65  public : void (*** _function_decod ) (decod_instruction_t *, decod_param_t *); // [type][opcod]
66  public : void (*** _function_custom) (decod_instruction_t *, decod_param_t *); // [type][opcod]
67 
68  public : decod_param_t (uint32_t size_data,
69                          void (*** function_decod ) (decod_instruction_t *, decod_param_t *),
70                          void (*** function_custom) (decod_instruction_t *, decod_param_t *))
71    {
72      _size_data       = size_data;
73      _mask_data       = gen_mask<Tgeneral_data_t> (size_data);
74      _mask_shift      = gen_mask<Tgeneral_data_t> (log2(size_data));
75      _function_decod  = function_decod;
76      _function_custom = function_custom;
77    };
78  public : ~decod_param_t (void)
79    {
80    };
81  };
82
83
84  typedef void function_decod_t 
85  (morpheo::behavioural::core::multi_front_end::front_end::decod_unit::decod::decod_instruction_t *, 
86   morpheo::behavioural::core::multi_front_end::front_end::decod_unit::decod::decod_param_t       *);
87 
88
89}; // end namespace decod
90}; // end namespace decod_unit
91}; // end namespace front_end
92}; // end namespace multi_front_end
93}; // end namespace core
94}; // end namespace behavioural
95}; // end namespace morpheo             
96
97#endif
Note: See TracBrowser for help on using the repository browser.