S10.6.1 Frame Bandwidth from Sensor to Display

MediumImplement22 minIcarus Verilog · serverReview the topic

Budget a preview path as buffers move into or out of shared memory.

Hardware context: Camera preview pipeline. Multimedia subsystem planning

This exercise processes 4 million active pixels each second. A raw pixel occupies one byte, a processed pixel three. Count only payload crossing the shared-memory port. Use decimal MB/s.

This worksheet uses named constants. The first three entries show how to record your decisions.

Replace each unresolved value of 255 with your result.

Signals in the Timeline

SignalWidthRole
question8input of each check
Full specification

A spill writes a buffer and reads it back once. A direct stream bypasses memory. Ignore headers, blanking, compression and cache traffic. Count padding only where specified. Each ticket starts fresh.

EntryYour decision
RAW_WRITEWrite one raw buffer each frame.
RGB_WRITEWrite one processed buffer each frame.
SCANRead the processed buffer once for scanout.
DIRECTStream every stage directly, including scanout.
PREVIEWStream raw, then spill the processed buffer.
BOTHSpill both raw and processed buffers.
FANOUTSpill both. A second consumer also reads the processed buffer once.
HALFSpill both, but discard alternate whole frames before either spill.
STRIDESpill processed only. Pad each 12-byte group to 16 bytes on both transfers.
PORT_MBPSSpill raw once. Write processed once, then read it READERS times.

Examples

Example 1

RAW WRITE
Input
Write one raw buffer each frame.
Output
matches = 1

Four million one-byte writes cost 4 MB/s. (mb_per_s = 4)

Example 2

RGB WRITE
Input
Write one processed buffer each frame.
Output
matches = 1

Each processed pixel costs three bytes to store. (mb_per_s = 12)

Example 3

SCAN
Input
Read the processed buffer once for scanout.
Output
matches = 1

Scanout reads the same twelve million bytes each second. (mb_per_s = 12)

Constraints and Contract

  • Keep the parameter and named constants. Use the numeric codes and units on this page.
  • For PORT_MBPS, enter a constant expression using READERS. Only this entry changes with the parameter. The supported integer range is 0 through 6, inclusive.

Hints

Hint 1

Mark only arrows crossing memory.

Hint 2

Use the format and rate at that edge.

Hint 3

Include reads and writes in the total.

What the grader checks: Each check compares the full eight-bit answer. Parameter trials change one condition and keep the other decisions fixed.

14 checks on Icarus Verilog · server. Run the examples first, then check the full regression. Full checks use the server judge. Downloads contain your source only; samples require the simulation service. A passing result establishes the tested cases, not a proof for all possible inputs.

See all 2 problems on this path

Report a problem with this page

Your code SystemVerilogSaved locally
Ln 1, Col 1Tab indents · Ctrl/⌘ + Enter runs samples
Not run yet

RAW WRITE

Input
Write one raw buffer each frame.
Expected output
matches = 1

Four million one-byte writes cost 4 MB/s. (mb_per_s = 4)

Run samples executes all 3 public checks. Check all tests runs 14 checks on the server.

Icarus Verilog · server