Layering Sequence Pattern
Intent:
To be able to select and execute one of several sequences at will.
Motivation:
Often it is convenient to generate data using one virtual or abstract representation that needs to go through a transformation process before it can be applied to a concrete interface. In other stimulus generation scenarios it may be necessary to map or combine several virtual data streams into a single data stream.
Applicability:
The layering sequence pattern is applicable to any situation where sequences are available that use one sequence_item
but must transformed to another sequence_item
to be executed on a target sequencer. An example of this would be converting a uvm_tlm_generic_payload
item to a bus specific sequence_item
.
To view the entire Layering Sequence Pattern , please login with your Verification Academy Full Access account.
Strategy Pattern
Intent:
Define a family of algorithms, encapsulate each one, and make them interchangeable. Strategy lets the algorithm vary independently from clients that use it.
Motivation:
When multiple behaviors are needed in a class, we typically use multiple conditional statements in its operations. Instead of many conditionals, move relates conditional behaviors into their own Strategy class.
Applicability:
This pattern helps implement one of the basic principles of Object Oriented programming, i.e. Open Close Principle. This principle states classes should be open for extension but closed for modification. It implies “change” what the modules do without changing them.
To view the entire Strategy Pattern , please login with your Verification Academy Full Access account.