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/Select/Select_Priority_Fixed
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • 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      }
Note: See TracChangeset for help on using the changeset viewer.