Upload
others
View
15
Download
0
Embed Size (px)
Citation preview
Traditional Agents
© Accellera Systems Initiative 2
• Unit I/O exposed in both scopes
• Agent shared across both scopes
Unit Level
A Agent
Am
~
B Agent
B
Chip Level
Chip
ds
m
~ ds
A Agent
Am
~
B Agent
B
ds
m
~ ds
Cascaded Usage
© Accellera Systems Initiative 3
• Unit I/O not exposed in both scopes
• Can’t connect virtual interface to a port
ChipA Agent
Am
B Agent
Bds
m
~ ds
?
Sequence Layering
© Accellera Systems Initiative 4
• Advanced by Tom Fitzpatrick of Mentor
Chip
A Agent
Am
B Layer
Bds
m
~ s B2A
reconstruction monitor
child sequencer translator sequence
Sequence Layering
© Accellera Systems Initiative 5
Chip
A Agent
Am
B Layer
Bds
m
~ s B2A
reconstruction monitor
child sequencer translator sequence
• Asymmetry
• Peripheral Clutter
• Packaging Ambiguity
• Semantic Dependency
Semantics – Top Level
© Accellera Systems Initiative 6
• PCS ENC VIP has PULL Semantic at Top Level
• PCS DEC VIP has PUSH Semantic at Top Level
PMA PCS MAC
ENC
DEC
SERGEN
DESMON
MAC PCS PMA
ChipVIP
Semantics – Unit Level
© Accellera Systems Initiative 7
• Encoder DUT reversed by Decoder VIP
• Decoder VIP has PUSH Semantic
– Same Semantic as Top Level Context
• WRONG – The DUT is a one-way function!
UVM_PASSIVE
PCS
ENC
PCS
DECblocks
=mii
MII
mii
mii
UVM_ACTIVE
Semantics – Unit Level – Correct
© Accellera Systems Initiative 8
• Encoder DUT compared against Encoder VIP
• Encoder VIP has PUSH Semantic
– Opposite Semantic as Top Level Context
• One function, two semantic contexts!!
PCS
ENC
PCS
ENC
blocks
=
blocks
MII
mii
UVM_ACTIVE
mii
UVM_PASSIVE
If Only …
© Accellera Systems Initiative 9
• Component based Architecture
• Connected with Ports
• Semantic Independence
Chip
Am
d~ s
m
g
A
m
g
BC
B C
The Translator Class
© Accellera Systems Initiative 10
The Translator Class
• A Translator is a uvm_component that translates a stream of inbound items into a stream of outbound items.
virtual class translator #(
type t_inbound_item = uvm_sequence_item,
type t_outbound_item = uvm_sequence_item
) extends uvm_component;
pure virtual task translate();
endclass
© Accellera Systems Initiative 11
UVM_ACTIVE Translation
© Accellera Systems Initiative 12
• Outbound items are PULLED out the seq_item_export
• Inbound items are PULLED in the seq_item_port
• Translate from inbound to outbound
translateseq_item_port
#(t_inbound_item)
seq_item_export
#(t_outbound_item)
is_active = UVM_ACTIVE
UVM_PASSIVE Translation
© Accellera Systems Initiative 13
• Inbound items are PUSHED in the analysis_export
• Outbound items are PUSHED out the analysis_port
• Translate from inbound to outbound
translateanalysis_port
#(t_outbound_item)
analsyis_export
#(t_inbound_item)
is_active = UVM_PASSIVE
The Translation API
• Derivatives implement the translate task calling:
get_inbound_item ( output t_inbound_item item );
try_inbound_item ( output t_inbound_item item );
put_outbound_item ( input t_outbound_item item );
put_uncloned_outbound_item (
input t_outbound_item item );
• Always follow a get-transform-put pattern
• Can be periodic 1:1, 1:M, M:1, M:N or aperiodic
• Same task called in both semantic contexts
© Accellera Systems Initiative 14
class pcs_encoder extends
translator #(t_mii_transfer, t_block);
task translate();
t_mii_transfer t1,t2;
t_block block;
get_inbound_item(t1);
get_inbound_item(t2);
block = encode(t1,t2);
put_outbound_item(block);
endtask
endclass
© Accellera Systems Initiative 15
Get
Transform
Put
From t_mii_transfers To t_blocks
2 :1 Periodicity
Inline Sequencing
© Accellera Systems Initiative 16
• Outbound items no longer directly controllable
• No possible input sequence to result in the desired output sequence
• Generally only an issue for stimulus generation
seq_item_port
#(t_inbound_item)
seq_item_export
#(t_outbound_item)
is_active = UVM_ACTIVE
inline_sqr
is_sequenced = TRUE
Debug Hooks
© Accellera Systems Initiative 17
• Optional Inbound/Outbound item analysis taps
• Optional Inbound/Outbound item logging
translatet_inbound_item
port
t_outbound_item
port
inbound_tap
#(t_inbound_item)outbound_tap
#(t_outbound_item)
inbound_log outbound_log
Orthogonal Sequencing
© Accellera Systems Initiative 18
Control Knob Pollution
© Accellera Systems Initiative 19
• Control knobs, Z’, for Z items show up in X items
• A Z’ has nothing to do with an X item
• Translator B must be Z’ aware to pass them through
Translator A
Y+Z’X to Y Y to Z
Translator B
ZX+Z’
Control Knob Explosion
© Accellera Systems Initiative 20
• Control Knobs accumulate with each link and with each usage context
Y+Z’ ZX+Y’+Z’W+X’+Y’+Z’+C’
CX+C’W+X’+Y’+Z’+C’
Orthogonal Sequencing
© Accellera Systems Initiative 21
• Control sequenced separately from Data
• X timed, Y timed or independent
X to YX Y
Y’
Dynamic Translation
© Accellera Systems Initiative 22
frame
generatorpayload frames
overhead
• Why be limited to Control Knobs for Error Insertion?
• Example: Encapsulation
Adaptive Translation
© Accellera Systems Initiative 23
X to YX Y
• Response Channel used to tune the Dynamic translation.
• Example: IPG requested vs IPG actual
Package Isolation
• Helps resolve package dependency
• Package boundaries have are one of four data types:
– A packet bit [7:0] data[];
– A frame bit [0:FL-1][7:0] data;
– A bitstream bit [BW-1:0] data;
– A bundle bit [0:LC-1][BW-1:0] data;
© Accellera Systems Initiative 24
The Layered Architecture
© Accellera Systems Initiative 25
Layers
© Accellera Systems Initiative 26
• A Layer translates from low abstraction to high abstraction in the analysis path, AND from high abstraction to low abstraction in the stimulus path
stimulus
pathseq_item_port
#(t_high_abstraction)
seq_item_export
#(t_low_abstraction)
is_active
analysis_export
#(t_low_abstraction)
analysis_port
#(t_high_abstraction)
analysis
path
Layer Implementation
© Accellera Systems Initiative 27
s s s
one or more
optional
optional
is_active
Layer Example – Ethernet PCS
© Accellera Systems Initiative 28
TX RS
RX RS
ENC BER
link state + ipg
packets bitstream
DEC SHA
slip/skip/flip
ordered sets
mii blocks
block lock
Attachment Agents
© Accellera Systems Initiative 29
• An Attachment Agent is a Traditional Agent without a sequencer
low abstraction
virtual interface
is_active
Driver
analysis_port
#(t_low_abstraction)
Monitor
seq_item_port
#(t_low_abstraction)
Chains
© Accellera Systems Initiative 30
• A Chain connects a sequencer to an Attachment Agent and has zero or more intervening Layers.
• A Chain is simple if it has only one layer.
low abstraction
virtual interface
is_active
analysis_port
#(t_high_abstraction)LLL
SQR
zero or more
AA
Chainable Agents
© Accellera Systems Initiative 31
• A Chainable Agent is a Chain with no Layers
• Degenerate case similar to a Traditional Agent
low abstraction
virtual inteface
is_active
Attachment
Agent
Sequencer
analysis_port
#(t_low_abstraction)
Usage Contexts
© Accellera Systems Initiative 32
Edge Unit Context
© Accellera Systems Initiative 33
• An Edge Unit has I/O exposed in both scopes
• The Attachment Agent is ported
LLL AA EU
EUs
AAUnit
Level
Chip
Level
CA
Cs
Internal Unit Context
© Accellera Systems Initiative 34
• An Internal Unit has no I/O exposed at the Chip
• The Layer is ported
LLL AA IU
IULs
AAUnit
Level
Chip
Level
SC
Cs
End Unit Context
© Accellera Systems Initiative 35
• An End Unit is the Internal Unit adjacent to the protocol divide
• The Layer and Sequencer is ported
LLL AA
EULs
AAUnit
Level
Chip
LevelEU
SC
Cs
rx tx
Conclusion
© Accellera Systems Initiative 36
It’s in the Numbers
• 300 lines of code
• ~400 extensions
• 16 Layers, 3 Attachment Agents, 2 utility Translators
• ~240,000 simulation runs
• ~16,000 tests
• The work horse of Unit and Chip level tests for ~2½ years
© Accellera Systems Initiative 37