Ignore:
Timestamp:
Jan 16, 2009, 5:55:32 PM (15 years ago)
Author:
moulu
Message:

1) write queue vhdl
2) bug fix : in generic queue

Location:
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Queue
Files:
3 edited

Legend:

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

    r101 r103  
    7575
    7676    // ~~~~~[ Interface "slot" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    77   public    : SC_OUT(Tcontrol_t)           ** out_SLOT_VAL ;
    78   public    : SC_OUT(Tdata_t   )           ** out_SLOT_DATA;
     77  public    : SC_OUT(Tcontrol_t)           ** out_SLOT_VAL ; //[nb_port_slot]
     78  public    : SC_OUT(Tdata_t   )           ** out_SLOT_DATA; //[nb_port_slot]
    7979
    8080    // ~~~~~[ Interface "ptr" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Queue/src/Queue_vhdl_body.cpp

    r101 r103  
    4646            else
    4747              vhdl->set_body   (0,"signal_SLOT_"+toString(i)+"           <= const_PTR_INIT when signal_SLOT_"+toString(i-1)+" = const_PTR_MAX else signal_SLOT_"+toString(i-1)+"+'1';");
     48
    4849          }
    4950       
     
    5152      {
    5253        if (_param->_nb_port_slot > 1)
    53           vhdl->set_body   (0,"out_SLOT_"+toString(i)+"_VAL        <= '1' when reg_NB_ELT > "+std_logic_cst(log2(_param->_size_queue+1),i)+" else '0';");
    54         else
    55           vhdl->set_body   (0,"out_SLOT_"+toString(i)+"_VAL        <= not signal_EMPTY;");
    56        
     54          vhdl->set_body   (0,"signal_SLOT_"+toString(i)+"_VAL     <= '1' when reg_NB_ELT > "+std_logic_cst(log2(_param->_size_queue+1),i)+" else '0';");
     55        else
     56          vhdl->set_body   (0,"signal_SLOT_"+toString(i)+"_VAL     <= not signal_EMPTY;");
     57       
     58        vhdl->set_body   (0,"out_SLOT_"+toString(i)+"_VAL        <= signal_SLOT_"+toString(i)+"_VAL;");
     59       
     60#ifdef SYSTEMC_VHDL_COMPATIBILITY
     61        std::string str_val_disable=std_logic_cst(_param->_size_data,0)+" when signal_SLOT_"+toString(i)+"_VAL='0' else";
     62#endif
    5763        if (_param->_nb_port_slot > 1)
    58           vhdl->set_body   (0,"out_SLOT_"+toString(i)+"_DATA       <= reg_DATA(conv_integer(signal_SLOT_"+toString(i)+"));");
     64          {
     65            vhdl->set_body   (0,"out_SLOT_"+toString(i)+"_DATA       <= ");
     66#ifdef SYSTEMC_VHDL_COMPATIBILITY
     67            vhdl->set_body   (1,str_val_disable);
     68#endif
     69            vhdl->set_body   (1,"reg_DATA(conv_integer(signal_SLOT_"+toString(i)+"));");
     70          }
    5971        else
    6072          if (_param->_size_queue > 1)
    61             vhdl->set_body   (0,"out_SLOT_"+toString(i)+"_DATA       <= reg_DATA(conv_integer(signal_PTR_READ));");
     73            {
     74              vhdl->set_body   (0,"out_SLOT_"+toString(i)+"_DATA       <=");
     75#ifdef SYSTEMC_VHDL_COMPATIBILITY
     76              vhdl->set_body   (1,str_val_disable);
     77#endif
     78              vhdl->set_body   (1,"reg_DATA(conv_integer(signal_PTR_READ));");
     79            }
    6280          else
    63             vhdl->set_body   (0,"out_SLOT_"+toString(i)+"_DATA       <= reg_DATA(conv_integer(0));");
     81            {
     82              vhdl->set_body   (0,"out_SLOT_"+toString(i)+"_DATA       <=");
     83#ifdef SYSTEMC_VHDL_COMPATIBILITY
     84              vhdl->set_body   (1,str_val_disable);
     85#endif
     86              vhdl->set_body   (1,"reg_DATA(conv_integer(0));");
     87            }
    6488      }
    6589
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Queue/src/Queue_vhdl_declaration.cpp

    r100 r103  
    3838      }
    3939
     40    if (_param->_nb_port_slot>0)
     41    for (uint32_t i=0; i<_param->_nb_port_slot; ++i)
     42    vhdl->set_signal  ("signal_SLOT_"+toString(i)+"_VAL", 1);
     43
    4044    if (_param->_nb_port_slot>1)
    4145      {
Note: See TracChangeset for help on using the changeset viewer.