logo

Crowdly

Browser

Add to Chrome

Questions Bank (1470465 total)

Risque de guerre

Ce type d'aléa peut survenir lorsque l'instruction suivante (j) stocke le résultat de son exécution dans la ressource (registre ou emplacement mémoire) utilisée comme argument par l'instruction précédente (i). Le problème apparaît lorsque l'exécution de l'instruction précédente (i) est retardée et que l'instruction suivante (j) se termine avant que l'instruction précédente (i) puisse recevoir son argument. Cela peut entraîner un résultat erroné pour l'instruction (i). La méthode classique pour supprimer cette dépendance consiste à retarder l'exécution de l'instruction (j) jusqu'à la fin de l'exécution de l'instruction (i). 

Pour illustrer ce problème, le code suivant sera utilisé :

;WinMIPS64 WAR hazard example

    .data

A:    .double 10.0

B:    .double 5.0

C:    .double 3.5

D:    .double 1.0

E:    .double 3.14.0

res:    .double 0.0

    

    .text

main:    

    LDC1 f2,A(r0)

    LDC1 f3,B(r0)

    LDC1 f4,C(r0)

    LDC1 f5,D(r0)

    LDC1 f6,E(r0)

    

    add.d f2,f2,f3

    sub.d f2,f2,f4

    mul.d f4,f5,f6

    

    SDC1 f2,res(r0)

    syscall 0

Activez le mécanisme de transfert de données et exécutez le programme d'exemple.

Analysez le diagramme du cycle d'horloge et identifiez l'instruction provoquant le blocage WAR .  

Marquez l'instruction qui provoque le blocage de WAR.

0%
0%
0%
0%
100%
View this question
Risque de guerre

This type of hazard may occur when the latter instruction (j) stores the result of its execution in the resource (register or memory location) that earlier instruction (i) uses as their argument. The problem appears when the execution of earlier instruction (i) is delayed, and the latter instruction (j) is finished before earlier instruction (i) can take its argument. It may lead to a  wrong result of the execution instruction (i). The typical way to remove such a dependency is to delay the completion of the execution instruction (j) until the execution of instruction (i) is completed. 

To illustrate this problem, the following code will be used:

;WinMIPS64 WAR hazard example

    .data

A:    .double 10.0

B:    .double 5.0

C:    .double 3.5

D:    .double 1.0

E:    .double 3.14.0

res:    .double 0.0

    

    .text

main:    

    LDC1 f2,A(r0)

    LDC1 f3,B(r0)

    LDC1 f4,C(r0)

    LDC1 f5,D(r0)

    LDC1 f6,E(r0)

    

    add.d f2,f2,f3

    sub.d f2,f2,f4

    mul.d f4,f5,f6

    

    SDC1 f2,res(r0)

    syscall 0

Enable data forwarding mechanism and execute the example program.

Analyze the clock cycle diagram and find the instruction that causes WAR stall.  

Mark the instruction that causes WAR stall.

0%
0%
0%
0%
100%
View this question
Визначити і підкреслити, яким буде результат логічного додавання, якщо його аргументами є 7 молодших біти двійкового еквіваленту десяткового числа 201
❌
❌
❌
❌
❌
❌
❌
❌
❌
✅
❌
❌
❌
❌
❌
❌
❌
View this question

Calculate the speedup in relation to the pipelined execution of the program with the DF mechanism disabled.

speedupDF = CPIpip / CPIpipDF

CPIpip value should be taken from Question 30.

What is the speedup value?

View this question
Data Forwarding

A data forwarding (or operand forwarding) mechanism is one of the method to reduce the impact of raw hazards on the pipeline instruction execution. It relies on the existence of additional data paths that allow the results of the instruction execution to be used earlier than after the execution is fully completed. To see how it works, we will use again the example program used for R-A-W hazard investigation.

Before you execute the program in WinMIPS64 simulator, enable the data forwarding mechanism (in Settins  enable the option “CPU forwarding”)

Execute the example program.

View this question

What is the CPI value for pipelined program execution with DF enabled (CPIpipDF)?

View this question
Якими методами встановлюють масову частку білків, жирів, вуглеводів, мінеральних речовин, води?
0%
0%
0%
100%
View this question
Якими методами визначається ступінь забруднення харчових продуктів?
0%
100%
0%
0%
View this question

Mi a feladata a posztprocesszálásnak?

100%
0%
0%
0%
0%
0%
0%
100%
View this question
Цукроза, лактоза, мальтоза, трегалоза – це:
100%
0%
0%
0%
View this question