source: trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Sort/include/Types.h @ 78

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

Add :

  • Execute_loop (must be test systemC)
  • Prediction
    • Direction : predifined scheme
    • Branch Target Buffer
  • iFetch_unit
    • ifetch_queue
    • pc management
  • Decod_unit
    • coming soon : support for custom operation
  • Rename_unit
    • RAT
    • Free_list
    • Dependence RAW check
    • Load store unit pointer
  • New Environnement (hierarchy_memory will remove in a next version)


Modif :

  • Manage Custom Operation
  • All component in execute_loop to use the new statistics management

Not Finish :

  • Return Address Stack
  • Environnement
File size: 1.8 KB
Line 
1#ifndef morpheo_behavioural_generic_sort_Types_h
2#define morpheo_behavioural_generic_sort_Types_h
3
4/*
5 * $Id$
6 *
7 * [ Description ]
8 *
9 */
10
11#include "Behavioural/include/Types.h"
12
13namespace morpheo {
14namespace behavioural {
15namespace generic {
16namespace sort {
17
18  typedef uint32_t Taddress_t;
19  typedef uint32_t Tdata_t;
20
21  class sort_t
22  {
23  public : Tcontrol_t val  ;
24  public : Tdata_t    data ;
25  public : Taddress_t index;
26   
27    bool operator<(const sort_t & x) const
28    {
29      int  test = (((val)?1:0)<<1) + ((x.val)?1:0);
30      bool res;
31      switch (test)
32        {
33        case 1  : {res = false;         break;} /* 01 - a not valid, b     valid */
34        case 2  : {res = true ;         break;} /* 10 - a     valid, b not valid */
35        default : {res = data < x.data; break;} /* 00 - a not valid, b not valid */
36                                                /* 11 - a     valid, b     valid */
37        }
38//       cout << *this << "\t" << x << "\ttest : " << test << " - res : " << res << endl;
39     
40      return res;
41    }
42
43//     bool operator>(const sort_t & x) const
44//     {
45//       int test = (((val)?1:0)<<1) + ((x.val)?1:0);
46     
47//       switch (test)
48//      {
49//      case 1  : {return true ; }        /* 01 - a not valid, b     valid */
50//      case 2  : {return false; }        /* 10 - a     valid, b not valid */
51//      default : {return data > x.data;} /* 00 - a not valid, b not valid */
52//                                        /* 11 - a     valid, b     valid */
53//      }
54//     }
55
56    friend std::ostream& operator<< (std::ostream& output_stream, const sort_t & x)
57    {
58      output_stream << "[" << x.index << "] " << x.val << " - " << x.data;
59     
60      return output_stream;
61    }
62  };
63
64}; // end namespace sort
65}; // end namespace generic
66}; // end namespace behavioural
67}; // end namespace morpheo             
68
69#endif
Note: See TracBrowser for help on using the repository browser.