Skip to content

Write coord_vseq::body() so channel B carries the tag channel A’s driver actually saw

write-from-scratch / virtual-sequencer / fork-joinUVM · runs take about 2 minutes

coord_vseqr is already wired (see env) to chan_a_sqr and chan_b_sqr, the two channel sequencers, and to chan_a_drv, channel A’s driver: the only place that learns the tag channel A’s item carried, once it has been driven.

RequirementsFor coord_vseq::body()

  1. Send one item on p_sequencer.chan_a_sqr, with any tag (e.g. $urandom).
  2. Concurrently, with fork/join, send one item on p_sequencer.chan_b_sqr whose tag is the value p_sequencer.chan_a_drv recorded for channel A’s item.

chan_a_drv.last_tag is only right once channel A’s driver has pulled and processed the item: not when you call start_item on channel A, and not because channel A’s branch comes first in the fork. Reading it early doesn’t error; it returns whatever was recorded last, which at the start of the test is nothing.

Source on GitHub

coordinated_channel_write.sv