S4.7.1 Place the Slices

MediumOptimize22 minIcarus Verilog · serverReview the topic

Cut a path of five hops so that every segment fits the clock period, and count what the cuts cost.

Hardware context: One valid and ready channel with a register slice in the middle, and a path of two interconnect hops. Timing closure of an interconnect

A read address channel runs from a DMA block to a far memory through five hops of an interconnect. The path starts and ends at flip-flops. The channel has 40 payload bits. The read data comes back along the same hops on its own channel.

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

Signals in the Timeline

SignalWidthRole
question8input of each check
Full specification
Hop12345
Delay, in ns23142

A cut is a register slice placed after a hop. A segment is the part of the path between two cuts, or between a cut and an end. A register of a slice has one flip-flop for each payload bit and one more for its valid or full flag. A forward slice has one such register and a full slice has two. Enter every answer as a plain number.

EntryYour decision
TOTAL_DELAYDelay of the whole path, in ns.
LONGEST_HOPDelay of the slowest hop, in ns. No number of cuts makes a segment shorter than this.
ONE_CUT_BESTLongest segment, in ns, with the best single cut.
MIN_CUTSSmallest number of cuts that makes every segment fit a clock period of 5 ns.
FIRST_CUTHop after which the first of those cuts sits.
SECOND_CUTHop after which the second cut sits.
LONGEST_SEGMENTLongest segment with those two cuts, in ns.
ADDRESS_LATENCYCycles that the two cuts add to one read address.
ROUND_TRIPCycles added to a read of one beat, if the read data channel gets two cuts as well.
FORWARD_FLOPSFlip-flops of one forward slice on the address channel.
FULL_FLOPSFlip-flops of one full slice on the address channel.
HALF_RATE_EDGEEight beats cross one half-rate slice, from edge 1 on, and the receiver is always ready. Edge at which the last beat is taken.
BURST_LAST_EDGEA sender hands over N beats, one at every edge from edge 1 on. They cross one full slice, and the receiver is always ready. At which edge is the last beat taken?

Examples

Example 1

TOTAL DELAY
Input
Delay of the whole path, in ns.
Output
matches = 1

2 + 3 + 1 + 4 + 2 = 12.

Example 2

LONGEST HOP
Input
Delay of the slowest hop, in ns. No number of cuts makes a segment shorter than this.
Output
matches = 1

Hop 4 takes 4 ns.

Example 3

ONE CUT BEST
Input
Longest segment, in ns, with the best single cut.
Output
matches = 1

A cut after hop 3 gives segments of 6 and 6 ns. Every other place leaves a longer segment.

Constraints and Contract

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

Hints

Hint 1

Walk along the hops and add delays. Cut just before the sum would pass the clock period.

Hint 2

A cut is good only if every segment fits, the last one too.

Hint 3

One cycle for each slice and each beat. One register of payload width for a forward slice, two for a full slice.

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 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

TOTAL DELAY

Input
Delay of the whole path, in ns.
Expected output
matches = 1

2 + 3 + 1 + 4 + 2 = 12.

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

Icarus Verilog · server