scoreboard.c
bool scoreboard_checkExitConditions(stScoreboardCPU* a_pThis, command_row_t a_cmd) {
	size_t i = 0;
	if ((a_cmd.opcode == OPCODE_HALT) || (a_pThis->PC == (MEMORY_SIZE - 1))) { /* If we got the HALT opcode or read all the memory */
		for (i=0; i<NUM_OF_REGISTERS; ++i) {
			if (a_pThis->registerResultStatus[i] != NULL) { /* Check for active FUs */
				return false;
			}
		}
		return true; /* Means that no FU's are active (all are done) */
	} else {
		return false;
	}
}
/************************************************************************/
/*	Private functions declaration					*/
/************************************************************************/
/* This function checks if the simulation ended and return true if so, otherwise return false */
Private functions declaration
This function checks if the simulation ended and return true if so, otherwise return false
Private functions declaration This function checks if the simulation ended and return true if so otherwise return false
bool scoreboard_checkExitConditions(stScoreboardCPU* a_pThis, command_row_t a_cmd) {
	size_t i = 0;
	if ((a_cmd.opcode == OPCODE_HALT) || (a_pThis->PC == (MEMORY_SIZE - 1))) { 
		for (i=0; i<NUM_OF_REGISTERS; ++i) {
			if (a_pThis->registerResultStatus[i] != NULL) { 
				return false;
			}
		}
		return true; 
	} else {
		return false;
	}
}
bool scoreboard_checkExitConditions ( stScoreboardCPU * a_pThis , command_row_t a_cmd ) { size_t i = 0 ; if ( ( a_cmd . opcode == OPCODE_HALT ) || ( a_pThis -> PC == ( MEMORY_SIZE - 1 ) ) ) { for ( i = 0 ; i < NUM_OF_REGISTERS ; ++ i ) { if ( a_pThis -> registerResultStatus [ i ] != NULL ) { return false ; } } return true ; } else { return false ; } }
Private functions declaration
This function checks if the simulation ended and return true if so, otherwise return false
Private functions declaration This function checks if the simulation ended and return true if so otherwise return false
/* If we got the HALT opcode or read all the memory */ /* Check for active FUs */ /* Means that no FU's are active (all are done) */