Ignore:
Timestamp:
Feb 16, 2010, 1:35:48 PM (14 years ago)
Author:
rosiere
Message:

Various modif (add test, and vhdl)

Location:
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic
Files:
14 added
28 edited

Legend:

Unmodified
Added
Removed
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Counter/include/Parameters.h

    r88 r137  
    2222  {
    2323    //-----[ fields ]------------------------------------------------------------
    24   public : const uint32_t _size_data;
    25   public : const uint32_t _nb_port  ;
    26   public : const uint32_t _data_max ;
     24  public : uint32_t _size_data;
     25  public : uint32_t _nb_port  ;
     26  public : uint32_t _data_max ;
    2727
    2828    //-----[ methods ]-----------------------------------------------------------
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Counter/src/Parameters.cpp

    r113 r137  
    1616  Parameters::Parameters (uint32_t size_data,
    1717                          uint32_t nb_port  ):
    18     behavioural::Parameters("Counter"),
    19     _size_data(size_data),
    20     _nb_port  (nb_port  ),
    21     _data_max ((1<<size_data)-1)
     18    behavioural::Parameters("Counter")
    2219  {
    2320    log_printf(FUNC,Counter,"Parameters","Begin");
     21
     22    _size_data = size_data;
     23    _nb_port   = nb_port  ;
     24    _data_max  = (1<<size_data)-1;
     25
    2426    test();
    2527    log_printf(FUNC,Counter,"Parameters","End");
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Queue/SelfTest/mkf.info

    r116 r137  
    11
    2 # Queue_00
    3 target_dep      all     Queue_00.ngc
    4 target_dep      Queue_00.ngc    Queue_00.prj
    5 target_dep      Queue_00.prj    Queue_00_Pack.vhdl Queue_00.vhdl
     2# Queue_0
     3target_dep      all     Queue_0.ngc
     4target_dep      Queue_0.ngc     Queue_0.prj
     5target_dep      Queue_0.prj     Queue_0_Pack.vhdl Queue_0.vhdl
    66
    7 # Queue_01
    8 target_dep      all     Queue_01.ngc
    9 target_dep      Queue_01.ngc    Queue_01.prj
    10 target_dep      Queue_01.prj    Queue_01_Pack.vhdl Queue_01.vhdl
     7# Queue_1
     8target_dep      all     Queue_1.ngc
     9target_dep      Queue_1.ngc     Queue_1.prj
     10target_dep      Queue_1.prj     Queue_1_Pack.vhdl Queue_1.vhdl
    1111
    12 # Queue_02
    13 target_dep      all     Queue_02.ngc
    14 target_dep      Queue_02.ngc    Queue_02.prj
    15 target_dep      Queue_02.prj    Queue_02_Pack.vhdl Queue_02.vhdl
     12# Queue_2
     13target_dep      all     Queue_2.ngc
     14target_dep      Queue_2.ngc     Queue_2.prj
     15target_dep      Queue_2.prj     Queue_2_Pack.vhdl Queue_2.vhdl
    1616
    17 # Queue_03
    18 target_dep      all     Queue_03.ngc
    19 target_dep      Queue_03.ngc    Queue_03.prj
    20 target_dep      Queue_03.prj    Queue_03_Pack.vhdl Queue_03.vhdl
     17# Queue_3
     18target_dep      all     Queue_3.ngc
     19target_dep      Queue_3.ngc     Queue_3.prj
     20target_dep      Queue_3.prj     Queue_3_Pack.vhdl Queue_3.vhdl
    2121
    22 # Queue_04
    23 target_dep      all     Queue_04.ngc
    24 target_dep      Queue_04.ngc    Queue_04.prj
    25 target_dep      Queue_04.prj    Queue_04_Pack.vhdl Queue_04.vhdl
    26 
    27 # Queue_05
    28 target_dep      all     Queue_05.ngc
    29 target_dep      Queue_05.ngc    Queue_05.prj
    30 target_dep      Queue_05.prj    Queue_05_Pack.vhdl Queue_05.vhdl
    31 
    32 # Queue_06
    33 target_dep      all     Queue_06.ngc
    34 target_dep      Queue_06.ngc    Queue_06.prj
    35 target_dep      Queue_06.prj    Queue_06_Pack.vhdl Queue_06.vhdl
    36 
    37 # Queue_07
    38 target_dep      all     Queue_07.ngc
    39 target_dep      Queue_07.ngc    Queue_07.prj
    40 target_dep      Queue_07.prj    Queue_07_Pack.vhdl Queue_07.vhdl
    41 
    42 # Queue_08
    43 target_dep      all     Queue_08.ngc
    44 target_dep      Queue_08.ngc    Queue_08.prj
    45 target_dep      Queue_08.prj    Queue_08_Pack.vhdl Queue_08.vhdl
    46 
    47 # Queue_09
    48 target_dep      all     Queue_09.ngc
    49 target_dep      Queue_09.ngc    Queue_09.prj
    50 target_dep      Queue_09.prj    Queue_09_Pack.vhdl Queue_09.vhdl
    51 
    52 # Queue_10
    53 target_dep      all     Queue_10.ngc
    54 target_dep      Queue_10.ngc    Queue_10.prj
    55 target_dep      Queue_10.prj    Queue_10_Pack.vhdl Queue_10.vhdl
    56 
    57 # Queue_11
    58 target_dep      all     Queue_11.ngc
    59 target_dep      Queue_11.ngc    Queue_11.prj
    60 target_dep      Queue_11.prj    Queue_11_Pack.vhdl Queue_11.vhdl
    61 
    62 # Queue_12
    63 target_dep      all     Queue_12.ngc
    64 target_dep      Queue_12.ngc    Queue_12.prj
    65 target_dep      Queue_12.prj    Queue_12_Pack.vhdl Queue_12.vhdl
    66 
    67 # Queue_13
    68 target_dep      all     Queue_13.ngc
    69 target_dep      Queue_13.ngc    Queue_13.prj
    70 target_dep      Queue_13.prj    Queue_13_Pack.vhdl Queue_13.vhdl
    71 
    72 # Queue_14
    73 target_dep      all     Queue_14.ngc
    74 target_dep      Queue_14.ngc    Queue_14.prj
    75 target_dep      Queue_14.prj    Queue_14_Pack.vhdl Queue_14.vhdl
    76 
    77 # Queue_15
    78 target_dep      all     Queue_15.ngc
    79 target_dep      Queue_15.ngc    Queue_15.prj
    80 target_dep      Queue_15.prj    Queue_15_Pack.vhdl Queue_15.vhdl
    81 
    82 # Queue_16
    83 target_dep      all     Queue_16.ngc
    84 target_dep      Queue_16.ngc    Queue_16.prj
    85 target_dep      Queue_16.prj    Queue_16_Pack.vhdl Queue_16.vhdl
    86 
    87 # Queue_17
    88 target_dep      all     Queue_17.ngc
    89 target_dep      Queue_17.ngc    Queue_17.prj
    90 target_dep      Queue_17.prj    Queue_17_Pack.vhdl Queue_17.vhdl
    91 
    92 # Queue_18
    93 target_dep      all     Queue_18.ngc
    94 target_dep      Queue_18.ngc    Queue_18.prj
    95 target_dep      Queue_18.prj    Queue_18_Pack.vhdl Queue_18.vhdl
    96 
    97 # Queue_19
    98 target_dep      all     Queue_19.ngc
    99 target_dep      Queue_19.ngc    Queue_19.prj
    100 target_dep      Queue_19.prj    Queue_19_Pack.vhdl Queue_19.vhdl
    101 
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Queue/SelfTest/src/top_allocation.cpp

    r113 r137  
    3131
    3232  _usage = USE_ALL;
    33 //   _usage = usage_unset(_usage,USE_SYSTEMC              );
     33  _usage = usage_unset(_usage,USE_SYSTEMC              );
    3434//   _usage = usage_unset(_usage,USE_VHDL                 );
    3535//   _usage = usage_unset(_usage,USE_VHDL_TESTBENCH       );
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Queue/include/Parameters.h

    r101 r137  
    2222  {
    2323    //-----[ fields ]------------------------------------------------------------
    24   public : const uint32_t _size_queue         ;
    25   public : const uint32_t _size_data          ;
    26   public : const uint32_t _nb_port_slot       ;
    27   public : const bool     _have_port_ptr_write;
    28   public : const bool     _have_port_ptr_read ;
     24  public : uint32_t _size_queue         ;
     25  public : uint32_t _size_data          ;
     26  public : uint32_t _nb_port_slot       ;
     27  public : bool     _have_port_ptr_write;
     28  public : bool     _have_port_ptr_read ;
    2929
    30   public : const uint32_t _size_ptr           ;
    31   public : const bool     _have_port_ptr      ;
     30  public : uint32_t _size_ptr           ;
     31  public : bool     _have_port_ptr      ;
    3232
    3333    //-----[ methods ]-----------------------------------------------------------
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Queue/src/Parameters.cpp

    r113 r137  
    2121                          bool     have_port_ptr_write,
    2222                          bool     have_port_ptr_read ):
    23     behavioural::Parameters("Queue"),
    24     _size_queue          (size_queue),
    25     _size_data           (size_data ),
    26     _nb_port_slot        (nb_port_slot),
    27     _have_port_ptr_write (have_port_ptr_write and (log2(size_queue)>0)),
    28     _have_port_ptr_read  (have_port_ptr_read  and (log2(size_queue)>0)),
    29     _size_ptr            (log2(size_queue)),
    30     _have_port_ptr       (have_port_ptr_write or have_port_ptr_read)
     23    behavioural::Parameters("Queue")
    3124  {
    3225    log_printf(FUNC,Queue,FUNCTION,"Begin");
     26
     27    _size_queue          = size_queue;
     28    _size_data           = size_data ;
     29    _nb_port_slot        = nb_port_slot;
     30    _have_port_ptr_write = have_port_ptr_write and (log2(size_queue)>0);
     31    _have_port_ptr_read  = have_port_ptr_read  and (log2(size_queue)>0);
     32
     33    _size_ptr            = log2(size_queue);
     34    _have_port_ptr       = have_port_ptr_write or have_port_ptr_read;
     35
    3336    test();
    3437    log_printf(FUNC,Queue,FUNCTION,"End");
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Monolithic/include/Parameters.h

    r101 r137  
    2121  class Parameters : public morpheo::behavioural::Parameters
    2222  {
    23   public : const uint32_t    _nb_port_read ;
    24   public : const uint32_t    _nb_port_write;
    25   public : const uint32_t    _nb_port_read_write;
    26   public : const uint32_t    _nb_word      ;
    27   public : const uint32_t    _size_word    ;
    28   public : const uint32_t    _size_address ;
    29   public : const bool        _have_port_address;
    30   public : const bool        _have_init_value;
    31   public : const std::string _init_value;
     23  public : uint32_t    _nb_port_read ;
     24  public : uint32_t    _nb_port_write;
     25  public : uint32_t    _nb_port_read_write;
     26  public : uint32_t    _nb_word      ;
     27  public : uint32_t    _size_word    ;
     28  public : std::string _init_value   ;
     29
     30  public : uint32_t    _size_address ;
     31  public : bool        _have_port_address;
     32  public : bool        _have_init_value;
    3233
    3334  public : Parameters (uint32_t    nb_port_read ,
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Monolithic/src/Parameters.cpp

    r101 r137  
    77
    88#include "Behavioural/Generic/RegisterFile/RegisterFile_Monolithic/include/Parameters.h"
     9#include "Common/include/Log2.h"
    910
    1011namespace morpheo                    {
     
    2021                          uint32_t    size_word    ,
    2122                          std::string init_value
    22                           ) :
    23     _nb_port_read      (nb_port_read ),
    24     _nb_port_write     (nb_port_write),
    25     _nb_port_read_write(nb_port_read_write),
    26     _nb_word           (nb_word      ),
    27     _size_word         (size_word    ),
    28     _size_address      (static_cast<uint32_t>(log2(_nb_word))),
    29     _have_port_address (_size_address != 0),
    30     _have_init_value   (init_value != ""),
    31     _init_value        (init_value)
     23                          )
    3224  {
     25    _nb_port_read       = nb_port_read ;
     26    _nb_port_write      = nb_port_write;
     27    _nb_port_read_write = nb_port_read_write;
     28    _nb_word            = nb_word      ;
     29    _size_word          = size_word    ;
     30    _init_value         = init_value   ;
     31
     32    _size_address       = log2(_nb_word);
     33    _have_port_address  = _size_address != 0;
     34    _have_init_value    = init_value != "";
     35
    3336    test();
    3437  };
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Multi_Banked/include/Parameters.h

    r124 r137  
    2424  {
    2525    //-----[ fields ]------------------------------------------------------------
    26   public : const uint32_t    _nb_port_read         ; // Global read  port
    27   public : const uint32_t    _nb_port_write        ; // Global write port
    28   public : const uint32_t    _nb_word              ;
    29   public : const uint32_t    _size_word            ;
    30   public : const uint32_t    _nb_bank              ; // Number of bank (All bank is identical)
    31   public : const uint32_t    _nb_port_read_by_bank ; // Local  read  port
    32   public : const uint32_t    _nb_port_write_by_bank; // Local  write port
    33   public : const Tcrossbar_t _crossbar             ;
    34   public : const bool        _have_init_value;
    35   public : const std::string _init_value;
     26  public : uint32_t    _nb_port_read         ; // Global read  port
     27  public : uint32_t    _nb_port_write        ; // Global write port
     28  public : uint32_t    _nb_word              ;
     29  public : uint32_t    _size_word            ;
     30  public : uint32_t    _nb_bank              ; // Number of bank (All bank is identical)
     31  public : uint32_t    _nb_port_read_by_bank ; // Local  read  port
     32  public : uint32_t    _nb_port_write_by_bank; // Local  write port
     33  public : Tcrossbar_t _crossbar             ;
     34  public : std::string _init_value           ;
    3635
    37   public : const uint32_t    _size_address         ;
    38   public : const uint32_t    _size_address_by_bank ;
     36  public : uint32_t    _size_address         ;
     37  public : uint32_t    _size_address_by_bank ;
    3938
    40   public : const uint32_t    _bank_shift           ;
    41   public : const Taddress_t  _bank_mask            ;
    42   public : const uint32_t    _num_reg_shift        ;
    43   public : const Taddress_t  _num_reg_mask         ;
     39  public : uint32_t    _bank_shift           ;
     40  public : Taddress_t  _bank_mask            ;
     41  public : uint32_t    _num_reg_shift        ;
     42  public : Taddress_t  _num_reg_mask         ;
    4443
    45   public : const uint32_t    _nb_word_by_bank      ;
     44  public : uint32_t    _nb_word_by_bank      ;
    4645
    47   public : const bool        _have_port_address     ;
    48   public : const bool        _have_bank_port_address;
     46  public : bool        _have_port_address     ;
     47  public : bool        _have_bank_port_address;
     48  public : bool        _have_init_value       ;
    4949
    5050    // A lot of table to the partial crossbar
    51   public :       uint32_t  * _link_port_read_to_bank_read  ;
    52 //public :       uint32_t  * _link_port_read_to_num_bank   ;
    53   public :       uint32_t  * _link_port_write_to_bank_write;
    54 //public :       uint32_t  * _link_port_write_to_num_bank  ;
     51  public : uint32_t  * _link_port_read_to_bank_read  ;
     52//public : uint32_t  * _link_port_read_to_num_bank   ;
     53  public : uint32_t  * _link_port_write_to_bank_write;
     54//public : uint32_t  * _link_port_write_to_num_bank  ;
    5555
    5656    //-----[ methods ]-----------------------------------------------------------
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Multi_Banked/include/RegisterFile_Multi_Banked.h

    r88 r137  
    4848#ifdef STATISTICS
    4949  public    : Stat                           * _stat;
     50
     51  private   : counter_t                      * _stat_nb_read;
     52  private   : counter_t                      * _stat_nb_write;
     53  private   : counter_t                      * _stat_nb_conflict_on_read;
     54  private   : counter_t                      * _stat_nb_conflict_on_write;
    5055#endif
    5156
     
    8085  private   : Taddress_t                    * internal_WRITE_BANK;
    8186  private   : Taddress_t                    * internal_WRITE_NUM_REG;
     87
     88#ifdef STATISTICS
     89  private   : bool                          * internal_READ_VAL;
     90//private   : Taddress_t                    * internal_READ_BANK;
     91#endif
    8292
    8393        // function pointer
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Multi_Banked/src/Parameters.cpp

    r124 r137  
    88#include "Behavioural/Generic/RegisterFile/RegisterFile_Multi_Banked/include/Parameters.h"
    99#include "Common/include/BitManipulation.h"
     10#include "Common/include/Log2.h"
    1011
    1112namespace morpheo {
     
    2526                          Tcrossbar_t crossbar             ,
    2627                          std::string init_value
    27                           ):
    28     _nb_port_read          (nb_port_read         ),
    29     _nb_port_write         (nb_port_write        ),
    30     _nb_word               (nb_word              ),
    31     _size_word             (size_word            ),
    32     _nb_bank               (nb_bank              ),
    33     _nb_port_read_by_bank  (nb_port_read_by_bank ),
    34     _nb_port_write_by_bank (nb_port_write_by_bank),
    35     _crossbar              (crossbar             ),
    36     _have_init_value       (init_value != ""     ),
    37     _init_value            (init_value           ),
    38     _size_address          (static_cast<uint32_t>(ceil(log2(_nb_word)))),
    39     _size_address_by_bank  (_size_address - static_cast<uint32_t>(ceil(log2(_nb_bank)))),
     28                          )
     29  {
     30    log_printf(FUNC,RegisterFile_Multi_Banked,"Parameters","Begin");
     31
     32    _nb_port_read           = nb_port_read         ;
     33    _nb_port_write          = nb_port_write        ;
     34    _nb_word                = nb_word              ;
     35    _size_word              = size_word            ;
     36    _nb_bank                = nb_bank              ;
     37    _nb_port_read_by_bank   = nb_port_read_by_bank ;
     38    _nb_port_write_by_bank  = nb_port_write_by_bank;
     39    _crossbar               = crossbar             ;
     40    _init_value             = init_value           ;
     41
     42    _size_address           = log2(_nb_word);
     43    _size_address_by_bank   = _size_address - log2(_nb_bank);
    4044
    4145    // Address : [....................]  [size_address-1:0]
    4246    // Bank    : [....]                  [size_address-1:size_address-1-log2(nb_bank)]
    4347    // num_reg :      ]...............]  [size_address-2-log2(nb_bank):0]
    44     _bank_shift            (_size_address_by_bank),
    45     _bank_mask             (gen_mask<Taddress_t>(static_cast<Taddress_t>(ceil(log2(_nb_bank))))),
    46     _num_reg_shift         (0),
    47     _num_reg_mask          (gen_mask<Taddress_t>(_size_address_by_bank)),
    48     _nb_word_by_bank       (_nb_word / _nb_bank),
    49     _have_port_address     (_size_address         != 0),
    50     _have_bank_port_address(_size_address_by_bank != 0)
    51   {
    52     log_printf(FUNC,RegisterFile_Multi_Banked,"Parameters","Begin");
     48    _bank_shift             = _size_address_by_bank;
     49    _bank_mask              = gen_mask<Taddress_t>(log2(_nb_bank));
     50    _num_reg_shift          = 0;
     51    _num_reg_mask           = gen_mask<Taddress_t>(_size_address_by_bank);
     52    _nb_word_by_bank        = _nb_word / _nb_bank;
     53    _have_port_address      = _size_address         != 0;
     54    _have_bank_port_address = _size_address_by_bank != 0;
     55    _have_init_value        = init_value != ""     ;
    5356
    5457    if (_crossbar == PARTIAL_CROSSBAR)
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Multi_Banked/src/RegisterFile_Multi_Banked_allocation.cpp

    r112 r137  
    7777        ALLOC1(internal_WRITE_BANK   ,Taddress_t,_param->_nb_port_write);
    7878        ALLOC1(internal_WRITE_NUM_REG,Taddress_t,_param->_nb_port_write);
     79
     80#ifdef STATISTICS
     81        ALLOC1(internal_READ_VAL     ,bool      ,_param->_nb_port_read);
     82#endif
    7983      }
    8084
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Multi_Banked/src/RegisterFile_Multi_Banked_deallocation.cpp

    r112 r137  
    4040        DELETE1(internal_WRITE_BANK     ,_param->_nb_port_write);
    4141        DELETE1(internal_WRITE_NUM_REG  ,_param->_nb_port_write);
     42
     43#ifdef STATISTICS
     44        DELETE1(internal_READ_VAL       ,_param->_nb_port_read);
     45#endif
     46
    4247      }       
    4348
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Multi_Banked/src/RegisterFile_Multi_Banked_full_crossbar_genMealy_read.cpp

    r123 r137  
    3838        bool ack = false;
    3939
     40#ifdef STATISTICS
     41        internal_READ_VAL  [i] = false;
     42#endif
     43
    4044        log_printf(TRACE,RegisterFile_Multi_Banked,FUNCTION,"  * read [%d] : %d",i,val);
    4145
     
    7276                    log_printf(TRACE,RegisterFile_Multi_Banked,FUNCTION,"    * data      : %d",data);
    7377
     78#ifdef STATISTICS
     79                    internal_READ_VAL  [i] = true;
     80#endif
    7481                    PORT_WRITE(out_READ_DATA [i], data);
    7582
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Multi_Banked/src/RegisterFile_Multi_Banked_partial_crossbar_genMealy_read.cpp

    r123 r137  
    3737        bool ack = false;
    3838
     39#ifdef STATISTICS
     40        internal_READ_VAL  [i] = false;
     41#endif
     42
    3943        log_printf(TRACE,RegisterFile_Multi_Banked,FUNCTION,"  * read [%d] : %d",i,val);
    4044
     
    7377                    log_printf(TRACE,RegisterFile_Multi_Banked,FUNCTION,"    * data      : %d",data);
    7478
     79#ifdef STATISTICS
     80                    internal_READ_VAL  [i] = true;
     81#endif
     82
    7583                    PORT_WRITE(out_READ_DATA [i], data);
    7684
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Multi_Banked/src/RegisterFile_Multi_Banked_statistics_declaration.cpp

    r81 r137  
    2424                      "RegisterFile_Multi_Banked",
    2525                      param_statistics);
     26
     27//     _stat_nb_read              = _stat->create_variable("nb_read" );
     28//     _stat_nb_write             = _stat->create_variable("nb_write");
     29//     _stat_nb_conflict_on_read  = _stat->create_variable("nb_conflict_on_read" );
     30//     _stat_nb_conflict_on_write = _stat->create_variable("nb_conflict_on_write");
     31
     32    _stat_nb_read              = _stat->create_counter("nb_read"             ,"","");
     33    _stat_nb_write             = _stat->create_counter("nb_write"            ,"","");
     34    _stat_nb_conflict_on_read  = _stat->create_counter("nb_conflict_on_read" ,"","");
     35    _stat_nb_conflict_on_write = _stat->create_counter("nb_conflict_on_write","","");
     36
     37    _stat->create_expr_average_by_cycle("average_read" , "nb_read" , "", _("Average read by cycle" ));
     38    _stat->create_expr_average_by_cycle("average_write", "nb_write", "", _("Average write by cycle"));
     39
     40    _stat->create_expr_percent         ("percent_conflict_on_read" , "nb_conflict_on_read" , "+ nb_read  nb_conflict_on_read" , _("Percent conflit on read port" ));
     41    _stat->create_expr_percent         ("percent_conflict_on_write", "nb_conflict_on_write", "+ nb_write nb_conflict_on_write", _("Percent conflit on write port"));
    2642   
    2743    log_printf(FUNC,RegisterFile_Multi_Banked,FUNCTION,"End");
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Multi_Banked/src/RegisterFile_Multi_Banked_transition.cpp

    r128 r137  
    5151                reg_DATA[internal_WRITE_BANK[i]][internal_WRITE_NUM_REG[i]] = data;
    5252              }
     53
     54#ifdef STATISTICS
     55            if (usage_is_set(_usage,USE_STATISTICS))
     56              if (PORT_READ(in_WRITE_VAL [i]))
     57                {
     58                  if (internal_WRITE_VAL [i] == 1)
     59                    (*_stat_nb_write) ++;
     60                  else
     61                    (*_stat_nb_conflict_on_write) ++;
     62                }                 
     63#endif   
    5364          }
     65
     66#ifdef STATISTICS
     67        if (usage_is_set(_usage,USE_STATISTICS))
     68          for (uint32_t i=0; i<_param->_nb_port_read; i++)
     69            if (PORT_READ(in_READ_VAL [i]))
     70              {
     71                if (internal_READ_VAL [i] == 1)
     72                  (*_stat_nb_read) ++;
     73                else
     74                  (*_stat_nb_conflict_on_read) ++;
     75              }           
     76#endif   
     77
    5478      }
    5579
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Multi_Banked/src/RegisterFile_Multi_Banked_vhdl_body.cpp

    r81 r137  
    8888                std::string   index     = (_param->_crossbar == FULL_CROSSBAR)?("_"+toString(j)):"";
    8989
    90                 vhdl->set_body("\t"+separator+" in_VAL_"+toString(k)+"     \t=>\tinternal_READ_"+toString(i)+"_"+toString(num_port)+index+"_VAL");
    91                 vhdl->set_body("\t,out_ACK_"+toString(k)+"     \t=>\tinternal_SELECT_READ_"+toString(i)+"_"+toString(num_port)+index+"_VAL");
     90                vhdl->set_body("\t"+separator+" in_"+toString(k)+"_VAL     \t=>\tinternal_READ_"+toString(i)+"_"+toString(num_port)+index+"_VAL");
     91                vhdl->set_body("\t,out_"+toString(k)+"_ACK     \t=>\tinternal_SELECT_READ_"+toString(i)+"_"+toString(num_port)+index+"_VAL");
    9292              }
    9393            vhdl->set_body(");");
     
    107107                std::string   index     = (_param->_crossbar == FULL_CROSSBAR)?("_"+toString(j)):"";
    108108               
    109                 vhdl->set_body("\t"+separator+" in_VAL_"+toString(k)+"     \t=>\tinternal_WRITE_"+toString(i)+"_"+toString(num_port)+index+"_VAL");
    110                 vhdl->set_body("\t,out_ACK_"+toString(k)+"     \t=>\tinternal_SELECT_WRITE_"+toString(i)+"_"+toString(num_port)+index+"_VAL");
     109                vhdl->set_body("\t"+separator+" in_"+toString(k)+"_VAL     \t=>\tinternal_WRITE_"+toString(i)+"_"+toString(num_port)+index+"_VAL");
     110                vhdl->set_body("\t,out_"+toString(k)+"_ACK     \t=>\tinternal_SELECT_WRITE_"+toString(i)+"_"+toString(num_port)+index+"_VAL");
    111111              }
    112112            vhdl->set_body(");");
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/SelfTest/src/test.cpp

    r131 r137  
    2626  Tusage_t _usage = USE_ALL;
    2727
    28 //   _usage = usage_unset(_usage,USE_SYSTEMC              );
     28  _usage = usage_unset(_usage,USE_SYSTEMC              );
    2929//   _usage = usage_unset(_usage,USE_VHDL                 );
    3030//   _usage = usage_unset(_usage,USE_VHDL_TESTBENCH       );
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/include/Parameters.h

    r88 r137  
    2626  {
    2727    //-----[ fields ]------------------------------------------------------------
    28   public : const Tinstance_t _instance;
    29   public : const uint32_t    _nb_port_read ;
    30   public : const uint32_t    _nb_port_write;
    31   public : const uint32_t    _nb_word      ;
    32   public : const uint32_t    _size_word    ;
    33   public : const uint32_t    _size_address ;
    34   public : const bool        _have_port_address;
     28  public : Tinstance_t _instance;
     29  public : uint32_t    _nb_port_read ;
     30  public : uint32_t    _nb_port_write;
     31  public : uint32_t    _nb_word      ;
     32  public : uint32_t    _size_word    ;
     33  public : uint32_t    _size_address ;
     34  public : bool        _have_port_address;
    3535
    3636  public : morpheo::behavioural::generic::registerfile::registerfile_monolithic  ::Parameters * _param_registerfile_monolithic;
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/src/Parameters.cpp

    r88 r137  
    1414
    1515
    16   Parameters::Parameters (morpheo::behavioural::generic::registerfile::registerfile_monolithic  ::Parameters * param) :
    17     _instance          (instance_RegisterFile_Monolithic),
    18     _nb_port_read      (param->_nb_port_read ),
    19     _nb_port_write     (param->_nb_port_write),
    20     _nb_word           (param->_nb_word      ),
    21     _size_word         (param->_size_word    ),
    22     _size_address      (param->_size_address ),
    23     _have_port_address (param->_have_port_address)
     16  Parameters::Parameters (morpheo::behavioural::generic::registerfile::registerfile_monolithic  ::Parameters * param)
    2417  {
    2518    log_printf(FUNC,RegisterFile,"Parameters","Begin");
     19
     20    _instance          = instance_RegisterFile_Monolithic;
     21    _nb_port_read      = param->_nb_port_read ;
     22    _nb_port_write     = param->_nb_port_write;
     23    _nb_word           = param->_nb_word      ;
     24    _size_word         = param->_size_word    ;
     25    _size_address      = param->_size_address ;
     26    _have_port_address = param->_have_port_address;
    2627
    2728    _param_registerfile_monolithic   = param;
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Select/Select_Priority_Fixed/include/Parameters.h

    r88 r137  
    2222  {
    2323    //-----[ fields ]------------------------------------------------------------
    24   public : const uint32_t _nb_entity       ;
    25   public : const bool     _encoding_one_hot;
    26   public : const bool     _encoding_compact;
    27   public : const uint32_t _size_entity;
     24  public : uint32_t _nb_entity       ;
     25  public : bool     _encoding_one_hot;
     26  public : bool     _encoding_compact;
     27
     28  public : uint32_t _size_entity;
    2829
    2930    //-----[ methods ]-----------------------------------------------------------
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Select/Select_Priority_Fixed/src/Parameters.cpp

    r88 r137  
    77
    88#include "Behavioural/Generic/Select/Select_Priority_Fixed/include/Parameters.h"
     9#include "Common/include/Log2.h"
    910
    1011namespace morpheo {
     
    1718  Parameters::Parameters (uint32_t nb_entity       ,
    1819                          bool     encoding_one_hot,
    19                           bool     encoding_compact):
    20     _nb_entity        (nb_entity       ),
    21     _encoding_one_hot (encoding_one_hot),
    22     _encoding_compact (encoding_compact),
    23     _size_entity (static_cast<uint32_t> (ceil(log2(nb_entity))))
     20                          bool     encoding_compact)
    2421  {
    2522    log_printf(FUNC,Select_Priority_Fixed,"Parameters","Begin");
     23
     24    _nb_entity        = nb_entity       ;
     25    _encoding_one_hot = encoding_one_hot;
     26    _encoding_compact = encoding_compact;
     27    _size_entity      = log2(nb_entity);
     28
    2629    test();
    2730    log_printf(FUNC,Select_Priority_Fixed,"Parameters","End");
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Select/Select_Priority_Fixed/src/Select_Priority_Fixed_vhdl_body.cpp

    r81 r137  
    2424    for (uint32_t i=0; i<_param->_nb_entity; i++)
    2525      {
    26         vhdl->set_body("\t"+std_logic_conv(_param->_size_entity+1,i)+" when in_VAL_"+toString(i)+"='1' else");
     26        vhdl->set_body("\t"+std_logic_conv(_param->_size_entity+1,i)+" when in_"+toString(i)+"_VAL='1' else");
    2727      }
    2828    vhdl->set_body("\t"+std_logic_conv(_param->_size_entity+1,1<<_param->_size_entity)+";");
     
    3232      {
    3333        for (uint32_t i=0; i<_param->_nb_entity; i++)
    34           vhdl->set_body("out_ACK_"+toString(i)+" <= '1' when internal_entity"+std_logic_range(_param->_size_entity+1)+" = "+std_logic_conv(_param->_size_entity+1,i)+" else '0';");
     34          vhdl->set_body("out_"+toString(i)+"_ACK <= '1' when internal_entity"+std_logic_range(_param->_size_entity+1)+" = "+std_logic_conv(_param->_size_entity+1,i)+" else '0';");
    3535        vhdl->set_body ("");
    3636      }
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Shifter/include/Parameters.h

    r112 r137  
    2121  {
    2222    //-----[ fields ]------------------------------------------------------------
    23   public : const uint32_t    _size_data           ;
    24   public : const uint32_t    _nb_port             ;
    25   public : const uint32_t    _shift_value         ; // 0 = external shifter's value
    26   public : const rotate_t    _rotate              ;
    27   public : const direction_t _direction           ;
    28   public : const carry_t     _carry               ;
    29   public : const uint32_t    _size_data_completion;
    30   public : const bool        _type_completion_bool;
     23  public : uint32_t    _size_data           ;
     24  public : uint32_t    _nb_port             ;
     25  public : uint32_t    _shift_value         ; // 0 = external shifter's value
     26  public : rotate_t    _rotate              ;
     27  public : direction_t _direction           ;
     28  public : carry_t     _carry               ;
     29  public : uint32_t    _size_data_completion;
     30  public : bool        _type_completion_bool;
    3131
    32   public : const uint32_t    _size_shift        ;
     32  public : uint32_t    _size_shift        ;
    3333
    34   public : const bool        _internal_direction;
    35   public : const bool        _internal_type     ;
    36   public : const bool        _internal_carry    ;
     34  public : bool        _internal_direction;
     35  public : bool        _internal_type     ;
     36  public : bool        _internal_carry    ;
    3737
    38   public : const bool        _have_shift_logic_left        ;
    39   public : const bool        _have_shift_logic_right       ;
    40   public : const bool        _have_shift_logic             ;
    41   public : const bool        _have_shift_arithmetic_left   ;
    42   public : const bool        _have_shift_arithmetic_right  ;
    43   public : const bool        _have_shift_arithmetic        ;
    44   public : const bool        _have_shift                   ;
    45   public : const bool        _have_rotate_left             ;
    46   public : const bool        _have_rotate_right            ;
    47   public : const bool        _have_rotate                  ;
     38  public : bool        _have_shift_logic_left        ;
     39  public : bool        _have_shift_logic_right       ;
     40  public : bool        _have_shift_logic             ;
     41  public : bool        _have_shift_arithmetic_left   ;
     42  public : bool        _have_shift_arithmetic_right  ;
     43  public : bool        _have_shift_arithmetic        ;
     44  public : bool        _have_shift                   ;
     45  public : bool        _have_rotate_left             ;
     46  public : bool        _have_rotate_right            ;
     47  public : bool        _have_rotate                  ;
    4848   
    49   public : const bool        _have_direction_left          ;
    50   public : const bool        _have_direction_right         ;
     49  public : bool        _have_direction_left          ;
     50  public : bool        _have_direction_right         ;
    5151
    5252    //-----[ methods ]-----------------------------------------------------------
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Shifter/src/Parameters.cpp

    r112 r137  
    2020                           direction_t direction           ,
    2121                           carry_t     carry               ,
    22                            bool        type_completion_bool):
    23     _size_data                     (size_data     ),
    24     _nb_port                       (nb_port       ),
    25     _shift_value                   (shift_value   ),
    26     _rotate                        (rotate        ),
    27     _direction                     (direction     ),
    28     _carry                         (carry         ),
    29     _size_data_completion          ((carry != external_completion)?0:((_shift_value==0)?size_data:_shift_value)),
    30     _type_completion_bool          (type_completion_bool),
     22                           bool        type_completion_bool)
     23  {
     24    _size_data                     = size_data     ;
     25    _nb_port                       = nb_port       ;
     26    _shift_value                   = shift_value   ;
     27    _rotate                        = rotate        ;
     28    _direction                     = direction     ;
     29    _carry                         = carry         ;
     30    _size_data_completion          = (carry != external_completion)?0:((_shift_value==0)?size_data:_shift_value);
     31    _type_completion_bool          = type_completion_bool;
    3132
    32     _size_shift                    (static_cast<uint32_t>(ceil(log2(_size_data)))),
     33    _size_shift                    = static_cast<uint32_t>(ceil(log2(_size_data)));
     34   
     35    _internal_direction            = (direction == internal_right_shift)?_right :_left      ;
     36    _internal_type                 = (rotate    == internal_rotate     )?_rotate:_shift     ;
     37    _internal_carry                = (carry     == internal_logic      )?_logic :_arithmetic;
    3338
    34     _internal_direction            ((direction == internal_right_shift)?_right :_left      ),
    35     _internal_type                 ((rotate    == internal_rotate     )?_rotate:_shift     ),
    36     _internal_carry                ((carry     == internal_logic      )?_logic :_arithmetic),
     39    _have_shift_logic_left         = ((rotate != internal_rotate)         &&
     40                                      (((carry     == external_carry     ) ||
     41                                        (carry     == external_completion) ||
     42                                        (carry     == internal_logic     )) &&
     43                                       ((direction == external_direction ) ||
     44                                        (direction == internal_left_shift))));
     45    _have_shift_logic_right        = ((rotate != internal_rotate)         &&
     46                                      (((carry     == external_carry     ) ||
     47                                        (carry     == external_completion) ||
     48                                        (carry     == internal_logic     )) &&
     49                                       ((direction == external_direction ) ||
     50                                        (direction == internal_right_shift))));
     51    _have_shift_logic              = _have_shift_logic_left || _have_shift_logic_right;
    3752
    38     _have_shift_logic_left         ((rotate != internal_rotate)         &&
    39                                     (((carry     == external_carry     ) ||
    40                                       (carry     == external_completion) ||
    41                                       (carry     == internal_logic     )) &&
    42                                     ((direction == external_direction ) ||
    43                                      (direction == internal_left_shift)))),
    44     _have_shift_logic_right        ((rotate != internal_rotate)         &&
    45                                     (((carry     == external_carry     ) ||
    46                                       (carry     == external_completion) ||
    47                                       (carry     == internal_logic     )) &&
    48                                     ((direction == external_direction ) ||
    49                                      (direction == internal_right_shift)))),
    50     _have_shift_logic              (_have_shift_logic_left || _have_shift_logic_right),
     53    _have_shift_arithmetic_left    = ((rotate != internal_rotate)         &&
     54                                      (((carry    == external_carry     ) ||
     55                                        (carry    == internal_arithmetic )) &&
     56                                       ((direction == external_direction ) ||
     57                                        (direction == internal_left_shift))));
     58    _have_shift_arithmetic_right   = ((rotate != internal_rotate)         &&
     59                                      (((carry     == external_carry     ) ||
     60                                        (carry     == internal_arithmetic     )) &&
     61                                       ((direction == external_direction ) ||
     62                                        (direction == internal_right_shift))));
     63    _have_shift_arithmetic         = _have_shift_arithmetic_left || _have_shift_arithmetic_right;
    5164
    52     _have_shift_arithmetic_left    ((rotate != internal_rotate)         &&
    53                                     (((carry    == external_carry     ) ||
    54                                       (carry    == internal_arithmetic )) &&
    55                                     ((direction == external_direction ) ||
    56                                      (direction == internal_left_shift)))),
    57     _have_shift_arithmetic_right   ((rotate != internal_rotate)         &&
    58                                     (((carry     == external_carry     ) ||
    59                                       (carry     == internal_arithmetic     )) &&
    60                                      ((direction == external_direction ) ||
    61                                       (direction == internal_right_shift)))),
    62     _have_shift_arithmetic         (_have_shift_arithmetic_left || _have_shift_arithmetic_right),
     65    _have_shift                    = _have_shift_logic || _have_shift_arithmetic;
    6366
    64     _have_shift                    (_have_shift_logic || _have_shift_arithmetic),
     67    _have_rotate_left              = ((rotate != without_rotate)         &&
     68                                      ((direction == external_direction ) ||
     69                                       (direction == internal_left_shift)));
     70    _have_rotate_right             = ((rotate != without_rotate)         &&
     71                                      ((direction == external_direction ) ||
     72                                       (direction == internal_right_shift)));
     73    _have_rotate                   = _have_rotate_left || _have_rotate_right;
     74   
     75    _have_direction_left           = (_have_shift_logic_left       ||
     76                                      _have_shift_arithmetic_left  ||
     77                                      _have_rotate_left            );
     78    _have_direction_right          = (_have_shift_logic_right      ||
     79                                      _have_shift_arithmetic_right ||
     80                                      _have_rotate_right           );
    6581
    66     _have_rotate_left              ((rotate != without_rotate)         &&
    67                                     ((direction == external_direction ) ||
    68                                      (direction == internal_left_shift))),
    69     _have_rotate_right             ((rotate != without_rotate)         &&
    70                                     ((direction == external_direction ) ||
    71                                      (direction == internal_right_shift))),
    72     _have_rotate                   ( _have_rotate_left || _have_rotate_right),
    73 
    74     _have_direction_left           (_have_shift_logic_left       ||
    75                                     _have_shift_arithmetic_left  ||
    76                                     _have_rotate_left            ),
    77     _have_direction_right          (_have_shift_logic_right      ||
    78                                     _have_shift_arithmetic_right ||
    79                                     _have_rotate_right           )
    80   {
    8182    test();
    8283  };
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Victim/Victim_Pseudo_LRU/include/Parameters.h

    r88 r137  
    2222  {
    2323    //-----[ fields ]------------------------------------------------------------
    24   public : const uint32_t _nb_entity ; // number of entity
    25   public : const uint32_t _nb_access ; // number of port to select an entity
    26 //public : const uint32_t _nb_update ; // number of port to update the internal entity
    27   public : const uint32_t _size_table; // Size of victim_pseudo_lru's table
    28   public : const bool     _table_global;
    29   public : const uint32_t _size_address;
     24  public : uint32_t _nb_entity ; // number of entity
     25  public : uint32_t _nb_access ; // number of port to select an entity
     26//public : uint32_t _nb_update ; // number of port to update the internal entity
     27  public : uint32_t _size_table; // Size of victim_pseudo_lru's table
     28  public : bool     _table_global;
     29  public : uint32_t _size_address;
    3030
    3131    //-----[ methods ]-----------------------------------------------------------
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Victim/Victim_Pseudo_LRU/src/Parameters.cpp

    r88 r137  
    1919//                        uint32_t nb_update ,
    2020                          uint32_t size_table,
    21                           bool     table_global):
    22     _nb_entity  (nb_entity ),
    23     _nb_access  (nb_access ),
    24 //     _nb_update  (nb_update ),
    25     _size_table ((table_global == true)?1:size_table),
    26     _table_global (table_global),
    27     _size_address (size_table)
     21                          bool     table_global)
    2822  {
     23    _nb_entity    = nb_entity;
     24    _nb_access    = nb_access;
     25//  _nb_update    = nb_update;
     26    _size_table   = (table_global == true)?1:size_table;
     27    _table_global = table_global;
     28
     29    _size_address = size_table;
     30
    2931    test();
    3032  };
Note: See TracChangeset for help on using the changeset viewer.