B2.4.1 How Far Inside?

MediumImplement22 minIcarus Verilog · serverReview the topic

Choose black box, grey box or white box for each check. Then work out when a pin-only check first sees an inside bug.

Hardware context: A FIFO watched at its pins, at an inner interface and at its count register. Deciding which internal probes a block bench keeps.

The design is a FIFO with a documented storage write port inside it. Enter the view code, or a cycle number where asked.

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
CodeView
1Black box: the pins only
2Grey box: the pins and a documented inner interface
3White box: any signal inside, by name
EntryYour decision
ORDERBytes come out in the order they went in.
COUNT_REGThe count register equals the bytes really held, every cycle.
WRITE_PORTEach accepted push writes one entry through the storage write port.
REUSEA check that must still work when another team rebuilds the FIFO inside.
BOUGHTA check on a FIFO bought from another company, delivered without its source.
SOURCE_FASTA check that must name the cycle a pointer first goes wrong.
FIRST_SEEN_PINA count bug happens at cycle 20 and reaches a pin 6 cycles later. At which cycle can a black-box check first see it?
FIRST_SEEN_INThe same bug: at which cycle can a white-box check of the count register see it?
BLACK_SEESA bug happens inside at cycle 100 and its effect reaches a pin DELAY cycles later. At which cycle can a black-box check first see it?

Examples

Example 1

ORDER
Input
Bytes come out in the order they went in.
Output
matches = 1

The specification says this at the pins; the check survives any redesign.

Example 2

COUNT REG
Input
The count register equals the bytes really held, every cycle.
Output
matches = 1

It reads one internal register by name.

Example 3

WRITE PORT
Input
Each accepted push writes one entry through the storage write port.
Output
matches = 1

A documented interface inside the design.

Constraints and Contract

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

Hints

Hint 1

If the check must outlive a redesign or work on a bought block, stay at the pins.

Hint 2

If it would reach a pin late or never, look inside.

Hint 3

A stable inner interface is grey box: earlier sight with less fragility.

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

13 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 1 problem 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

ORDER

Input
Bytes come out in the order they went in.
Expected output
matches = 1

The specification says this at the pins; the check survives any redesign.

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

Icarus Verilog · server