Specman Basics

Download as rtf, pdf, or txt
Download as rtf, pdf, or txt
You are on page 1of 3

data types

constrains ; keep ,soft & hard, gen before, methods

transaction generator: gen and gen keeping, don't gen & physica fields, events ,methods & tcm.

Driver:unit,packing,methods & tcm,interfacing with simulator

input/output monitor: unpacking(collector)

Checker/Scoreboard: list & keyed list

Inheritence:like inheritence & when inheritence:for struct subtypes: like is normal inheritence & when is
which is based on the value of a random variable. This is best suited for the generation of packets of
different information protocols.

is and is also: is to declare regular method & is also to exten method

Order of generation is different

// rd_wr was declared before rd_wt and wr_wt

keep gen (rd_wt, wr_wt) before (rd_wr);

Below example is for defining clock when RTL is not present and one needs to build a standalone e code

extend sys {

event clk is cycle @sys.any;

Temporal expressions/cntructs/operators/events in checkers or assertions: not, eventually,


fail,and,or,exp,yeild operator=>

Coverage: is key word used to define coverage group,

Atleast=min number of samples for each bucket in the item.

illegal=vlues which are illegal and cause dut error


ignore=define values that are to be completely ignored.they dont appear in statistics.

no_collect=bool = coverage item will not be displayed in report

num_of_buckets =specifies how many bucket items to be created for coverage item

Radix=or items of type int or uint, specifies the radix used in coverage reports for implicit buckets.each
value hit is a new bucket created for that item

cross coverage:ross items are combinations of items from the same coverage group. The cross coverage
construct is used to define cross items.

when=bool-exp= The item is sampled only when bool-exp is TRUE. The bool-exp is evaluated in the
context of the parent struct.

TLM ports: The way the driver gets transactions from the sequencer, its the same way the
scoreboard gets them from the monitors: through TLM.

Normal ports:

Analysis ports:these ports will act as proxies for the monitors to be connect to an external
scoreboard through the agents ports.

we will have to create two analysis exports in the scoreboard that are going to be used to retrieve
transactions from both monitors.

ENV: agent & scoreboard

Uvm API: end the transactions from sequencer and driver automatically.

Get_next_item & item_done-driver

Sequencer:sending the sequences to the driver

All of:

Execute multiple action blocks concurrently, as separate branches of a fork. The action
following the all of action will be reached only when all branches of the all of have been fully
executed. All branches of the fork are automatically joined at the termination of the all of
action block.

First of:

Execute multiple action blocks concurrently, as separate branches of a fork. The action
following the first of action will be reached when any of the branches in the first of has been
fully executed. All branches of the fork are automatically joined at the termination of the
first of action block.

Is also: "is also" is used for extending existing method/TCM. When we use "is also" it adds new
lines of code/functionality after the existing code as shown in below example.

Is first: is first" is used for extending existing method/TCM. When we use "is first" it adds new
lines of code/functionality before existing code shown in below example.

is only" is used for over riding existing method/TCM. When we use "is only" it over rides the
existing code/functionality before existing code and replaces with new code as shown in
below example.

Pack low:msb to lsb

Pack high :lsb to msb

Pre-run generation:specman elite solves the contraints of each filed during pre run phase

On the fly:

-Is activated explicitly using gen action.


-Can be used to generate fields or method variables.
-Saves memory when generated structs are disposable.
-Is recommended for generating stimulus data structs.
-Cannot be used to generate units.
-On-the-fly generation is done with the gen action, which can be called from methods or
TCMs. gen expression [keeping {constraint-block}];
-Lets the generator react to the DUT current state

As_a() type casting.

You might also like