source: trunk/IPs/systemC/processor/Morpheo/Behavioural/include/SPR_access_mode.h

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

1) Stat_list : fix retire old and new register bug
2) Stat_list : remove read_counter and valid flag, because validation of destination is in retire step (not in commit step)
3) Model : add class Model (cf Morpheo.sim)
4) Allocation : alloc_interface_begin and alloc_interface_end to delete temporary array.
5) Script : add distexe.sh
6) Add Comparator, Multiplier, Divider. But this component are not implemented
7) Software : add Dhrystone

  • Property svn:keywords set to Id
File size: 2.0 KB
Line 
1#ifndef morpheo_behavioural_SPR_access_mode_h
2#define morpheo_behavioural_SPR_access_mode_h
3
4#include "Common/include/BitManipulation.h"
5#include "Common/include/ErrorMorpheo.h"
6#include "Behavioural/include/Constants.h"
7#include "Behavioural/include/Types.h"
8
9namespace morpheo {
10namespace behavioural {
11
12  class spr_address_t
13  {
14  public : Tgeneral_data_t _group;
15  public : Tgeneral_data_t _register;
16
17  public : spr_address_t (void) {};
18  public : spr_address_t (Tgeneral_data_t grp,
19                          Tgeneral_data_t reg)
20    {
21      _group    = grp;
22      _register = reg;
23    };
24  };
25
26  class SPR_access_mode
27  {
28  private : spr_access_mode_t   ** _spr_generic          ; //[NB_GROUP][NB_REG_GROUP]
29  private : uint32_t             * _max_register_by_group; //[NB_GROUP]
30
31  public  : SPR_access_mode();
32  public  : ~SPR_access_mode();
33
34  public  : spr_address_t     translate_address (Tgeneral_data_t address);
35
36  public  : bool              valid           (uint32_t num_group, uint32_t num_reg);
37  public  : bool              valid           (spr_address_t address);
38  public  : bool              exist           (uint32_t num_group, uint32_t num_reg);
39  public  : bool              exist           (spr_address_t address);
40  public  : bool              read            (spr_address_t address, Tcontrol_t SM, Tcontrol_t SUMRA);
41  public  : bool              write           (spr_address_t address, Tcontrol_t SM, Tcontrol_t SUMRA);
42  public  : spr_access_mode_t get_mode        (uint32_t num_group, uint32_t num_reg);
43  public  : spr_access_mode_t get_mode        (spr_address_t address);
44   
45  public  : void              implement_group (uint32_t num_group, uint32_t nb_reg);
46  public  : uint32_t          implement_group (uint32_t num_group);
47  public  : void              change_mode     (uint32_t num_group, uint32_t num_reg, spr_access_mode_t new_mode);
48  public  : void              invalid_register(uint32_t num_group, uint32_t num_reg);
49  };
50 
51
52}; // end namespace behavioural
53}; // end namespace morpheo             
54#endif
55
Note: See TracBrowser for help on using the repository browser.