Ignore:
Timestamp:
May 25, 2009, 7:40:26 PM (15 years ago)
Author:
rosiere
Message:

1) Prediction unit : static prediction not blocking

Location:
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Ifetch_unit/Ifetch_queue/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Ifetch_unit/Ifetch_queue/src/Ifetch_queue_genMoore.cpp

    r88 r119  
    2626    // =====[ ADDRESS ]==========================================
    2727    // ==========================================================
    28     internal_ADDRESS_ACK = (_queue[reg_PTR_WRITE]->_state == IFETCH_QUEUE_STATE_EMPTY);
    29 
    30     PORT_WRITE(out_ADDRESS_ACK            , internal_ADDRESS_ACK);
    31     if (_param->_have_port_ifetch_queue_ptr)
    32     PORT_WRITE(out_ADDRESS_IFETCH_QUEUE_ID, reg_PTR_WRITE);
     28    {
     29      internal_ADDRESS_ACK = (_queue[reg_PTR_WRITE]->_state == IFETCH_QUEUE_STATE_EMPTY);
     30     
     31      PORT_WRITE(out_ADDRESS_ACK            , internal_ADDRESS_ACK);
     32      if (_param->_have_port_ifetch_queue_ptr)
     33      PORT_WRITE(out_ADDRESS_IFETCH_QUEUE_ID, reg_PTR_WRITE);
     34    }
    3335
    3436    // ==========================================================
    3537    // =====[ DECOD ]============================================
    3638    // ==========================================================
    37     bool ack = (_queue[reg_PTR_READ]->_state == IFETCH_QUEUE_STATE_HAVE_RSP);
    38 
    39     for (uint32_t i=0; i<_param->_nb_instruction; i++)
    40       {
    41         internal_DECOD_VAL [i] = ack and _queue[reg_PTR_READ]->_instruction_enable [i];
    42         PORT_WRITE(out_DECOD_VAL         [i], internal_DECOD_VAL [i]);
    43         PORT_WRITE(out_DECOD_INSTRUCTION [i],         _queue[reg_PTR_READ]->_instruction        [i]);
    44       }
    45 
    46     PORT_WRITE(out_DECOD_ADDRESS                    , _queue[reg_PTR_READ]->_address                    );
    47     if (_param->_have_port_inst_ifetch_ptr)
    48     PORT_WRITE(out_DECOD_INST_IFETCH_PTR            , _queue[reg_PTR_READ]->_inst_ifetch_ptr            );
    49     PORT_WRITE(out_DECOD_BRANCH_STATE               , _queue[reg_PTR_READ]->_branch_state               );
    50     if (_param->_have_port_depth)
    51     PORT_WRITE(out_DECOD_BRANCH_UPDATE_PREDICTION_ID, _queue[reg_PTR_READ]->_branch_update_prediction_id);
    52     PORT_WRITE(out_DECOD_EXCEPTION                  , _queue[reg_PTR_READ]->_exception                  );
     39    {
     40      bool ack = (_queue[reg_PTR_READ]->_state == IFETCH_QUEUE_STATE_HAVE_RSP);
     41     
     42      for (uint32_t i=0; i<_param->_nb_instruction; i++)
     43        {
     44          internal_DECOD_VAL [i] = ack and _queue[reg_PTR_READ]->_instruction_enable [i];
     45          PORT_WRITE(out_DECOD_VAL         [i], internal_DECOD_VAL [i]);
     46          PORT_WRITE(out_DECOD_INSTRUCTION [i],         _queue[reg_PTR_READ]->_instruction        [i]);
     47        }
     48     
     49      PORT_WRITE(out_DECOD_ADDRESS                    , _queue[reg_PTR_READ]->_address                    );
     50      if (_param->_have_port_inst_ifetch_ptr)
     51      PORT_WRITE(out_DECOD_INST_IFETCH_PTR            , _queue[reg_PTR_READ]->_inst_ifetch_ptr            );
     52      PORT_WRITE(out_DECOD_BRANCH_STATE               , _queue[reg_PTR_READ]->_branch_state               );
     53      if (_param->_have_port_depth)
     54      PORT_WRITE(out_DECOD_BRANCH_UPDATE_PREDICTION_ID, _queue[reg_PTR_READ]->_branch_update_prediction_id);
     55      PORT_WRITE(out_DECOD_EXCEPTION                  , _queue[reg_PTR_READ]->_exception                  );
     56    }
    5357
    5458    log_printf(FUNC,Ifetch_queue,FUNCTION,"End");
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Ifetch_unit/Ifetch_queue/src/Ifetch_queue_transition.cpp

    r101 r119  
    2323  {
    2424    log_begin(Ifetch_queue,FUNCTION);
     25    log_function(Ifetch_queue,FUNCTION,_name.c_str());
    2526
    2627    if (PORT_READ(in_NRESET) == 0)
     
    3940        if (PORT_READ(in_ADDRESS_VAL) and internal_ADDRESS_ACK)
    4041          {
     42            log_printf(TRACE,Ifetch_queue,FUNCTION,"  * ADDRESS : Transaction");
     43            log_printf(TRACE,Ifetch_queue,FUNCTION,"    * reg_PTR_WRITE : %d",reg_PTR_WRITE);
     44            log_printf(TRACE,Ifetch_queue,FUNCTION,"    * ADDRESS       : 0x%x",PORT_READ(in_ADDRESS_INSTRUCTION_ADDRESS));
     45
    4146            // New slot in ifetch_queue is allocated
    4247           
     
    7580            if (internal_DECOD_VAL [i] and PORT_READ(in_DECOD_ACK[i]))
    7681              {
     82                log_printf(TRACE,Ifetch_queue,FUNCTION,"  * DECOD [%d] : Transaction",i);
     83
    7784                have_instruction_decod = true;
    7885                _queue[reg_PTR_READ]->_instruction_enable [i] = false;
     
    94101        if (PORT_READ(in_ICACHE_RSP_VAL) and internal_ICACHE_RSP_ACK)
    95102          {
     103            log_printf(TRACE,Ifetch_queue,FUNCTION,"  * ICACHE_RSP : Transaction");
     104
    96105            Tpacket_t ptr = (_param->_have_port_ifetch_queue_ptr)?PORT_READ(in_ICACHE_RSP_PACKET_ID):0;
    97106           
     
    119128        if (PORT_READ(in_EVENT_RESET_VAL) and internal_EVENT_RESET_ACK)
    120129          {
     130            log_printf(TRACE,Ifetch_queue,FUNCTION,"  * EVENT_RESET : Transaction");
     131
    121132            // Scan all entry of queue and test the status
    122133            for (uint32_t i=0; i<_param->_size_queue; i++)
Note: See TracChangeset for help on using the changeset viewer.