Skip to content
DenseChip
Learn
PracticeCode labInterview

DenseChip

Navigate

Menu

LearnPracticeCode labInterview

Tools

All toolsSV editorCode repoResume
DenseChip

Practice, courses, and chip-design tools in one focused workspace.

LearnPracticeCode labInterviewToolsLearning paths

© 2026 DenseChip

AboutContactPrivacyTerms
Skip to lesson

Course contents

  • How to Use This Course
  • Reading Paths
  • Concept Map
  • How to Read the Diagrams
  • Part 0: What Is a Protocol?10
  • Part 1: Timing and Clocking11
  • Part 2: Encoding and Framing12
  • Part 3: Handshakes13
  • Part 4: Flow Control17
  • Part 5: Transactions19
  • Part 6: Concurrency and Performance17
  • Part 7: Ordering13
  • Part 8: Sharing and Arbitration12
  • Part 9: Deadlock and Liveness13
  • Part 10: Reliability and Recovery20
  • Part 11: Bring-Up and Link Management10
    • Reset Semantics
    • Reset Sequencing Across Interfaces
    • Presence and Hot-Plug
    • Link Training
    • Capability Negotiation
    • Enumeration and Discovery
    • Link State Machines
    • Versioning and Compatibility
    • Protocols Compared: Bring-Up and Link Management
    • Drills: Bring-Up and Link Management
  • Part 12: Power8
  • Part 13: Shared State and Coherence9
  • Part 14: Security and Isolation7
  • Part 15: Specifying and Verifying11
  • Part 16: Protocols Dissected17
  • Part 17: Capstones5
  • Part 18: Interview Preparation6
Loading lesson

‹Part 11: Bring-Up and Link Management
  1. Topics
  2. First Principles of Hardware Protocols
  3. Part 11: Bring-Up and Link Management
  4. Reset Semantics

Part 11 · Bring-Up and Link Management · Working (W)

Reset Semantics

What an interface must look like during and after reset, what happens to transactions caught by a reset, and what each side may assume about the other. A read lost to a reset, and the timeout that rescues its requester.

On this page

    Note

    Level: Working (W) · Answers: How do the two sides agree at start-up?

    Before this: The Request/Response Model, Timeouts and Watchdogs

    A processor reads a register in a peripheral. While the read is in flight, a watchdog resets the peripheral. The peripheral comes back clean, with no memory of the read. The processor is still waiting for its answer, and nothing in the system will ever send it. A reset is supposed to make things safe; on one side of an interface it made the other side hang.

    What must an interface guarantee during and after reset, and what happens to transactions caught by one?

    The obvious answer, and why it breaks

    The obvious view is that reset returns a block to a known state, so it is always safe. For the block itself, it is. But an interface has two sides, and a reset usually reaches only one. Whatever the reset side "forgets" (outstanding requests, credits it owed, data half-sent), the other side still remembers and is still waiting for. Reset semantics are about the boundary, not the block.

    The idea: rules for both sides

    Question

    Rule

    What does an interface drive during reset?

    Inactive values: no valid asserted, no requests; ready may be low. A block in reset must not create transfers.

    When may a block start after reset?

    Only when its partner is out of reset and ready, and any training or credit initialisation has completed (lessons 4.4 and 11.4).

    What happens to requests outstanding at the reset side?

    They are lost. The requester must learn this: a timeout, an error response from a wrapper, or a reset of the requester too.

    What happens to credits, sequence numbers, tags?

    Both sides must reset them together, or re-initialise them by an exchange; one-sided resets corrupt them (lesson 4.8).

    Build it: a read caught by a reset

    The requester issues a read in cycle 1. The target would answer four cycles later, but it is reset in cycle 3 and forgets the read. The requester has a 6-cycle completion timeout.

    tb.sv
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    // A read caught by a reset. The requester issues a read in cycle 1; the target
    // would answer 4 cycles later, but the target is reset in cycle 3 and forgets the
    // read. The requester has a completion timeout of 6 cycles: when no response has
    // arrived it completes the read with an error, so it does not wait for ever. The
    // checker confirms no stale response ever arrives after the reset, and that the
    // timeout turned the lost read into an error.
    module tb;
      logic clk = 0;
      always #5 clk = ~clk;
      initial begin $dumpfile("wave.vcd"); $dumpvars(0, tb); end
    
      int cyc = 0;
      always @(posedge clk) cyc <= cyc + 1;
    
      wire  req   = (cyc == 1);                       // the requester's read
      wire  rst_t = (cyc == 3);                       // target reset pulse
      // Target: remembers a pending read and answers 4 cycles after it arrived
      logic       pending = 0;
      logic [2:0] age = 0;
      logic       rsp = 0;
      always @(posedge clk) begin
        rsp <= 0;
        if (rst_t) begin pending <= 0; age <= 0; end  // reset: the read is forgotten
        else if (req) begin pending <= 1; age <= 0; end
        else if (pending) begin
          age <= age + 1;
          if (age == 3) begin rsp <= 1; pending <= 0; end
        end
      end
      // Requester: waits for the response, with a 6-cycle completion timeout
      logic       waiting = 0, timeout_err = 0;
      logic [3:0] wait_cnt = 0;
      always @(posedge clk) begin
        timeout_err <= 0;
        if (req) begin waiting <= 1; wait_cnt <= 0; end
        else if (waiting) begin
          if (rsp) waiting <= 0;
          else if (wait_cnt == 5) begin waiting <= 0; timeout_err <= 1; end
          else wait_cnt <= wait_cnt + 1;
        end
      end
    
      int responses = 0, errors_seen = 0;
      always @(posedge clk) begin
        if (rsp) responses++;
        if (timeout_err) errors_seen++;
      end
      initial begin
        #160;
        if (responses == 0 && errors_seen == 1) $display("PASS: the reset dropped the read; the requester's timeout completed it with an error instead of hanging");
        else $display("FAIL: responses %0d timeout errors %0d", responses, errors_seen);
        $finish;
      end
    endmodule

    The target's reset branch clears pending: the read simply ceases to exist on that side. Only the requester's timer turns that into something software can see.

    Watch it run

    How to read it, slot by slot:

    • Slot 0: the read goes out (req); from slot 1 the target holds it (pending) and the requester is waiting (waiting).

    • Slot 2: the target is reset (rst_t). In slot 3 pending is 0: the read is gone.

    • Slots 3 to 6: nothing happens. rsp never rises. Without a timeout, waiting would stay high for ever.

    • Slot 7: the timeout fires (timeout_err); the requester completes the read with an error and stops waiting.

    Ways to handle a one-sided reset

    Approach

    How

    Timeouts in requesters

    Lost requests become errors after a bounded wait (lesson 9.9)

    A reset-aware wrapper

    Sits in front of the target; while the target is in reset or has just come out of it, answers outstanding and new requests with errors

    Quiesce before reset

    Drain outstanding traffic before resetting a block (lesson 12.5)

    Reset both sides together

    Where the interface allows, a shared reset clears both sides' state at once

    How real protocols chose

    Protocol

    Reset rules

    AXI

    During reset a manager must drive ARVALID, AWVALID and WVALID low and a subordinate RVALID and BVALID low; transactions outstanding across a reset of one side are not defined by the protocol, so systems add timeouts or wrappers.

    PCI Express

    A link reset retrains the link and re-initialises flow control; requests that never get a completion end in a completion timeout.

    What breaks

    The opening system (illustrative) reset a peripheral from a watchdog without telling the interconnect. The processor's read hung, the core stopped, and a second watchdog reset the whole chip. Adding a reset-aware wrapper that answered any request to the peripheral with an error while it was resetting kept the processor alive; the driver saw the error and re-initialised the peripheral.

    Why this matters

    Senior lens. For every interface, write down: what each side drives in reset, what condition allows traffic to start, and what happens to every piece of shared state (outstanding requests, credits, tags, sequence numbers) if only one side resets. Then verify each case with a reset in the middle of traffic, which is the case quiet bring-up tests never exercise.

    Interview

    Asked: "What happens to an outstanding AXI read when the slave resets?"

    Weak answer: It completes after the reset.

    Strong answer: The slave forgets it: its state is cleared, so no response will ever come. The AXI protocol doesn't define recovery across a one-sided reset, so the master would wait for ever unless the system handles it: a timeout in the master or interconnect that completes it with an error, a reset-aware wrapper that answers on the slave's behalf while it's in reset, quiescing traffic before resetting the slave, or resetting both sides together. The same applies to any state shared across the interface.

    Follow-ups: (1) What must a block drive while in reset? (2) What shared state besides requests is affected?

    Check yourself Why must a block in reset drive its valid signals inactive?

    So it cannot create a transfer from undefined state while it is not working; its partner would otherwise accept garbage as a real transaction.

    Check yourself A receiver is reset but its sender keeps its credit count. What goes wrong?

    The sender may believe it has credits for buffer slots the receiver no longer considers occupied, or vice versa: overflow or a permanently reduced count. Credits must be re-initialised on both sides.

    Key takeaways

    • Reset clears one side's state; the other side still remembers outstanding requests, credits and tags.

    • During reset, drive interfaces inactive; start traffic only when both sides are out of reset and initialised.

    • Handle one-sided resets with timeouts, reset-aware wrappers, quiescing, or joint resets.

    Keep going

    Next: Lesson 11.2, Reset Sequencing Across Interfaces. Who leaves reset first, and what goes wrong in each order.

    Related topics

    • Part 11 overview: Bring-Up and Link Management

    Previous

    162 / 234

    Next: Reset Sequencing Across Interfaces

    Up next

    Up nextReset Sequencing Across Interfaces

    Sign in to save progress

    Practice this lessonReport an error

    See also

    • Presence and Hot-Plug
    • Link Training
    • Capability Negotiation
    clkreqrst_tpendingrspwaitingtimeout_err
    Simulation output: the target's reset drops a pending read; no response ever arrives, and the requester's timeout completes the read with an error.