Changeset 70


Ignore:
Timestamp:
Dec 19, 2007, 7:08:24 PM (16 years ago)
Author:
rosiere
Message:

Petit bug entre sur le vhdl et la compatibilite systemC/vhdl

Location:
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Read_unit/Read_unit/Reservation_station
Files:
5 added
1 deleted
3 edited
1 moved

Legend:

Unmodified
Added
Removed
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Read_unit/Read_unit/Reservation_station/src/Reservation_station_genMoore.cpp

    r69 r70  
    3939    // ~~~~~[ Interface "retire" ]~~~~~~~~~~~~~~~~~~~~~~~
    4040
    41     uint32_t nb_slot_find = 0;
    42     for (uint32_t i=0; (
    43 #ifdef  SYSTEMC_VHDL_COMPATIBILITY
    44                         (i<_param->_size_queue)
    45 #else
    46                         (i<_queue_control->nb_elt())
    47 #endif
    48                         and (nb_slot_find < _param->_nb_inst_retire)
    49 
    50                         )
    51                         ; i++)
    52       {
    53         uint32_t index;
    54 #ifdef  SYSTEMC_VHDL_COMPATIBILITY
    55         index = i;
    56 #else
    57         index = (*_queue_control)[i];
    58 #endif
    59         bool     val   =
    60           (
    61 #ifdef  SYSTEMC_VHDL_COMPATIBILITY
    62            _queue_valid [i]           and
    63 #endif
    64            _queue[index]._data_ra_val and
    65            _queue[index]._data_rb_val and
    66            _queue[index]._data_rc_val);
    67 
    68         if (val == true)
    69           {
    70             internal_RETIRE_SLOT [nb_slot_find] = i;
    71             nb_slot_find ++;
    72           }
    73       }
     41    uint32_t index_queue=0;
     42    const uint32_t nb_slot_scan = _param->_size_queue-_param->_nb_inst_retire+1;
    7443
    7544    for (uint32_t i=0; i<_param->_nb_inst_retire; i++)
    7645      {
    77         bool val                = i<nb_slot_find;
     46        bool     val        = false;
     47        uint32_t index_find = 0;;
     48
     49        for (; (
     50#ifndef  SYSTEMC_VHDL_COMPATIBILITY
     51                (index_queue<_queue_control->nb_elt()) and
     52#endif
     53                (index_queue>=i) and
     54                (index_queue<nb_slot_scan+i) and
     55                (val==false));
     56             index_queue++)
     57          {
     58#ifdef  SYSTEMC_VHDL_COMPATIBILITY
     59            index_find = index_queue;
     60#else
     61            index_find = (*_queue_control)[index_queue];
     62#endif
     63            internal_RETIRE_SLOT [i] = index_queue;
     64
     65            val   =
     66              (
     67#ifdef  SYSTEMC_VHDL_COMPATIBILITY
     68               _queue_valid [index_queue]      and
     69#endif
     70               _queue[index_find]._data_ra_val and
     71               _queue[index_find]._data_rb_val and
     72               _queue[index_find]._data_rc_val
     73               );
     74
     75//          cout << "========== Moore : " << endl
     76//               << " * i           : " << i << endl
     77//               << " * val         : " << val << endl
     78//               << " * index_queue : " << index_queue << endl
     79//               << " * index_find  : " << index_find << endl;
     80          }
     81
    7882        internal_RETIRE_VAL [i] = val;
    79 
    8083        PORT_WRITE(out_RETIRE_VAL [i], val);
    8184
    8285        if (val)
    8386          {
    84             uint32_t index;
    85 #ifdef  SYSTEMC_VHDL_COMPATIBILITY
    86             index = internal_RETIRE_SLOT [i];
    87 #else
    88             index = (*_queue_control)[internal_RETIRE_SLOT [i]];
    89 #endif
     87
     88// #ifdef  SYSTEMC_VHDL_COMPATIBILITY
     89//          index_find = internal_RETIRE_SLOT [i];
     90// #else
     91//          index_find = (*_queue_control)[internal_RETIRE_SLOT [i]];
     92// #endif
    9093            if (_param->_have_port_context_id)
    91             PORT_WRITE(out_RETIRE_CONTEXT_ID    [i],_queue[index]._context_id);
     94            PORT_WRITE(out_RETIRE_CONTEXT_ID    [i],_queue[index_find]._context_id);
    9295            if (_param->_have_port_front_end_id)
    93             PORT_WRITE(out_RETIRE_FRONT_END_ID  [i],_queue[index]._front_end_id);
     96            PORT_WRITE(out_RETIRE_FRONT_END_ID  [i],_queue[index_find]._front_end_id);
    9497            if (_param->_have_port_ooo_engine_id)
    95             PORT_WRITE(out_RETIRE_OOO_ENGINE_ID [i],_queue[index]._ooo_engine_id);
     98            PORT_WRITE(out_RETIRE_OOO_ENGINE_ID [i],_queue[index_find]._ooo_engine_id);
    9699            if (_param->_have_port_rob_id)
    97             PORT_WRITE(out_RETIRE_ROB_ID        [i],_queue[index]._rob_id);
    98             PORT_WRITE(out_RETIRE_OPERATION     [i],_queue[index]._operation);
    99             PORT_WRITE(out_RETIRE_TYPE          [i],_queue[index]._type);
    100             PORT_WRITE(out_RETIRE_HAS_IMMEDIAT  [i],_queue[index]._has_immediat);
    101             PORT_WRITE(out_RETIRE_IMMEDIAT      [i],_queue[index]._immediat);
    102             PORT_WRITE(out_RETIRE_DATA_RA       [i],_queue[index]._data_ra);
    103             PORT_WRITE(out_RETIRE_DATA_RB       [i],_queue[index]._data_rb);
    104             PORT_WRITE(out_RETIRE_DATA_RC       [i],_queue[index]._data_rc);
    105             PORT_WRITE(out_RETIRE_WRITE_RD      [i],_queue[index]._write_rd);
    106             PORT_WRITE(out_RETIRE_NUM_REG_RD    [i],_queue[index]._num_reg_rd);
    107             PORT_WRITE(out_RETIRE_WRITE_RE      [i],_queue[index]._write_re);
    108             PORT_WRITE(out_RETIRE_NUM_REG_RE    [i],_queue[index]._num_reg_re);
     100            PORT_WRITE(out_RETIRE_ROB_ID        [i],_queue[index_find]._rob_id);
     101            PORT_WRITE(out_RETIRE_OPERATION     [i],_queue[index_find]._operation);
     102            PORT_WRITE(out_RETIRE_TYPE          [i],_queue[index_find]._type);
     103            PORT_WRITE(out_RETIRE_HAS_IMMEDIAT  [i],_queue[index_find]._has_immediat);
     104            PORT_WRITE(out_RETIRE_IMMEDIAT      [i],_queue[index_find]._immediat);
     105            PORT_WRITE(out_RETIRE_DATA_RA       [i],_queue[index_find]._data_ra);
     106            PORT_WRITE(out_RETIRE_DATA_RB       [i],_queue[index_find]._data_rb);
     107            PORT_WRITE(out_RETIRE_DATA_RC       [i],_queue[index_find]._data_rc);
     108            PORT_WRITE(out_RETIRE_WRITE_RD      [i],_queue[index_find]._write_rd);
     109            PORT_WRITE(out_RETIRE_NUM_REG_RD    [i],_queue[index_find]._num_reg_rd);
     110            PORT_WRITE(out_RETIRE_WRITE_RE      [i],_queue[index_find]._write_re);
     111            PORT_WRITE(out_RETIRE_NUM_REG_RE    [i],_queue[index_find]._num_reg_re);
    109112          }
    110113      }
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Read_unit/Read_unit/Reservation_station/src/Reservation_station_transition.cpp

    r69 r70  
    8989                //uint32_t index = (*_queue_control)[i];
    9090
    91                 log_printf(TRACE,Reservation_station,FUNCTION,"POP  [%d]",i);
     91                log_printf(NONE,Reservation_station,FUNCTION,"POP  [%d]",i);
    9292
    9393                uint32_t index  = internal_RETIRE_SLOT[i];
     
    9898                _queue_control->pop(index);
    9999#endif
    100                 log_printf(TRACE,Reservation_station,FUNCTION," * index         : %d",index);
    101 //              dump_queue();
     100//              cout << "========== Transition : " << endl
     101//                   << " * i           : " << i << endl
     102//                   << " * index       : " << index << endl;
     103
     104                log_printf(NONE,Reservation_station,FUNCTION," * index         : %d",index);
    102105              }
    103106          }
     107       
     108//      dump_queue();
    104109
    105110        // ***** Bypass
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Read_unit/Read_unit/Reservation_station/src/Reservation_station_vhdl_body.cpp

    r69 r70  
    6363            for (uint32_t k=0; k<i; k++)
    6464              {
    65                 vhdl->set_body ("\t\tnot (internal_RETIRE_SLOT_"+toString(k)+" = "+std_logic_conv(log2(_param->_size_queue),j)+std_logic_range(log2(_param->_size_queue))+") and");
     65                vhdl->set_body ("\t\tnot (internal_RETIRE_SLOT_"+toString(k)+std_logic_range(log2(_param->_size_queue)+1,log2(_param->_size_queue)-1,0)+" = "+std_logic_conv(log2(_param->_size_queue),j)+std_logic_range(log2(_param->_size_queue))+") and");
    6666              }
    6767            vhdl->set_body ("\t\t(reg_VAL        ("+toString(j)+")='1') and");
Note: See TracChangeset for help on using the changeset viewer.