logo

Crowdly

Browser

Add to Chrome

CA & OS (Computer Architecture) - EFREI - Fall 2026

Looking for CA & OS (Computer Architecture) - EFREI - Fall 2026 test answers and solutions? Browse our comprehensive collection of verified answers for CA & OS (Computer Architecture) - EFREI - Fall 2026 at moodle.lab.ii.agh.edu.pl.

Get instant access to accurate answers and detailed explanations for your course questions. Our community-driven platform helps students succeed!

Analyze the program and try to evaluate the value of the res if the execution of the instruction that causes WAW stall was proceeded without waiting for the execution of the previous instruction to complete.

Calculated “wrong” res value:

View this question

Explain why the execution of the instruction indicated in the answer to the previous question had to be suspended.

View this question
W-A-W hazard

This type of hazard may occur when two adjacent instructions (i) and (j) save the result of their execution to the same resource (register, memory cell) and the time of the execution of the earlier instruction (i) is longer than the time of the execution instruction (j). It may cause an erroneous result of executing this sequence of instructions to be written into the resource. The typical way to remove such a dependency is to delay the completion of the execution instruction (j) until the execution of the instruction (i) is completed. 

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

;WinMIPS64 WAW hazard example

    .data

A:    .double 15.0

B:    .double 5.0

C:    .double 4.4

D:    .double 1.0

E:    .double 3.14.0

res:    .double 0.0

    

    .text

main:    l.d f2,A(r0)

    l.d f3,B(r0)

    l.d f4,C(r0)

    l.d f5,D(r0)

    l.d f6,E(r0)

    nop

    mul.d f6,f2,f4

    sub.d f6,f2,f3

    add.d f3,f6,f4

    s.d f3,res(r0)

    halt

Very important note! : Before you execute this program, be sure that the data forwarding mechanism is disabled.  If  data forwarding is enabled the MIPS hardware cannot detect, signal and prevent WAW hazard. 

Execute the example program. Analyze the clock cycle diagram and find the instruction that causes  WAW stall.

Mark the instruction that caused the WAW hazard.

❌
❌
❌
✅
❌
View this question

After the program has finished executing, check what value was assigned to the res variable. (Value of the res may be found in Data window of MIPS simulator).

What is the value stored in res variable at the end of the program execution?

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 menu “Configure” set the option “Enable forwarding”)

Execute the example program.

View this question

Analysez le diagramme du cycle d'horloge et identifiez les instructions provoquant   un blocage RAW (RAW). 

Pour chaque instruction, déterminez et notez la dépendance à l'origine de la suspension de son exécution .

View this question

Exécutez le programme d'exemple RAW dans le simulateur WinMIPS.

Important ! Avant d'exécuter le programme dans le simulateur WinMIPS64, désactivez le mécanisme de transfert de données (dans le menu « Configurer », désactivez l'option « Activer le transfert »).

Combien de cycles d'horloge ont été nécessaires pour l'exécution du programme pipeliné de l'exemple RAW ?

View this question

Quelle est la valeur CPI pour l'exécution séquentielle d'un programme ( CPIseq ) ?

View this question

Quelle est la valeur CPI ( CPIpip ) pour l'exécution en pipeline du programme d'exemple RAW ?

(Ce chiffre peut être calculé manuellement ou obtenu à partir de la fenêtre de statistiques du simulateur WinMIPS64)

View this question

Combien d'instructions ont été exécutées ?

View this question

Want instant access to all verified answers on moodle.lab.ii.agh.edu.pl?

Get Unlimited Answers To Exam Questions - Install Crowdly Extension Now!

Browser

Add to Chrome