U17.7.1 Three Lanes, One Start

HardImplementUVM · serverReview the topic

Write the virtual sequence that runs every lane's bursts. Bursts start together, nothing starts in reset, a reset sends lanes back to prepare, and the sequence ends after every lane drains.

Hardware context: Two to four traffic lanes with a reset in the middle of the run. Write a virtual sequence that aligns lanes with a barrier, pauses them through reset and waits for all of them.

A bench has two to four lanes, each with its own sequencer. For each of three rounds, every lane prepares for a while and then sends a burst of three beats. All bursts of a round must start in the same nanosecond.

In the middle of the run the design is reset, and the event rst is on for the length of it. No burst may start while rst is on. A reset wipes every lane's preparation: a lane that prepared before the reset must prepare again before its next burst.

Write coordinator.body(). It must return only when every lane has sent all its bursts.

Full specification
What you write
// The virtual sequence that runs every lane's bursts.
class coordinator extends coordinator_base;
  `uvm_object_utils(coordinator)
  function new(string name = "coordinator"); super.new(name); endfunction
  task body();
    // Every lane: rounds times prep(l, r), then burst(l, r), all lanes starting each burst together.
    foreach (sqrs[l])
      for (int r = 0; r < rounds; r++) begin
        prep(l, r);
        burst(l, r);
      end
  endtask
endclass
GivenWhat it does
sqrsOne sequencer per lane; sqrs.size() is the number of lanes.
prep(l, r)Lane l prepares for round r; it takes 4 to 10 ns.
burst(l, r)Sends lane l's three beats, 10 ns each, and returns after the last.
rstOn while the design is in reset: use is_on, wait_on and wait_off.

Each case is its own coordinator, lanes and reset, all running in one test.

Examples

Example 1

Reset While Two Lanes Wait
Input
3 lanes, 3 rounds of 3 beats; reset from 45 to 75 ns
Output
rounds_aligned = 3, bursts_done = 9, returned_after_last_beat = yes

Two lanes are waiting for round 2 when reset starts. They must be released, wait out the reset, prepare again and meet the third lane afterwards.

Example 2

Reset During a Burst
Input
3 lanes, 3 rounds of 3 beats; reset from 21 to 46 ns
Output
rounds_aligned = 3, bursts_done = 9, returned_after_last_beat = yes

The burst in flight finishes. Nobody may start the next round until the reset ends, and every lane prepares again first.

Example 3

Two Lanes
Input
2 lanes, 3 rounds of 3 beats; reset from 79 to 99 ns
Output
rounds_aligned = 3, bursts_done = 6, returned_after_last_beat = yes

The rendezvous must be sized from the number of lanes, here two.

Constraints and Contract

  • Keep the class name and body().
  • Use prep, burst and rst as given; do not add fixed delays to line lanes up.
  • Start bursts only through burst(l, r).

Hints

Hint 1

Which synchronisation object lets every lane wait until all of them have arrived, however late the last one is?

Hint 2

A lane can be waiting at the rendezvous when the reset starts. What must happen to it, and to the count it left behind?

Hint 3

After the reset, how does a lane know whether the rendezvous released it for the round or because of the reset?

What the grader checks: Six coordinators run together, each with two to four real sequencers and drivers and its own reset window. The checks read the first-beat time of every burst and which bursts started in reset or on stale preparation. They also read when your sequence returned.

6 checks on UVM · server. Run the examples first, then check the full regression. Full checks use the server judge. Downloads contain public samples only. 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

Reset While Two Lanes Wait

Input
3 lanes, 3 rounds of 3 beats; reset from 45 to 75 ns
Expected output
rounds_aligned = 3, bursts_done = 9, returned_after_last_beat = yes

Two lanes are waiting for round 2 when reset starts. They must be released, wait out the reset, prepare again and meet the third lane afterwards.

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

UVM · server