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

‹First Principles of Hardware Protocols
  1. Topics
  2. First Principles of Hardware Protocols
  3. Part 2: Encoding and Framing

Part 2 · Encoding and Framing · All levels

Part 2: Encoding and Framing

Where does a message start and end? Name five ways a receiver finds packet boundaries.

  • 12topics
  • 12lessons
On this page

    Part 2 answers: Where does a message start and end?

    Where Part 2 sits among the fifteen questions of the course.

    Once a receiver can sample bits, it still has to find structure in them: where a word starts, where a packet ends, which symbols are control and which are data. Encoding also has to keep enough transitions for clock recovery and keep the line balanced.

    This part covers line codes, framing methods, packet anatomy, bit stuffing, block codes and their overhead, scrambling, lock, ordered sets, and flits.

    After this part you can

    • Name five ways a receiver finds packet boundaries.

    • Compute the overhead of 8b/10b, 64b/66b and 128b/130b.

    • Explain how a receiver gains and loses block lock.

    Warm-up: three questions from Part 1

    Answer each in your head before opening it. If two or more feel shaky, revisit Part 1: Timing and Clocking first.

    Check yourself Why does a common-clock interface stop scaling with distance?

    Clock-to-output, flight time, skew and setup must all fit in one clock period. Flight time grows with distance, so the period has to grow too.

    Check yourself Why can a UART work without any clock wire?

    Each frame starts with a start bit that resynchronises the receiver, which then samples mid-bit using its own clock. The frame is short enough that a small rate mismatch does not accumulate past half a bit.

    Check yourself What does an elastic buffer absorb?

    The small frequency difference (ppm offset) between the transmitter's and receiver's clocks, by inserting or deleting filler symbols.

    Lessons

    #

    Lesson

    Level

    Status

    2.1

    Line Codes

    F · Foundation

    Ready

    2.2

    Framing Basics

    F · Foundation

    Ready

    2.3

    Packet Anatomy

    F · Foundation

    Ready

    2.4

    Bit Stuffing

    W · Working

    Ready

    2.5

    DC Balance and Running Disparity

    W · Working

    Ready

    2.6

    Block Codes

    W · Working

    Ready

    2.7

    Scrambling

    W · Working

    Ready

    2.8

    Alignment and Lock

    S · Senior

    Ready

    2.9

    Control Symbols and Ordered Sets

    S · Senior

    Ready

    2.10

    Flits, Phits and Packing

    S · Senior

    Ready

    —

    Protocols compared

    all levels

    Ready

    —

    Drills and checkpoint

    all levels

    Ready

    Every lesson in this part is ready. Work through them in order: each one sets up the problem the next one solves.

    Where other courses go deeper

    This course teaches why protocols are designed the way they are. These lessons show how to build or sign off the same ideas, so this part links to them instead of repeating them.

    • RTL: Packets, TLAST, TKEEP and Monitors

    Related topics

    • Course hub

    • Previous: Part 1 · Timing and Clocking

    • Next: Part 3 · Handshakes

    PreviousNext: Line Codes

    Up next

    Up nextLine Codes

    Sign in to save progress

    Practice this lessonReport an error

    See also

    • How to Use This Course
    • Reading Paths
    • Concept Map