Ignore:
Timestamp:
Jul 5, 2007, 5:50:19 PM (17 years ago)
Author:
rosiere
Message:

Modification des classes d'encapsulation des interfaces :

  • gère les signaux à écrire dans le vhdl
  • les traces pour le testbench
  • la génération des vhdl structurelles

-> test sur la Pattern History Table

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Shifter/src/Shifter_vhdl_declaration.cpp

    r2 r42  
    1515
    1616
    17   void Shifter::vhdl_declaration (Vhdl & vhdl)
     17  void Shifter::vhdl_declaration (Vhdl * & vhdl)
    1818  {
    1919    uint32_t log2_size_data = static_cast<uint32_t>(ceil(log2(_param._size_data)));
    2020
    21     vhdl.set_constant("cst_is_direction_left  ",1,_left      );
    22     vhdl.set_constant("cst_is_direction_right ",1,_right     );
    23     vhdl.set_constant("cst_is_type_shift      ",1,_shift     );
    24     vhdl.set_constant("cst_is_type_rotate     ",1,_rotate    );
    25     vhdl.set_constant("cst_is_carry_arithmetic",1,_arithmetic);
    26     vhdl.set_constant("cst_is_carry_logic     ",1,_logic     );
    27     vhdl.set_constant("cst_completion         ",_param._size_data,"(others => '1')");
     21    vhdl->set_constant("cst_is_direction_left  ",1,_left      );
     22    vhdl->set_constant("cst_is_direction_right ",1,_right     );
     23    vhdl->set_constant("cst_is_type_shift      ",1,_shift     );
     24    vhdl->set_constant("cst_is_type_rotate     ",1,_rotate    );
     25    vhdl->set_constant("cst_is_carry_arithmetic",1,_arithmetic);
     26    vhdl->set_constant("cst_is_carry_logic     ",1,_logic     );
     27    vhdl->set_constant("cst_completion         ",_param._size_data,"(others => '1')");
    2828   
    2929    for (uint32_t i=0; i<_param._nb_port; i++)
    3030      {
    3131        if (_param._shift_value != 0)
    32           vhdl.set_constant("shift_"+toString(i),log2_size_data, _param._shift_value);
     32          vhdl->set_constant("shift_"+toString(i),log2_size_data, _param._shift_value);
    3333        else
    34           vhdl.set_alias   ("shift_"+toString(i),std_logic(log2_size_data), "in_SHIFTER_SHIFT_"+toString(i),std_logic_range(log2_size_data));
     34          vhdl->set_alias   ("shift_"+toString(i),std_logic(log2_size_data), "in_SHIFTER_"+toString(i)+"_SHIFT",std_logic_range(log2_size_data));
    3535       
    3636        if (_param._size_data_completion > 0)
    3737          {
    38             vhdl.set_signal ("shifter_completion_left_"+toString(i)+" ",_param._size_data);
    39             vhdl.set_signal ("shifter_completion_right_"+toString(i)+"",_param._size_data);
    40             vhdl.set_signal ("mask_completion_left_"+toString(i)+"    ",_param._size_data);
    41             vhdl.set_signal ("mask_completion_right_"+toString(i)+"   ",_param._size_data);
     38            vhdl->set_signal ("shifter_completion_left_"+toString(i)+" ",_param._size_data);
     39            vhdl->set_signal ("shifter_completion_right_"+toString(i)+"",_param._size_data);
     40            vhdl->set_signal ("mask_completion_left_"+toString(i)+"    ",_param._size_data);
     41            vhdl->set_signal ("mask_completion_right_"+toString(i)+"   ",_param._size_data);
    4242          }
    4343       
    4444        //-----[ Shift logic Left ]--------------------------------------------
    4545        if (_param._have_shift_logic_left)
    46           vhdl.set_signal ("shift_logic_left_"+toString(i)+"      ",_param._size_data);
     46          vhdl->set_signal ("shift_logic_left_"+toString(i)+"      ",_param._size_data);
    4747       
    4848        //-----[ Shift logic Right ]-------------------------------------------
    4949        if (_param._have_shift_logic_right)
    50           vhdl.set_signal ("shift_logic_right_"+toString(i)+"     ",_param._size_data);
     50          vhdl->set_signal ("shift_logic_right_"+toString(i)+"     ",_param._size_data);
    5151       
    5252        //-----[ Shift arithmetic Left ]---------------------------------------
    5353        if (_param._have_shift_arithmetic_left)
    54           vhdl.set_signal ("shift_arithmetic_left_"+toString(i)+" ",_param._size_data);
     54          vhdl->set_signal ("shift_arithmetic_left_"+toString(i)+" ",_param._size_data);
    5555       
    5656        //-----[ Shift arithmetic Right ]--------------------------------------
    5757        if (_param._have_shift_arithmetic_right)
    58           vhdl.set_signal ("shift_arithmetic_right_"+toString(i)+"",_param._size_data);
     58          vhdl->set_signal ("shift_arithmetic_right_"+toString(i)+"",_param._size_data);
    5959       
    6060        //-----[ Rotate Left ]-------------------------------------------------
    6161        if (_param._have_rotate_left)
    62           vhdl.set_signal ("rotate_left_"+toString(i)+"           ",_param._size_data);
     62          vhdl->set_signal ("rotate_left_"+toString(i)+"           ",_param._size_data);
    6363       
    6464        //-----[ Rotate Right ]------------------------------------------------
    6565        if (_param._have_rotate_right)
    66           vhdl.set_signal ("rotate_right_"+toString(i)+"          ",_param._size_data);
     66          vhdl->set_signal ("rotate_right_"+toString(i)+"          ",_param._size_data);
    6767      }
    6868  };
Note: See TracChangeset for help on using the changeset viewer.