LessonChoose between four-state `logic` and two-state `bit`/`int`; declare packed and unpacked arrays correctly; build readable models with `typedef`, `enum` and `struct`; control width and sign with explicit casts; and use `string` for testbench messages.
Open reference →LessonSelect the right collection for a testbench job; size and resize dynamic arrays; use queues as FIFOs and stacks; index sparse data with associative arrays; iterate with `foreach`; and apply the built-in array reduction, ordering and locator methods.
Open reference →LessonDeclare a class with properties, a constructor and methods; distinguish a handle from the object it refers to; explain `null` handles and garbage collection; implement shallow and deep copies; and use `static` members and `this` correctly.
Open reference →LessonExtend a base class and call its members with `super`; explain how `virtual` methods select behaviour at run time; use `$cast` to move a base handle back to a derived type safely; define abstract classes with pure virtual methods; and…
Open reference →LessonStart parallel threads with `fork...join`, `join_any` and `join_none`; stop threads safely with `disable fork`; synchronise threads with named events; protect shared resources with semaphores; and pass transactions between components with mailboxes.
Open reference →LessonBundle a protocol's signals into an `interface`; restrict direction with `modport`; remove testbench-to-DUT races with a clocking block; connect class-based components to the DUT through a `virtual interface`; and choose input and output skews deliberately.
Open reference →LessonDescribe the role of each testbench layer; write transaction, generator, driver, monitor and scoreboard classes; connect them with mailboxes inside an environment; control a run from a test class; and decide when a test has finished.
Open reference →LessonDeclare `rand` and `randc` properties; write constraint blocks that keep stimulus legal; call `randomize()` and always check its result; add inline constraints with `randomize() with`; use `pre_randomize` and `post_randomize`; and reproduce a failing test from its seed.
Open reference →LessonShape value distributions with `dist`; express conditional rules with implication and `if/else`; control solving order with `solve...before`; make defaults overridable with `soft`; switch constraints and random variables on and off at run time; and constrain the size and contents of…
Open reference →LessonDistinguish immediate from concurrent assertions; build sequences with cycle delays and repetition; write properties with overlapping and non-overlapping implication; use `$rose`, `$fell`, `$stable` and `$past`; disable checks during reset; and attach assertions to a design with `bind`.
Open reference →LessonExplain the difference between code coverage and functional coverage; write covergroups with coverpoints and explicit bins; mark illegal and ignored values; cross coverpoints to measure combinations; choose when coverage is sampled; and use coverage results to drive test closure.
Open reference →LessonCombine an interface, class-based components, constrained-random stimulus, a reference model, assertions and coverage into one environment for a synchronous FIFO; organise the run as a regression with recorded seeds; and assemble the evidence needed to sign off a block.
Open reference →GlossaryA sparse collection that stores only written entries, indexed by a key of any type.
Open reference →GlossaryA user-defined type that bundles properties and methods and is created at run time.
Open reference →GlossaryA block that defines when a testbench samples and drives signals relative to a clock.
Open reference →GlossaryAn assertion sampled on a clock that checks a temporal property over cycles.
Open reference →GlossaryA Boolean rule that random values must satisfy when randomize() is called.
Open reference →GlossaryThe process of finding and closing coverage holes until the plan goal is met.
Open reference →GlossaryA construct that defines coverpoints, bins and crosses for functional coverage.
Open reference →GlossaryCoverage of combinations of bins from two or more coverpoints.
Open reference →