Professional Documents
Culture Documents
Layering Sequences
Tom Fitzpatrick
Verification Technologist
academy@mentor.com
www.verificationacademy.com
Sequences & Sequencers
• We want this:
• It will actually be
something like this:
Sequencer pointers in
virtual sequence point
to handles in virtual
“Virtual Sequencer” sequencer
contains pointers to the
actual sequencers
Virtual sequencer is the
“component anchor “ to
configure sequence
Virtual Sequencer
class virt_sequencer extends ovm_sequencer;
Extend base
…
component to add
my_seqr ctrl_seqr_h;
my_sequencer1_h; sequencer pointers
my_other_seqr my_sequencer2_h;
data_seqr_h; Use names that
indicate functionality
function new( string name ,
ovm_component parent = null );
super.new( name , parent );
endfunction
endclass
This is the easy part ☺
Setting Up the Virtual Sequence
class virt_sequence_base extends ovm_sequence;
… Hide the details in a
my_seqr ctrl_seqr_h; base sequence
my_other_seqr data_seqr_h;
• 1:1
• Transaction of one type converted into another
• Register -> bus
• 1:many
• High-level transaction converted to multiple low-
level
• Many:1
• Multiple higher-level transactions aggregated
• Converse happens on the response
Layering Architecture
Preserve the
Agent/Sequener
view
This connection
is the key
Ideally, without
changing the agent
Standard Agent
Look familiar?
The Layering Environment
class layer_env extends ovm_env;
… Parameterized by
lower_agent low_agent_h; upper-level req[,rsp]
ovm_layering_agent #(upper) up_agent_h; Create from Factory
endfunction
endclass
The Layering Environment
class layer_env extends ovm_env;
… Parameterized by
lower_agent low_agent_h; upper-level req[,rsp]
ovm_layering_agent #(upper) up_agent_h; Create from Factory
);
);
Just a name
endfunction
endclass
The Layering Environment
class layer_env extends ovm_env;
…
lower_agent low_agent_h;
ovm_layering_agent #(upper) up_agent_h;
);
Upper Sequencer Type
endfunction created in the layering_agent
endclass
The Layering Environment
class layer_env extends ovm_env;
…
lower_agent low_agent_h;
ovm_layering_agent #(upper) up_agent_h;
This connection
is the key
Ideally, without
changing the agent
Standard Agent
Tom Fitzpatrick
Verification Technologist
academy@mentor.com
www.verificationacademy.com