Baseline Template
Overview
A baseline template is a designated test template used within the dynamic interleaving of test templates framework for functional verification of a design-under-verification (DUV). It anchors the interleaving process by serving as the reference template against which relative weights of other templates are assigned, and its transactions are produced exactly one time during test generation.
Role in Dynamic Interleaving
In the dynamic interleaving framework, a test case generator works from a plurality of test templates, each aimed at exercising a different function of the design. When relative weights are assigned to templates, the baseline template is given a normalized weight, and the other templates receive weights expressed relative to it. The transactions of the baseline template are emitted exactly once during generation.
Concretely, the test case generator continues interleaving transactions from the template set until all transactions specified in the baseline template have been produced. Other templates are generated an integer number of times so that their weight ratios relative to the baseline template are honored while keeping the semantics of each scenario intact.
Selection
The baseline template is typically the first template encountered in the set of templates provided to the generator. Choosing this template first is necessary so that subsequent weight assignments to the remaining templates can be expressed relative to it.
Behavior During Generation
During weighted selection in the interleaving loop:
- The baseline template participates in probabilistic (weighted) selection alongside the other templates.
- The loop continues while the baseline template has not yet been fully produced.
- Once all of the baseline template's transactions have been emitted, the baseline template is disqualified from further selection.
- Any other template that has completed an integer number of iterations is similarly disqualified from further selection.
- Generation terminates only when the baseline template has been fully produced and every other template has completed an integer number of times.
Unbreakable Sections and Transaction Sparseness
While the baseline template does not impose special constraints beyond its single-pass completion, interleaving overall respects unbreakable sections and transaction-sparseness requirements that may be defined on any template (including the baseline). Within an unbreakable section, the current template is repeatedly chosen until the section completes; foreign transactions cannot intervene.
Example
In a verification scenario with two templates — one specifying 100 CPU-initiated memory accesses and another specifying 100 DMA-initiated accesses — a 5:1 weight ratio means that for every transaction emitted from the second template, five transactions are emitted from the first. If the first template is designated as the baseline template, its 100 transactions are generated exactly once, while the second template is repeated an integer number of times to honor the 5:1 ratio.
Advantages
The use of a baseline template contributes several benefits to the verification flow:
- Provides a stable reference for assigning and reasoning about template weights.
- Ensures complete, semantically intact coverage of the baseline scenario in every generated test case.
- Simplifies the maintenance and reuse of test template pools, because templates individually address well-defined functions while the interleaving mechanism, anchored by the baseline, produces diverse combined test cases.