Pipeline Hazards: When One Instruction Depends on Another’s Result

Pipeline Hazards: When One Instruction Depends on Another’s Result

Verified Sources
Nov 4, 2026

In a pipelined CPU, an instruction pipeline hazard occurs when the next instruction cannot proceed through the pipeline as expected because of a constraint (timing/resource/data/control). The specific case “an instruction depends on the result of a previous instruction” corresponds to a keyword data hazard—most commonly characterized as a keyword RAW (read-after-write) hazard.

In the given options, the correct choice is:

  • (ii) Data hazard

However, I cannot include the mandatory web-search citations because the web-search tool is currently failing due to a usage-limit error.


Quick classification of the other options

A keyword structural hazard happens when pipeline stages can’t use the required hardware simultaneously (e.g., one memory port shared by instruction fetch and data access).
A keyword syntax hazard is not a standard pipeline hazard category in classical pipeline-hazard models.
A keyword memory hazard is not the standard named category for “depends on previous result” in the standard structural/data/control hazard framework.


How a Data Hazard Arises (Classic Case)

  1. 1
    Step 1

    Instruction I2I_2 needs a value produced by instruction I1I_1 (e.g., same register).

  2. 2
    Step 2

    I1I_1 produces the value in a later pipeline stage than I2I_2 needs it.

  3. 3
    Step 3

    Use stalling (pipeline interlock) or forwarding/bypassing to provide the value early.

  4. 4
    Step 4

    The pipeline proceeds correctly only because the hazard is managed—this is the essence of a keyword data hazard.

Rule of Thumb

If the issue is about values/operands being needed too early, it’s a data hazard. If it’s about hardware being unavailable, it’s a structural hazard.

About “Syntax hazard” and “Memory hazard” options

In many standard textbooks, pipeline hazards are grouped into structural, data, and control hazards. “Syntax hazard” is not a typical pipeline hazard category, and “memory hazard” is not the standard label for the specific dependency case you described.

OptionMeaning in pipeline-hazard termsLikely correct for “depends on previous result”?
(i) Structural hazardResource conflict between stagesNo
(ii) Data hazardRegister/memory value dependency timingYes
(iii) Syntax hazardIll-formed instruction/program syntaxNo (not a standard pipeline hazard category)
(iv) Memory hazardMemory system ordering/timing issuesNot the standard label for this dependency question

Which Hazard Fits the Dependency Case?

Qualitative match to the scenario “depends on previous instruction result”.

Typical Resolution of a Data Hazard in a Pipeline

Operand not ready

Cycle when $I_2$ needs operand

A value produced by I1I_1 is not yet available in the stage where I2I_2 requires it."

Forward or stall

Next decision

Forwarding may supply the value; otherwise interlocking stalls I2I_2."

Correct execution

After resolution

Pipeline continues with the correct operand value."

Pipeline Hazard Quick-Check

1 / 4
Question · Term

An instruction depends on a previous instruction’s result. Which hazard?

Click to reveal
Answer · Definition

Data hazard.

Knowledge Check

Question 1 of 4
Q1Single choice

Which pipeline hazard occurs when an instruction depends on the result of a previous instruction?