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
    • Line Codes
    • Framing Basics
    • Packet Anatomy
    • Bit Stuffing
    • DC Balance and Running Disparity
    • Block Codes
    • Scrambling
    • Alignment and Lock
    • Control Symbols and Ordered Sets
    • Flits, Phits and Packing
    • Protocols Compared: Encoding and Framing
    • Drills: Encoding and Framing
  • 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
  • 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 2: Encoding and Framing
  1. Topics
  2. First Principles of Hardware Protocols
  3. Part 2: Encoding and Framing
  4. Control Symbols and Ordered Sets

Part 2 · Encoding and Framing · Senior (S)

Control Symbols and Ordered Sets

How a link sends idle, alignment, training and clock-compensation information that data can never imitate: control symbols, ordered sets and control blocks.

On this page

    Note

    Level: Senior (S) · Answers: Where does a message start and end?

    Before this: Block Codes, Alignment and Lock

    A serial link never stops: even with nothing to send, the transmitter must keep sending something, or the receiver's clock recovery loses lock. Between packets the link must also carry alignment markers, filler for clock compensation, and messages used to train and manage the link. All of it shares the wire with data that can contain any bit pattern.

    How does a link send information that can never be mistaken for data?

    The obvious answer, and why it breaks

    The obvious answer is a special byte value meaning "idle" or "start of packet". But data bytes can take every value, so any chosen value will sooner or later appear inside a payload and be misread. Escaping it (sending an escape byte first) works but makes length variable, the problem of lesson 2.4. A fast link wants control information that is unambiguous by construction, at fixed size, with no escaping.

    The idea: a code space larger than the data

    Block codes create spare room. 8b/10b maps 256 byte values into 10-bit code groups, and there are far more valid 10-bit groups than needed, so some are reserved as control symbols (often called K-codes) that no data byte can produce. 64b/66b and 128b/130b create the same distinction with the 2-bit header: one value marks a data block, the other a control block (or ordered-set block) whose contents are interpreted as control.

    Control symbols are then combined into short fixed sequences called ordered sets, each with a specific job:

    Job

    What the ordered set does

    Lesson

    Idle

    Fills the line between packets, keeping transitions and balance

    1.4

    Alignment

    Gives the receiver a pattern to find word, block or lane boundaries (for example the 8b/10b comma)

    1.5, 2.8

    Clock compensation

    Filler (SKP) the elastic buffer may delete or repeat

    1.7

    Framing

    Marks the start and end of packets

    2.2

    Training and link management

    Exchanges capabilities, speed and lane numbers during start-up; enters and leaves low-power states

    11.4, 12.4

    Control symbols carry everything that is not payload, interleaved with data on the same wire.

    Worked example: why ordered sets are sequences, not single symbols

    A single control symbol could be enough to say "this is control". Ordered sets use several symbols for two reasons:

    • Robustness. A bit error can turn one symbol into another. Requiring a fixed sequence (and sending training sets repeatedly) lets the receiver reject a corrupted one instead of acting on it.

    • Information. Training ordered sets carry fields such as the lane number, supported speeds and requests. The leading control symbol says "this is an ordered set"; the rest carries the content.

    Clock compensation adds one more twist: a SKP ordered set is made of a recognisable start followed by SKP symbols, so the receiver's elastic buffer can delete or add one SKP symbol and the set is still recognisable (lesson 1.7).

    The design space

    Approach

    What it costs

    When it wins

    Reserved code groups in a block code (8b/10b K-codes)

    Overhead of the code itself

    Unambiguous control at symbol granularity

    Header-marked control blocks (64b/66b, 128b/130b)

    Control comes in whole blocks, which wastes space for small control messages

    High-rate links where the code overhead must be low

    Escaped values in the data

    Variable length, worst-case expansion

    Low-rate byte-oriented links

    Separate sideband wires

    Pins

    On chip, or when pins are cheap

    How real protocols chose

    Protocol

    Control mechanism

    8b/10b links (PCIe Gen1–2, many others)

    Reserved K-code control symbols that data cannot produce; K28.5 contains the comma used for word alignment.

    PCI Express Gen3–5

    A sync header of 01 marks an ordered-set block (10 marks data), used for training, SKP clock compensation and other link management.

    PCI Express (all generations)

    SKP ordered sets for clock compensation; training ordered sets during link start-up.

    Ethernet

    A preamble and start frame delimiter in front of every frame; 64b/66b links mark control blocks with header 10.

    What breaks

    A receiver acts on the first training ordered set it decodes, without waiting for a repeat (illustrative). A single bit error turns a lane-number field from 2 into 3, the receiver records the wrong lane order, and the link trains with two lanes swapped. Every packet then fails its CRC. Real training protocols send each ordered set many times and require several identical consecutive copies before acting, which is exactly what this receiver skipped.

    Why this matters

    Senior lens. Control symbols are where a link's most important decisions are made, training, speed changes, power states, so their robustness matters more than the data's. In review, check that every ordered set that changes link state is repeated and confirmed, that its fields are protected (by repetition, parity or a checksum), and that a corrupted set is ignored rather than half-applied. Also check that the control mechanism leaves room for future ordered sets: link management grows with every version.

    Interview

    Asked: "How do you send "idle" on a link that never stops?"

    Weak answer: Send zeros.

    Strong answer: Zeros would starve clock recovery and could look like data. Links send idle as control symbols or control blocks that data can never produce, for example reserved 8b/10b K-codes, or blocks marked as control by the sync header in 64b/66b. Those idle patterns also keep transitions and balance. The same mechanism carries alignment, clock-compensation filler (SKP), framing and training ordered sets.

    Follow-ups: (1) Why are ordered sets repeated during training? (2) How can an elastic buffer change the length of a SKP ordered set safely?

    Check yourself Why can an 8b/10b link have control symbols that data never produces?

    There are many more valid 10-bit code groups than the 256 needed for data bytes, so some are reserved for control.

    Check yourself In 128b/130b, how does a receiver know a block is an ordered set?

    From its 2-bit sync header: 01 marks an ordered-set block, 10 a data block.

    Check yourself Why does a training receiver wait for several identical ordered sets before acting?

    A single bit error can corrupt one copy; acting only on repeated identical copies prevents a corrupted field from changing the link's configuration.

    Key takeaways

    • Links send idle, alignment, filler, framing and training as control symbols or control blocks that data can never produce.

    • Block codes make this possible: spare code groups (8b/10b) or a header value that marks control (64b/66b, 128b/130b).

    • Ordered sets that change link state must be repeated and confirmed, because a corrupted one must never be half-applied.

    Keep going

    Next: Lesson 2.10, Flits, Phits and Packing. The unit of flow control versus the unit per clock, and how messages are packed into fixed-size flits.

    Related topics

    • Part 2 overview: Encoding and Framing

    Previous

    34 / 234

    Next: Flits, Phits and Packing

    Up next

    Up nextFlits, Phits and Packing

    Sign in to save progress

    Practice this lessonReport an error

    See also

    • Line Codes
    • Framing Basics
    • Packet Anatomy