Ignore:
Timestamp:
Jan 19, 2008, 12:09:01 PM (16 years ago)
Author:
rosiere
Message:

Modification of Statisctics
Add a new systemC component : Load_Store_Queue (tested with one benchmark and one configuration). Store don't supported the Data Buss Error (Load is supported)

Location:
trunk/IPs/systemC/processor/Morpheo/Behavioural/include
Files:
3 added
14 edited

Legend:

Unmodified
Added
Removed
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Component.h

    r62 r71  
    2121#include "Common/include/Debug.h"
    2222#include "Behavioural/include/Usage.h"
    23 
    24 using namespace std;
    2523
    2624namespace morpheo              {
     
    5351  public    :                       ~Component        ();
    5452
    55   public    : Entity *              set_entity        (string        name   
    56                                                        ,string        type 
     53  public    : Entity *              set_entity        (std::string        name   
     54                                                       ,std::string        type 
    5755#ifdef POSITION
    5856                                                       ,schema_t      schema
    5957#endif
    6058                                                       );
    61   private   : string                get_entity        (void);
     59  private   : std::string                get_entity        (void);
    6260
    6361  public    : void                  set_component     (Component * component
     
    7169                                                       );
    7270
    73   private   : string                get_component     (void);
     71  private   : std::string                get_component     (void);
    7472
    75   private   : Entity *              find_entity       (string name);
    76 //private   : Interface *           find_interface    (string   name  ,
     73  private   : Entity *              find_entity       (std::string name);
     74//private   : Interface *           find_interface    (std::string   name  ,
    7775//                                                     Entity * entity);
    7876
     
    8583                                                       Signal * signal_productor);
    8684
    87   public    : void                  port_map          (string component_src ,
    88                                                        string port_src      ,
    89                                                        string component_dest,
    90                                                        string port_dest    );
    91   public    : void                  port_map          (string component_src ,
    92                                                        string port_src      );
     85  public    : void                  port_map          (std::string component_src ,
     86                                                       std::string port_src      ,
     87                                                       std::string component_dest,
     88                                                       std::string port_dest    );
     89  public    : void                  port_map          (std::string component_src ,
     90                                                       std::string port_src      );
    9391
    9492  public    : bool                  test_map          (void);
    9593
    9694#ifdef POSITION
    97   public    : void                  interface_map     (string component_src ,
    98                                                        string port_dest,
    99                                                        string component_dest,
    100                                                        string port_dest     );
     95  public    : void                  interface_map     (std::string component_src ,
     96                                                       std::string port_dest,
     97                                                       std::string component_dest,
     98                                                       std::string port_dest     );
    10199
    102100  public    : XML                   toXML             (void);
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Configuration_Parameters.h

    r44 r71  
    1515#include "Common/include/ErrorMorpheo.h"
    1616#include "Common/include/ToString.h"
    17 using namespace std;
    1817
    1918namespace morpheo     {
     
    2423    // -----[ fields ]----------------------------------------------------
    2524    // Constant
    26   public   : const string    _name   ;
     25  public   : const std::string    _name   ;
    2726  public   : const uint32_t  _value  ;
    2827  public   : const uint32_t  _min    ;
    2928  public   : const uint32_t  _max    ;
    30   public   : const string    _step   ;
     29  public   : const std::string    _step   ;
    3130  public   : const uint32_t  _default;
    3231  public   : const uint32_t  _level  ;
    33   public   : const string    _comment;
     32  public   : const std::string    _comment;
    3433
    3534    // -----[ methods ]---------------------------------------------------
    36   public   :                 Configuration_Parameters  (string   name   ,
     35  public   :                 Configuration_Parameters  (std::string   name   ,
    3736                                                        uint32_t value  ,
    3837                                                        uint32_t min    ,
    3938                                                        uint32_t max    ,
    40                                                         string   step   ,
     39                                                        std::string   step   ,
    4140                                                        uint32_t value_default,
    4241                                                        uint32_t level  ,
    43                                                         string   comment);
     42                                                        std::string   comment);
    4443  public   :                 ~Configuration_Parameters ();
    4544
    4645    // methods to print and test parameters_configuration
    47   public   : string          print                      (uint32_t depth);
     46  public   : std::string          print                      (uint32_t depth);
    4847  public   : friend ostream& operator<<                 (ostream& output_stream,
    4948                                                         morpheo::behavioural::Configuration_Parameters & x);
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Constants.h

    r62 r71  
    1111
    1212  //-------------------------------------------------------[ Memory ]-----
     13#define OPERATION_MEMORY_LOAD                    0x0      // 000_0000
    1314#define OPERATION_MEMORY_LOAD_8_Z                0x0      // 000_0000
    1415#define OPERATION_MEMORY_LOAD_16_Z               0x20     // 010_0000
     
    5556         (x == OPERATION_MEMORY_STORE_HEAD_KO))
    5657
     58#define is_operation_memory_load_signed(x)      \
     59        ((x == OPERATION_MEMORY_LOAD_8_S ) or   \
     60         (x == OPERATION_MEMORY_LOAD_16_S) or   \
     61         (x == OPERATION_MEMORY_LOAD_32_S) or   \
     62         (x == OPERATION_MEMORY_LOAD_64_S) )
     63
    5764#define MEMORY_ACCESS_8                          0x0
    5865#define MEMORY_ACCESS_16                         0x1
     
    6067#define MEMORY_ACCESS_64                         0x3
    6168
     69#define MEMORY_SIZE_8                            8
     70#define MEMORY_SIZE_16                           16
     71#define MEMORY_SIZE_32                           32
     72#define MEMORY_SIZE_64                           64
     73
    6274#define MASK_MEMORY_ACCESS_8                     0x0
    6375#define MASK_MEMORY_ACCESS_16                    0x1
    6476#define MASK_MEMORY_ACCESS_32                    0x3
    6577#define MASK_MEMORY_ACCESS_64                    0x7
     78
     79#define memory_size(x)                                                           \
     80        (((x==OPERATION_MEMORY_LOAD_16_Z)or                                      \
     81           (x==OPERATION_MEMORY_LOAD_16_S)or                                     \
     82           (x==OPERATION_MEMORY_STORE_16 ))?MEMORY_SIZE_16:                      \
     83          (((x==OPERATION_MEMORY_LOAD_32_Z)or                                    \
     84            (x==OPERATION_MEMORY_LOAD_32_S)or                                    \
     85            (x==OPERATION_MEMORY_STORE_32 ))?MEMORY_SIZE_32:                     \
     86           (((x==OPERATION_MEMORY_LOAD_64_Z)or                                   \
     87             (x==OPERATION_MEMORY_LOAD_64_S)or                                   \
     88             (x==OPERATION_MEMORY_STORE_64 ))?MEMORY_SIZE_64:MEMORY_SIZE_8)))
    6689
    6790#define memory_access(x)                                                         \
     
    86109             (x==OPERATION_MEMORY_LOAD_64_S)or                                   \
    87110             (x==OPERATION_MEMORY_STORE_64 ))?MASK_MEMORY_ACCESS_64:MASK_MEMORY_ACCESS_8)))
    88 
    89111   
    90112  //====================================================[ Exception ]=====
     
    131153#define EXCEPTION_MEMORY_BUS_ERROR               0x4  // Access at a invalid physical address
    132154#define EXCEPTION_MEMORY_MISS_SPECULATION        0x5  // Load miss speculation
     155#define EXCEPTION_MEMORY_LOAD_SPECULATIVE        0x6  // The load is speculative : write in register file, but don't commit
    133156
    134157  //==================================================[ dcache_type ]=====
    135 #  define DCACHE_LOAD                    0x0      // 0000
    136 #  define DCACHE_LOCK                    0x1      // 0001
    137 #  define DCACHE_INVALIDATE              0x2      // 0010
    138 #  define DCACHE_PREFETCH                0x3      // 0011
    139 //#define DCACHE_                        0x4      // 0100
    140 //#define DCACHE_                        0x5      // 0101
    141 #  define DCACHE_FLUSH                   0x6      // 0110
    142 #  define DCACHE_SYNCHRONIZATION         0x7      // 0111
    143 
    144 #  define DCACHE_STORE_8                 0x8      // 1000
    145 #  define DCACHE_STORE_16                0x9      // 1001
    146 #  define DCACHE_STORE_32                0xa      // 1010
    147 #  define DCACHE_STORE_64                0xb      // 1011
    148 //#define DCACHE_                        0xc      // 1100
    149 //#define DCACHE_                        0xd      // 1101
    150 //#define DCACHE_                        0xe      // 1110
    151 //#define DCACHE_                        0xf      // 1111
     158#  define DCACHE_LOAD                    0x0 // 0000
     159#  define DCACHE_LOCK                    0x1 // 0001
     160#  define DCACHE_INVALIDATE              0x2 // 0010
     161#  define DCACHE_PREFETCH                0x3 // 0011
     162//#define DCACHE_                        0x4 // 0100
     163//#define DCACHE_                        0x5 // 0101
     164#  define DCACHE_FLUSH                   0x6 // 0110
     165#  define DCACHE_SYNCHRONIZATION         0x7 // 0111
     166#  define DCACHE_STORE_8                 0x8 // 1000
     167#  define DCACHE_STORE_16                0x9 // 1001
     168#  define DCACHE_STORE_32                0xa // 1010
     169#  define DCACHE_STORE_64                0xb // 1011
     170//#define DCACHE_                        0xc // 1100
     171//#define DCACHE_                        0xd // 1101
     172//#define DCACHE_                        0xe // 1110
     173//#define DCACHE_                        0xf // 1111
    152174
    153175
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Debug_component.h

    r69 r71  
    2121#define         DEBUG_Multi_Execute_unit                          false
    2222#define           DEBUG_Execute_unit                              false
    23 #define             DEBUG_Load_store_unit                         false
     23#define             DEBUG_Load_store_unit                         true
    2424#define         DEBUG_Multi_Read_unit                             false
    2525#define           DEBUG_Read_unit                                 false
    2626#define             DEBUG_Read_queue                              false
    27 #define             DEBUG_Reservation_station                     true
     27#define             DEBUG_Reservation_station                     false
    2828#define         DEBUG_Register_unit                               false
    2929#define           DEBUG_Register_unit_Glue                        false
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Entity.h

    r62 r71  
    2020#include "Behavioural/include/Usage.h"
    2121
    22 using namespace std;
    23 
    2422namespace morpheo              {
    2523namespace behavioural          {
     
    2826  {
    2927    // -----[ fields ]----------------------------------------------------
    30   private   : const string          _name         ;
    31   private   : const string          _type         ;
     28  private   : const std::string          _name         ;
     29  private   : const std::string          _type         ;
    3230#ifdef POSITION
    3331  private   : const schema_t        _schema       ;
     
    3836
    3937#ifdef POSITION
    40   private   : string                _comment      ;
     38  private   : std::string                _comment      ;
    4139
    4240  private   :       bool            _is_map       ;
     
    4846
    4947    // -----[ methods ]---------------------------------------------------
    50   public    :                       Entity            ( string        name   
    51                                                        ,string        type   
     48  public    :                       Entity            ( std::string        name   
     49                                                       ,std::string        type   
    5250#ifdef POSITION
    5351                                                       ,schema_t      schema
     
    5856  public    :                       ~Entity           ();
    5957
    60   public    : string                get_name          (void);
    61   public    : string                get_type          (void);
     58  public    : std::string                get_name          (void);
     59  public    : std::string                get_type          (void);
    6260
    6361#ifdef POSITION
    64   public    : void                  set_comment       (string comment);
    65   private   : string                get_comment       (void          );
     62  public    : void                  set_comment       (std::string comment);
     63  private   : std::string                get_comment       (void          );
    6664#endif
    6765  public    : Interfaces *          set_interfaces    (void);
    68   private   : string                get_interfaces    (void);
     66  private   : std::string                get_interfaces    (void);
    6967  public    : Interfaces *          get_interfaces_list(void);
    7068
    71   public    : Interface  *          find_interface    (string name);
    72   public    : Signal     *          find_signal       (string name);
     69  public    : Interface  *          find_interface    (std::string name);
     70  public    : Signal     *          find_signal       (std::string name);
    7371  public    : bool                  find_signal       (Signal * signal);
    7472
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Environnement.h

    r68 r71  
    1818#  define SYSTEMC_VHDL_COMPATIBILITY
    1919#endif
     20
     21#if (defined(DEBUG))
     22#  define DEBUG_TEST
     23#endif
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Interface.h

    r62 r71  
    2828#include "Behavioural/include/Usage.h"
    2929
    30 using namespace std;
    31 
    3230namespace morpheo              {
    3331namespace behavioural          {
     
    3634  {
    3735    // -----[ fields ]----------------------------------------------------
    38   protected : const string          _name         ;
     36  protected : const std::string          _name         ;
    3937#ifdef POSITION
    4038  protected : const direction_t     _direction    ;
     
    4442
    4543#ifdef POSITION
    46   protected :       string          _comment      ;
     44  protected :       std::string          _comment      ;
    4745#endif
    4846
     
    6058   
    6159    // -----[ methods ]---------------------------------------------------
    62   public    :                       Interface            (string         name       
     60  public    :                       Interface            (std::string         name       
    6361#ifdef POSITION
    6462                                                          ,direction_t    direction   
     
    7169  public    :                       ~Interface           ();
    7270
    73   public    : string                get_name             ();
    74 
    75 #ifdef POSITION
    76   public    : void                  set_comment          (string comment);
    77   protected : string                get_comment          (void          );
    78 #endif
    79 
    80   protected : string                signal_name          (string      name_interface,
    81                                                           string      name_signal   ,
     71  public    : std::string                get_name             ();
     72
     73#ifdef POSITION
     74  public    : void                  set_comment          (std::string comment);
     75  protected : std::string                get_comment          (void          );
     76#endif
     77
     78  protected : std::string                signal_name          (std::string      name_interface,
     79                                                          std::string      name_signal   ,
    8280                                                          direction_t direction     );
    8381
    84   public    : Signal *              find_signal          (string name);
     82  public    : Signal *              find_signal          (std::string name);
    8583  public    : bool                  find_signal          (Signal * signal);
    8684
    87   protected : string                get_signal           (void);
    88   public    : Signal *              set_signal           (string          name     ,
     85  protected : std::string                get_signal           (void);
     86  public    : Signal *              set_signal           (std::string          name     ,
    8987                                                          direction_t     direction,
    9088                                                          uint32_t        size     ,
     
    9391
    9492#ifdef SYSTEMC
    95   public    : sc_in_clk *           set_signal_clk       (string          name     ,
     93  public    : sc_in_clk *           set_signal_clk       (std::string          name     ,
    9694                                                          uint32_t        size     ,
    9795                                                          presence_port_t presence_port=CLOCK_VHDL_YES)
     
    122120
    123121  public    : template <typename T>
    124               sc_in <T> *           set_signal_in       (string          name     ,
     122              sc_in <T> *           set_signal_in       (std::string          name     ,
    125123                                                         uint32_t        size     ,
    126124                                                         presence_port_t presence_port=PORT_VHDL_YES_TESTBENCH_YES)
     
    151149
    152150  public    : template <typename T>
    153               sc_out <T> *          set_signal_out      (string          name     ,
     151              sc_out <T> *          set_signal_out      (std::string          name     ,
    154152                                                         uint32_t        size     ,
    155153                                                         presence_port_t presence_port=PORT_VHDL_YES_TESTBENCH_YES)
     
    180178
    181179  public    : template <typename T>
    182               sc_signal <T> *       set_signal_internal (string   name,
     180              sc_signal <T> *       set_signal_internal (std::string   name,
    183181                                                         uint32_t size)
    184182    {
     
    209207#  ifdef VHDL_TESTBENCH
    210208  public    : void                  set_signal           (Vhdl * & vhdl);
    211   public    : void                  get_signal           (list<string> * & list_signal);
     209  public    : void                  get_signal           (list<std::string> * & list_signal);
    212210#  endif
    213211#endif
     
    220218  public    : void                  testbench_cycle      (void);
    221219  public    : void                  testbench_body       (Vhdl           * & vhdl          ,
    222                                                           string             counter_name  ,
    223                                                           string             reset_name    );
    224   public    : string                testbench_test       (Vhdl           * & vhdl        ,
    225                                                           string             counter_name,
    226                                                           string             reset_name);
    227   public    : string                testbench_test_ok    (Vhdl           * & vhdl        );
    228   protected : string                testbench_test_name   (Vhdl           * & vhdl);
    229   protected : string                testbench_test_ok_name(Vhdl           * & vhdl);
    230   protected : string                testbench_test_transaction_name(Vhdl           * & vhdl);
     220                                                          std::string             counter_name  ,
     221                                                          std::string             reset_name    );
     222  public    : std::string                testbench_test       (Vhdl           * & vhdl        ,
     223                                                          std::string             counter_name,
     224                                                          std::string             reset_name);
     225  public    : std::string                testbench_test_ok    (Vhdl           * & vhdl        );
     226  protected : std::string                testbench_test_name   (Vhdl           * & vhdl);
     227  protected : std::string                testbench_test_ok_name(Vhdl           * & vhdl);
     228  protected : std::string                testbench_test_transaction_name(Vhdl           * & vhdl);
    231229#endif
    232230
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Interfaces.h

    r62 r71  
    2020#include "Behavioural/include/Usage.h"
    2121
    22 using namespace std;
    2322
    2423namespace morpheo              {
     
    2827  {
    2928    // -----[ fields ]----------------------------------------------------
    30   private   : const string               _name;
     29  private   : const std::string               _name;
    3130  private   : const Tusage_t             _usage;
    3231  private   : list<Interface_fifo*>    * _list_interface;
    3332
    3433    // -----[ methods ]---------------------------------------------------
    35   public    :                       Interfaces            (string name,
     34  public    :                       Interfaces            (std::string name,
    3635                                                           Tusage_t usage=USE_ALL);
    3736  public    :                       Interfaces            (const Interfaces & interfaces);
    3837  public    :                       ~Interfaces           ();
    3938
    40   public    : Interface_fifo *      set_interface         (string         name       
     39  public    : Interface_fifo *      set_interface         (std::string         name       
    4140#ifdef POSITION
    4241                                                           ,direction_t    direction   
     
    4544                                                           );
    4645#ifdef POSITION
    47   public    : Interface_fifo *      set_interface         (string         name        ,
     46  public    : Interface_fifo *      set_interface         (std::string         name        ,
    4847                                                           direction_t    direction   ,
    4948                                                           localisation_t localisation,
    50                                                            string         comment     );
     49                                                           std::string         comment     );
    5150#endif
    52   private   : string                get_interface         (void);
     51  private   : std::string                get_interface         (void);
    5352  public    :list<Interface_fifo*>* get_interface_list    (void);
    5453
     
    5655  public    : void                  set_port              (Vhdl           * & vhdl          );
    5756#  ifdef VHDL_TESTBENCH
    58   private   : void                  get_signal            (list<string>   * & list_signal   );
     57  private   : void                  get_signal            (list<std::string>   * & list_signal   );
    5958  private   : void                  set_signal            (Vhdl           * & vhdl          );
    6059#  endif
     
    6766  private   : void                  testbench_generate_file (void);
    6867  public    : void                  testbench             (void);
    69   private   : string                testbench_body        (Vhdl           * & vhdl          ,
    70                                                            string             counter_name  ,
    71                                                            string             reset_name    );
     68  private   : std::string                testbench_body        (Vhdl           * & vhdl          ,
     69                                                           std::string             counter_name  ,
     70                                                           std::string             reset_name    );
    7271#endif
    7372
    74   public    : Interface_fifo  *     find_interface        (string name);
    75   public    : Signal          *     find_signal           (string name);
     73  public    : Interface_fifo  *     find_interface        (std::string name);
     74  public    : Signal          *     find_signal           (std::string name);
    7675  public    : bool                  find_signal           (Signal * signal);
    7776
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Parameters.h

    r62 r71  
    1818#include "Common/include/Debug.h"
    1919
    20 using namespace std;
    21 
    2220namespace morpheo     {
    2321namespace behavioural {
     
    3735       
    3836    // methods to print and test parameters
    39   public   : virtual string   print                 (uint32_t depth) = 0;
    40   public   : virtual string   msg_error             (void) = 0;
     37  public   : virtual std::string   print                 (uint32_t depth) = 0;
     38  public   : virtual std::string   msg_error             (void) = 0;
    4139
    4240    // methods to generate configuration file
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Parameters_Statistics.h

    r50 r71  
    1212#include "Common/include/Debug.h"
    1313#include <stdint.h>
    14 using namespace std;
    1514
    1615namespace morpheo              {
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Signal.h

    r65 r71  
    2626#include "Common/include/ToString.h"
    2727#include "Common/include/Debug.h"
    28 
    29 using namespace std;
    3028
    3129namespace morpheo              {
     
    5351
    5452    // -----[ fields ]----------------------------------------------------
    55   private   : const string          _name          ;
     53  private   : const std::string          _name          ;
    5654  private   : const direction_t     _direction     ;
    5755  private   : const presence_port_t _presence_port ;
     
    6866
    6967#ifdef VHDL_TESTBENCH
    70   private   : list<string>        * _list_value    ;
     68  private   : list<std::string>        * _list_value    ;
    7169#endif
    7270
    7371    // -----[ methods ]---------------------------------------------------
    74   public    :                   Signal          (string          name          ,
     72  public    :                   Signal          (std::string          name          ,
    7573                                                 direction_t     direction     ,
    7674                                                 uint32_t        size          ,
     
    7977  public    :                   ~Signal         ();
    8078
    81   public    : string            get_name                (void);
     79  public    : std::string            get_name                (void);
    8280  public    : uint32_t          get_size                (void);
    8381  public    : void              set_size                (uint32_t size);
     
    184182
    185183  public    : void              set_signal      (Vhdl * & vhdl);
    186   public    : void              get_name_vhdl   (list<string> * & list_signal);
     184  public    : void              get_name_vhdl   (list<std::string> * & list_signal);
    187185
    188186  public    : void              testbench        (void);
    189187  public    : void              testbench_body   (Vhdl           * & vhdl          ,
    190                                                   string             counter_name  ,
    191                                                   string             reset_name    );
     188                                                  std::string             counter_name  ,
     189                                                  std::string             reset_name    );
    192190  public    : void              testbench_test_ok(Vhdl           * & vhdl          );
    193191#  endif
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Statistics.h

    r53 r71  
    1818#include "Common/include/Percent.h"
    1919
    20 using namespace std;
    21 
    2220namespace morpheo              {
    2321namespace behavioural          {
     
    2624  {
    2725    // -----[ fields ]----------------------------------------------------
    28   protected : const string                  _name;
     26  protected : const std::string                  _name;
    2927  protected : const Parameters_Statistics * _parameters_statistics;
    3028
     
    3331
    3432    // -----[ methods ]---------------------------------------------------
    35   public    :                  Statistics          (string                  name                 ,
     33  public    :                  Statistics          (std::string                  name                 ,
    3634                                                    Parameters_Statistics * parameters_statistics);
    3735  public    : virtual          ~Statistics         ();
     
    4038  protected : uint32_t         compute_cycle_end   (uint32_t num_statistics, uint32_t nb_cycle);
    4139
    42   public    : virtual string   print_body          (uint32_t depth) = 0;
    43   public    : virtual string   print               (uint32_t depth) = 0;
    44   public    : void             generate_file       (string   stat );
     40  public    : virtual std::string   print_body          (uint32_t depth) = 0;
     41  public    : virtual std::string   print               (uint32_t depth) = 0;
     42  public    : void             generate_file       (std::string   stat );
    4543  public    : void             generate_file       (void);
    4644
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Vhdl.h

    r69 r71  
    2020#include "Common/include/ErrorMorpheo.h"
    2121
    22 using namespace std;
     22namespace morpheo              {
     23  namespace behavioural          {
    2324
    24 namespace morpheo              {
    25 namespace behavioural          {
     25    std::string std_logic        (uint32_t size);
     26    std::string std_logic_conv   (uint32_t size, std::string   value);
     27    std::string std_logic_conv   (uint32_t size, uint32_t value);
     28    std::string std_logic_range  (uint32_t size, uint32_t max , uint32_t min  );
     29    std::string std_logic_range  (uint32_t max , uint32_t min  );
     30    std::string std_logic_range  (uint32_t size);
     31    std::string std_logic_others (uint32_t size, uint32_t cst  );
    2632
    27   string std_logic        (uint32_t size);
    28   string std_logic_conv   (uint32_t size, string   value);
    29   string std_logic_conv   (uint32_t size, uint32_t value);
    30   string std_logic_range  (uint32_t size, uint32_t max , uint32_t min  );
    31   string std_logic_range  (uint32_t max , uint32_t min  );
    32   string std_logic_range  (uint32_t size);
    33   string std_logic_others (uint32_t size, uint32_t cst  );
     33    class Vhdl
     34    {
     35      // -----[ fields ]----------------------------------------------------
     36    private   : const std::string     _name                         ;
    3437
    35   class Vhdl
    36   {
    37     // -----[ fields ]----------------------------------------------------
    38   private   : const string     _name                         ;
     38    private   : std::list<std::string>     _list_library_work            ;
     39    private   : std::list<std::string>     _list_signal                  ;
     40    private   : std::list<std::string>     _list_type                    ;
     41    private   : std::list<std::string>     _list_alias                   ;
     42    private   : std::list<std::string>     _list_port                    ;
     43    private   : std::list<std::string>     _list_body                    ;
    3944
    40   private   : list<string>     _list_library_work            ;
    41   private   : list<string>     _list_signal                  ;
    42   private   : list<string>     _list_type                    ;
    43   private   : list<string>     _list_alias                   ;
    44   private   : list<string>     _list_port                    ;
    45   private   : list<string>     _list_body                    ;
    46    
    47     // -----[ methods ]---------------------------------------------------
    48   public    :                  Vhdl                        (string name);
    49   public    :                  ~Vhdl                       ();
    50                                                            
    51   public    : void             generate_file               (void);
    52   public    : void             generate_file               (bool generate_package,
    53                                                             bool generate_model  );
     45      // -----[ methods ]---------------------------------------------------
     46    public    :                  Vhdl                        (std::string name);
     47    public    :                  ~Vhdl                       ();
    5448
    55   private   : void             generate_file_package       (void);
    56   private   : void             generate_file_model         (void);
    57  
    58   private   : string           get_package                 (uint32_t    depth                 ,
    59                                                             string      filename              ,
    60                                                             string      package_name          ,
    61                                                             string      entity_name           );
    62   private   : string           get_model                   (uint32_t    depth                 ,
    63                                                             string      filename              ,
    64                                                             string      entity_name           ,
    65                                                             string      architecture_name     );
    66   private   : string           get_header                  (uint32_t    depth                 ,
    67                                                             string      filename              );
    68   private   : string           get_entity                  (uint32_t    depth                 ,
    69                                                             string      name                  );
    70   private   : string           get_architecture            (uint32_t    depth                 ,
    71                                                             string      name                  ,
    72                                                             string      entity_name           );
    73   private   : string           get_component               (uint32_t    depth                 ,
    74                                                             string      name                  );
     49    public    : void             generate_file               (void);
     50    public    : void             generate_file               (bool generate_package,
     51                                                              bool generate_model  );
    7552
    76   private   : string           get_port                    (uint32_t    depth                 );
    77   public    : void             set_port                    (string      name                  ,
    78                                                             direction_t direction             ,
    79                                                             string      type                  );
    80   public    : void             set_port                    (string      name                  ,
    81                                                             direction_t direction             ,
    82                                                             uint32_t    size                  );
    83   private   : string           get_signal                  (uint32_t    depth                 );
    84   public    : void             set_signal                  (string      name                  ,
    85                                                             string      type                  );
    86   public    : void             set_signal                  (string      name                  ,
    87                                                             uint32_t    signal                );
    88   public    : void             set_signal                  (string      name                  ,
    89                                                             string      type                  ,
    90                                                             string      init                  );
    91   public    : void             set_signal                  (string      name                  ,
    92                                                             uint32_t    size                  ,
    93                                                             string      init                  );
    94   public    : void             set_signal                  (string      name                  ,
    95                                                             uint32_t    size                  ,
    96                                                             uint32_t    init                  );
    97   public    : void             set_constant                (string      name                  ,
    98                                                             string      type                  ,
    99                                                             string      init                  );
    100   public    : void             set_constant                (string      name                  ,
    101                                                             uint32_t    size                  ,
    102                                                             string      init                  );
    103   public    : void             set_constant                (string      name                  ,
    104                                                             uint32_t    size                  ,
    105                                                             uint32_t    init                  );
     53    private   : void             generate_file_package       (void);
     54    private   : void             generate_file_model         (void);
    10655
    107   private   : string           get_type                    (uint32_t    depth                 );
    108   public    : void             set_type                    (string      name                  ,
    109                                                             string      type                  );
    110   private   : string           get_alias                   (uint32_t    depth                 );
    111   public    : void             set_alias                   (string      name1                 ,
    112                                                             string      type1                 ,
    113                                                             string      name2                 ,
    114                                                             string      range2                );
    115   public    : void             set_alias                   (string      name1                 ,
    116                                                             uint32_t    size1                 ,
    117                                                             string      name2                 ,
    118                                                             string      range2                );
     56    private   : std::string           get_package                 (uint32_t    depth                 ,
     57                                                                   std::string      filename              ,
     58                                                                   std::string      package_name          ,
     59                                                                   std::string      entity_name           );
     60    private   : std::string           get_model                   (uint32_t    depth                 ,
     61                                                                   std::string      filename              ,
     62                                                                   std::string      entity_name           ,
     63                                                                   std::string      architecture_name     );
     64    private   : std::string           get_header                  (uint32_t    depth                 ,
     65                                                                   std::string      filename              );
     66    private   : std::string           get_entity                  (uint32_t    depth                 ,
     67                                                                   std::string      name                  );
     68    private   : std::string           get_architecture            (uint32_t    depth                 ,
     69                                                                   std::string      name                  ,
     70                                                                   std::string      entity_name           );
     71    private   : std::string           get_component               (uint32_t    depth                 ,
     72                                                                   std::string      name                  );
    11973
    120   public    : string           get_list                    (list<string> liste                ,
    121                                                             uint32_t     depth                ,
    122                                                             string       separator            ,
    123                                                             bool         last_separator       );
    124   public    : void             set_list                    (list<string> & liste              ,
    125                                                             string         text               );
     74    private   : std::string           get_port                    (uint32_t    depth                 );
     75    public    : void             set_port                    (std::string      name                  ,
     76                                                              direction_t direction             ,
     77                                                              std::string      type                  );
     78    public    : void             set_port                    (std::string      name                  ,
     79                                                              direction_t direction             ,
     80                                                              uint32_t    size                  );
     81    private   : std::string           get_signal                  (uint32_t    depth                 );
     82    public    : void             set_signal                  (std::string      name                  ,
     83                                                              std::string      type                  );
     84    public    : void             set_signal                  (std::string      name                  ,
     85                                                              uint32_t    signal                );
     86    public    : void             set_signal                  (std::string      name                  ,
     87                                                              std::string      type                  ,
     88                                                              std::string      init                  );
     89    public    : void             set_signal                  (std::string      name                  ,
     90                                                              uint32_t    size                  ,
     91                                                              std::string      init                  );
     92    public    : void             set_signal                  (std::string      name                  ,
     93                                                              uint32_t    size                  ,
     94                                                              uint32_t    init                  );
     95    public    : void             set_constant                (std::string      name                  ,
     96                                                              std::string      type                  ,
     97                                                              std::string      init                  );
     98    public    : void             set_constant                (std::string      name                  ,
     99                                                              uint32_t    size                  ,
     100                                                              std::string      init                  );
     101    public    : void             set_constant                (std::string      name                  ,
     102                                                              uint32_t    size                  ,
     103                                                              uint32_t    init                  );
    126104
    127   private   : string           get_body                    (uint32_t       depth              );
    128   public    : void             set_body                    (string         text               );
     105    private   : std::string           get_type                    (uint32_t    depth                 );
     106    public    : void             set_type                    (std::string      name                  ,
     107                                                              std::string      type                  );
     108    private   : std::string           get_alias                   (uint32_t    depth                 );
     109    public    : void             set_alias                   (std::string      name1                 ,
     110                                                              std::string      type1                 ,
     111                                                              std::string      name2                 ,
     112                                                              std::string      range2                );
     113    public    : void             set_alias                   (std::string      name1                 ,
     114                                                              uint32_t    size1                 ,
     115                                                              std::string      name2                 ,
     116                                                              std::string      range2                );
    129117
    130   public    : void             set_body_component          (string         name_instance      ,
    131                                                             string         name_component     ,
    132                                                             list<string>   list_port_map      );
    133   public    : void             set_body_component_port_map (list<string> & list_port_map      ,
    134                                                             string         name_port          ,
    135                                                             uint32_t       size_port          ,
    136                                                             string         name_signal        ,
    137                                                             uint32_t       size_signal        );
     118    public    : std::string           get_list                    (std::list<std::string> liste                ,
     119                                                                   uint32_t     depth                ,
     120                                                                   std::string       separator            ,
     121                                                                   bool         last_separator       );
     122    public    : void             set_list                    (std::list<std::string> & liste              ,
     123                                                              std::string         text               );
    138124
    139   private   : string           get_library_ieee            (uint32_t    depth                 );
    140   private   : string           get_library_work            (uint32_t    depth                 );
    141   public    : void             set_library_work            (string      package_name          );
     125    private   : std::string           get_body                    (uint32_t       depth              );
     126    public    : void             set_body                    (std::string         text               );
    142127
    143   private   : string           direction_toString          (direction_t direction);
    144   };
     128    public    : void        set_body_component          (std::string         name_instance      ,
     129                                                         std::string         name_component     ,
     130                                                         std::list<std::string>   list_port_map      );
     131    public    : void        set_body_component_port_map (std::list<std::string> & list_port_map      ,
     132                                                         std::string         name_port          ,
     133                                                         uint32_t       size_port          ,
     134                                                         std::string         name_signal        ,
     135                                                         uint32_t       size_signal        );
    145136
    146 }; // end namespace behavioural         
     137    private   : std::string get_library_ieee            (uint32_t    depth                 );
     138    private   : std::string get_library_work            (uint32_t    depth                 );
     139    public    : void        set_library_work            (std::string      package_name          );
     140
     141    private   : std::string direction_toString          (direction_t direction);
     142    };
     143
     144  }; // end namespace behavioural         
    147145}; // end namespace morpheo             
    148146
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/include/XML.h

    r44 r71  
    1616#include "Common/include/Debug.h"
    1717
    18 using namespace std;
    19 
    2018namespace morpheo     {
    2119namespace behavioural {
     
    2523  {
    2624    // -----[ fields ]----------------------------------------------------
    27   private  : const string     _name              ;
    28   private  : string           _filename_extension;
    29   private  : string           _body              ;
    30   private  : list<string>     _list_balise_name  ;
     25  private  : const std::string     _name              ;
     26  private  : std::string           _filename_extension;
     27  private  : std::string           _body              ;
     28  private  : std::list<std::string>     _list_balise_name  ;
    3129
    3230    // -----[ methods ]---------------------------------------------------
    33   public   :                  XML                 (string name);
     31  public   :                  XML                 (std::string name);
    3432  public   :                  ~XML                (void);
    3533       
    36   public   : bool             balise_open         (string name); // no attribut
    37   public   : bool             balise_open_begin   (string name);
     34  public   : bool             balise_open         (std::string name); // no attribut
     35  public   : bool             balise_open_begin   (std::string name);
    3836  public   : bool             balise_open_end     (void);     
    3937  public   : bool             balise_close        (void);     
    40   public   : bool             singleton           (string name); // no attribut
    41   public   : bool             singleton_begin     (string name);
     38  public   : bool             singleton           (std::string name); // no attribut
     39  public   : bool             singleton_begin     (std::string name);
    4240  public   : bool             singleton_end       (void);
    43   public   : bool             attribut            (string name, string value);
     41  public   : bool             attribut            (std::string name, std::string value);
    4442  public   : bool             insert_XML          (XML    xml );
    4543
    46   public   : void             filename_extension  (string extension);
     44  public   : void             filename_extension  (std::string extension);
    4745  public   : void             generate_file       (void);
    48   public   : void             generate_file       (string encoding);
    49   public   : string           get_body            (void);
    50   public   : string           get_body            (uint32_t depth);
     46  public   : void             generate_file       (std::string encoding);
     47  public   : std::string           get_body            (void);
     48  public   : std::string           get_body            (uint32_t depth);
    5149
    52   public   : bool             comment             (string text);
    53   public   : bool             text                (string text);
     50  public   : bool             comment             (std::string text);
     51  public   : bool             text                (std::string text);
    5452                                                 
    55   private  : string           indent              (uint32_t depth );
    56   private  : string           indent              (void);
     53  private  : std::string           indent              (uint32_t depth );
     54  private  : std::string           indent              (void);
    5755  private  : uint32_t         depth               (void);
    5856                                                 
    59   private  : void             header              (string encoding);
     57  private  : void             header              (std::string encoding);
    6058  };
    6159}; // end namespace behavioural         
Note: See TracChangeset for help on using the changeset viewer.