← RTL Design Interviews · SoC Architecture Interviews

Interview Question · Explain the SoC

When Does a Finished Instruction Count?

L2 Mid-LevelL3 Seniorexplain the soc

The Question

The interviewer asks

In an out-of-order model, a younger add finishes before an older load. How can software still observe the program in order?

Reveal the Model Answer

Give each new register result its own physical register. Track instructions in program order in a reorder buffer. A finished instruction may retire when it reaches the head. The ap_soc core itself runs in order.

Self-Check

Tick each key point you covered in your answer.

What Interviewers Want to Hear (Mid-Level)

Track the producer of each operand across a second write to x5.

Choose Your Follow-up

I’ve answered the opening question

Choose the route closest to your reasoning. Answer the follow-up aloud, then open the closing question.

I gave each writer a new name.

In S2.31, hex 14 names p32 for x5 and hex 20 names p34. Which value does the add at 18 need?

Reveal the Model Answer

It captured p32 and still waits for the load. The add at 24 reads p34 twice. The two chains can overlap. The last finish moves from cycle 6 to 5.

Self-Check

Tick each key point you covered in your answer.

Set the Retirement Rule

A designer proposes retiring around an unfinished head to release entries sooner. Would you use that rule in this model?

Reveal the Model Answer

Keep retirement in order so a fault at the head sees exactly the older results. Pay for occupied entries while younger results wait. Row 4 marks 14 done while the older add at 10 is unfinished. Only in row 6 does 14 retire.

Self-Check

Tick each key point you covered in your answer.

I let completed results leave.

In the separate S2.32 loop, cycle 6 lists 20 and 24 as done. Cycle 7 squashes both. What if store 20 had already written?

Reveal the Model Answer

Memory would contain a partial loop result. Keep the address and data in the store buffer until the store retires. Later loads must check it for an older store to the same address. Only the older entries 18 and 1c retire at cycle 7.

Self-Check

Tick each key point you covered in your answer.

Set the Retirement Rule

A designer proposes retiring around an unfinished head to release entries sooner. Would you use that rule in this model?

Reveal the Model Answer

Keep retirement in order so a fault at the head sees exactly the older results. Pay for occupied entries while younger results wait. Row 4 marks 14 done while the older add at 10 is unfinished. Only in row 6 does 14 retire.

Self-Check

Tick each key point you covered in your answer.

I redirected fetch.

Cycle 7 prints “squash: 20 24”. Is changing the fetch address enough to restart?

Reveal the Model Answer

Here 20 is sw and 24 is ebreak. Neither wrote a register, so only their entries go. In general, undo each squashed rename youngest first and free its new physical register.

Self-Check

Tick each key point you covered in your answer.

Set the Retirement Rule

A designer proposes retiring around an unfinished head to release entries sooner. Would you use that rule in this model?

Reveal the Model Answer

Keep retirement in order so a fault at the head sees exactly the older results. Pay for occupied entries while younger results wait. Row 4 marks 14 done while the older add at 10 is unfinished. Only in row 6 does 14 retire.

Self-Check

Tick each key point you covered in your answer.

What People Get Wrong

Common wrong answers and why they fail.

Misconception

Renaming removes every dependence.

A consumer still waits for the physical register its producer writes.

Source S2.31, add at 18 waits for p32.

Misconception

Undo a wrong-path device write on recovery.

A UART can transmit the byte before recovery.

Source S2.32, wrong-path store at 20 and device write discussion.

Learn It, Then Prove It