logo

Crowdly

Browser

Додати до Chrome

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

Шукаєте відповіді та рішення тестів для CA & OS (Computer Architecture) - EFREI - Fall 2026? Перегляньте нашу велику колекцію перевірених відповідей для CA & OS (Computer Architecture) - EFREI - Fall 2026 в moodle.lab.ii.agh.edu.pl.

Отримайте миттєвий доступ до точних відповідей та детальних пояснень для питань вашого курсу. Наша платформа, створена спільнотою, допомагає студентам досягати успіху!

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:

Переглянути це питання

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

Переглянути це питання
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.

❌
❌
❌
✅
❌
Переглянути це питання

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?

Переглянути це питання
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.

Переглянути це питання

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 .

Переглянути це питання

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 ?

Переглянути це питання

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

Переглянути це питання

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)

Переглянути це питання

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

Переглянути це питання

Хочете миттєвий доступ до всіх перевірених відповідей на moodle.lab.ii.agh.edu.pl?

Отримайте необмежений доступ до відповідей на екзаменаційні питання - встановіть розширення Crowdly зараз!

Browser

Додати до Chrome