Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

PLease explain? Consider die below pipeline hazards and classify each of them as

ID: 3542844 • Letter: P

Question

PLease explain?


Consider die below pipeline hazards and classify each of them as to if they are best described as a structural hazard, a control hazard, or a data hazard: A processor reset mechanism that halts the fetching of instructions and begins fetching instructions from address 0. Attempting to perform, at the same time, a program fetch and a data load from the same physical piece of memory capable of only supporting a single memory access at any time. Two functional units, an ALU and a multiplier, attempting to write to the same register file when the register file is capable of only supporting a single memory access at a time. Suppose you have an instruction that takes multiple cycles to complete and to write its result to the register file. Before this instruction completes, a following instruction attempts to read the result of this multi-cycle instruction.

Explanation / Answer

A . Halting of pipelined instructions happens when we encounter a branch instruction because it takes a branch so the instructions preceeding this branch prediction algorithm which might have gone wrong should need to be flushed . so its a Control Hazard.

B. Since it says we have only one port to memory i.e. we can only fetch one memory at a time . here if we had two ports to fetch we could fetch both of them but not possible due to less number of resources . so its a Structural Hazard . C . Here also same case Regisster file allows only one access at a time i.e . port (a port is basically a pipe to read its an analogy ) . so we have lesser resources which results in Structural Hazard.

D . Since it says following instruction tries to read data from previous instruction where it need to write . in pipeline writing occurs at later stage than reading it so next instruction has to wait till gets the data or else it results in wrong computation due to data dependency which results in Data Hazard . this type of data hazard is called read after write data Hazard (RAW). A . Halting of pipelined instructions happens when we encounter a branch instruction because it takes a branch so the instructions preceeding this branch prediction algorithm which might have gone wrong should need to be flushed . so its a Control Hazard.

B. Since it says we have only one port to memory i.e. we can only fetch one memory at a time . here if we had two ports to fetch we could fetch both of them but not possible due to less number of resources . so its a Structural Hazard . C . Here also same case Regisster file allows only one access at a time i.e . port (a port is basically a pipe to read its an analogy ) . so we have lesser resources which results in Structural Hazard.

D . Since it says following instruction tries to read data from previous instruction where it need to write . in pipeline writing occurs at later stage than reading it so next instruction has to wait till gets the data or else it results in wrong computation due to data dependency which results in Data Hazard . this type of data hazard is called read after write data Hazard (RAW). A . Halting of pipelined instructions happens when we encounter a branch instruction because it takes a branch so the instructions preceeding this branch prediction algorithm which might have gone wrong should need to be flushed . so its a Control Hazard.

B. Since it says we have only one port to memory i.e. we can only fetch one memory at a time . here if we had two ports to fetch we could fetch both of them but not possible due to less number of resources . so its a Structural Hazard . C . Here also same case Regisster file allows only one access at a time i.e . port (a port is basically a pipe to read its an analogy ) . so we have lesser resources which results in Structural Hazard.

D . Since it says following instruction tries to read data from previous instruction where it need to write . in pipeline writing occurs at later stage than reading it so next instruction has to wait till gets the data or else it results in wrong computation due to data dependency which results in Data Hazard . this type of data hazard is called read after write data Hazard (RAW). A . Halting of pipelined instructions happens when we encounter a branch instruction because it takes a branch so the instructions preceeding this branch prediction algorithm which might have gone wrong should need to be flushed . so its a Control Hazard.

B. Since it says we have only one port to memory i.e. we can only fetch one memory at a time . here if we had two ports to fetch we could fetch both of them but not possible due to less number of resources . so its a Structural Hazard . C . Here also same case Regisster file allows only one access at a time i.e . port (a port is basically a pipe to read its an analogy ) . so we have lesser resources which results in Structural Hazard.

D . Since it says following instruction tries to read data from previous instruction where it need to write . in pipeline writing occurs at later stage than reading it so next instruction has to wait till gets the data or else it results in wrong computation due to data dependency which results in Data Hazard . this type of data hazard is called read after write data Hazard (RAW). A . Halting of pipelined instructions happens when we encounter a branch instruction because it takes a branch so the instructions preceeding this branch prediction algorithm which might have gone wrong should need to be flushed . so its a Control Hazard.

B. Since it says we have only one port to memory i.e. we can only fetch one memory at a time . here if we had two ports to fetch we could fetch both of them but not possible due to less number of resources . so its a Structural Hazard . C . Here also same case Regisster file allows only one access at a time i.e . port (a port is basically a pipe to read its an analogy ) . so we have lesser resources which results in Structural Hazard.

D . Since it says following instruction tries to read data from previous instruction where it need to write . in pipeline writing occurs at later stage than reading it so next instruction has to wait till gets the data or else it results in wrong computation due to data dependency which results in Data Hazard . this type of data hazard is called read after write data Hazard (RAW).
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote