src/node_stage.c
void check_if_mem_blocked() {
  /* if we are stalled due to lack of MSHRs to the L1, check to see if there is
   * space now. */
  if(node->mem_blocked &&
     mem_can_allocate_req_buffer(node->proc_id, MRT_DFETCH, FALSE)) {
    node->mem_blocked = FALSE;
    STAT_EVENT(node->proc_id,
               MEM_BLOCK_LENGTH_0 + MIN2(node->mem_block_length, 5000) / 100);
    if(DIE_ON_MEM_BLOCK_THRESH) {
      if(node->proc_id == DIE_ON_MEM_BLOCK_CORE) {
        ASSERTM(node->proc_id, node->mem_block_length < DIE_ON_MEM_BLOCK_THRESH,
                "Core blocked on memory for %u cycles (%llu--%llu)\n",
                node->mem_block_length, cycle_count - node->mem_block_length,
                cycle_count);
      }
    }
    node->mem_block_length = 0;
  }
  INC_STAT_EVENT(node->proc_id, CORE_MEM_BLOCKED, node->mem_blocked);
  node->mem_block_length += node->mem_blocked;
}
/**************************************************************************************/
/* check_if_mem_blocked: Memory is blocked when there are no more MSHRs in the
 * L1 Q (i.e., there is no way to handle a D-Cache miss). This function checks
 * to see if any of the L1 MSHRs have become available.*/
Memory is blocked when there are no more MSHRs in the
L1 Q . This function checks
to see if any of the L1 MSHRs have become available.
Memory is blocked when there are no more MSHRs in the L1 Q . This function checks to see if any of the L1 MSHRs have become available .
void check_if_mem_blocked() {
  if(node->mem_blocked &&
     mem_can_allocate_req_buffer(node->proc_id, MRT_DFETCH, FALSE)) {
    node->mem_blocked = FALSE;
    STAT_EVENT(node->proc_id,
               MEM_BLOCK_LENGTH_0 + MIN2(node->mem_block_length, 5000) / 100);
    if(DIE_ON_MEM_BLOCK_THRESH) {
      if(node->proc_id == DIE_ON_MEM_BLOCK_CORE) {
        ASSERTM(node->proc_id, node->mem_block_length < DIE_ON_MEM_BLOCK_THRESH,
                "Core blocked on memory for %u cycles (%llu--%llu)\n",
                node->mem_block_length, cycle_count - node->mem_block_length,
                cycle_count);
      }
    }
    node->mem_block_length = 0;
  }
  INC_STAT_EVENT(node->proc_id, CORE_MEM_BLOCKED, node->mem_blocked);
  node->mem_block_length += node->mem_blocked;
}
void check_if_mem_blocked ( ) { if ( node -> mem_blocked && mem_can_allocate_req_buffer ( node -> proc_id , MRT_DFETCH , FALSE ) ) { node -> mem_blocked = FALSE ; STAT_EVENT ( node -> proc_id , MEM_BLOCK_LENGTH_0 + MIN2 ( node -> mem_block_length , 5000 ) / 100 ) ; if ( DIE_ON_MEM_BLOCK_THRESH ) { if ( node -> proc_id == DIE_ON_MEM_BLOCK_CORE ) { ASSERTM ( node -> proc_id , node -> mem_block_length < DIE_ON_MEM_BLOCK_THRESH , " \n " , node -> mem_block_length , cycle_count - node -> mem_block_length , cycle_count ) ; } } node -> mem_block_length = 0 ; } INC_STAT_EVENT ( node -> proc_id , CORE_MEM_BLOCKED , node -> mem_blocked ) ; node -> mem_block_length += node -> mem_blocked ; }
check_if_mem_blocked: Memory is blocked when there are no more MSHRs in the
 L1 Q (i.e., there is no way to handle a D-Cache miss).
check_if_mem_blocked : Memory is blocked when there are no more MSHRs in the L1 Q ( i . e . there is no way to handle a D - Cache miss ) .
/* if we are stalled due to lack of MSHRs to the L1, check to see if there is
   * space now. */