The Universal Translator David Cornfield dcornfield@apm.com Accellera Systems Initiative 1
Traditional Agents A Agent A Agent Chip ~ s m d A ~ s m d A B Agent B Agent m ~ s d B m ~ s d B Unit Level Chip Level Unit I/O exposed in both scopes Agent shared across both scopes Accellera Systems Initiative 2
Cascaded Usage B Agent? A Agent Chip m ~ s d s m d A B Unit I/O not exposed in both scopes Can t connect virtual interface to a port Accellera Systems Initiative 3
Sequence Layering reconstruction monitor B Layer A Agent Chip m ~ s B2A s m d A B child sequencer translator sequence Advanced by Tom Fitzpatrick of Mentor Accellera Systems Initiative 4
Sequence Layering reconstruction monitor B Layer A Agent m m ~ s B2A s d child sequencer translator sequence Chip Asymmetry Peripheral Clutter A B Packaging Ambiguity Semantic Dependency Accellera Systems Initiative 5
Semantics Top Level VIP Chip MAC PCS PMA MON DEC DES PMA PCS MAC GEN ENC SER PCS ENC VIP has PULL Semantic at Top Level PCS DEC VIP has PUSH Semantic at Top Level Accellera Systems Initiative 6
Semantics Unit Level mii = mii PCS DEC UVM_PASSIVE blocks PCS ENC mii MII UVM_ACTIVE 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! Accellera Systems Initiative 7
Semantics Unit Level Correct = blocks PCS ENC UVM_PASSIVE mii blocks PCS ENC mii MII UVM_ACTIVE Encoder DUT compared against Encoder VIP Encoder VIP has PUSH Semantic Opposite Semantic as Top Level Context One function, two semantic contexts!! Accellera Systems Initiative 8
If Only C B A Chip ~ s m g m g m d A B C Component based Architecture Connected with Ports Semantic Independence Accellera Systems Initiative 9
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 seq_item_port #(t_inbound_item) translate is_active = UVM_ACTIVE seq_item_export #(t_outbound_item) Outbound items are PULLED out the seq_item_export Inbound items are PULLED in the seq_item_port Translate from inbound to outbound Accellera Systems Initiative 12
UVM_PASSIVE Translation analysis_port #(t_outbound_item) translate is_active = UVM_PASSIVE analsyis_export #(t_inbound_item) Inbound items are PUSHED in the analysis_export Outbound items are PUSHED out the analysis_port Translate from inbound to outbound Accellera Systems Initiative 13
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; From t_mii_transfers To t_blocks get_inbound_item(t1); get_inbound_item(t2); block = encode(t1,t2); put_outbound_item(block); endtask endclass Get Transform Put 2 :1 Periodicity Accellera Systems Initiative 15
Inline Sequencing seq_item_port #(t_inbound_item) is_sequenced = TRUE inline_sqr is_active = UVM_ACTIVE seq_item_export #(t_outbound_item) Outbound items no longer directly controllable No possible input sequence to result in the desired output sequence Generally only an issue for stimulus generation Accellera Systems Initiative 16
Debug Hooks inbound_tap #(t_inbound_item) outbound_tap #(t_outbound_item) t_inbound_item port translate t_outbound_item port inbound_log outbound_log Optional Inbound/Outbound item analysis taps Optional Inbound/Outbound item logging Accellera Systems Initiative 17
Orthogonal Sequencing Accellera Systems Initiative 18
Control Knob Pollution X+Z X to Y Y+Z Y to Z Z Translator B Translator A 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 Accellera Systems Initiative 19
Control Knob Explosion W+X +Y +Z +C X+Y +Z Y+Z Z W+X +Y +Z +C X+C C Control Knobs accumulate with each link and with each usage context Accellera Systems Initiative 20
Orthogonal Sequencing X X to Y Y Y Control sequenced separately from Data X timed, Y timed or independent Accellera Systems Initiative 21
Dynamic Translation payload frame generator frames overhead Why be limited to Control Knobs for Error Insertion? Example: Encapsulation Accellera Systems Initiative 22
Adaptive Translation X X to Y Y Response Channel used to tune the Dynamic translation. Example: IPG requested vs IPG actual Accellera Systems Initiative 23
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 analysis_port #(t_high_abstraction) analysis path analysis_export #(t_low_abstraction) seq_item_port #(t_high_abstraction) stimulus path is_active seq_item_export #(t_low_abstraction) A Layer translates from low abstraction to high abstraction in the analysis path, AND from high abstraction to low abstraction in the stimulus path Accellera Systems Initiative 26
Layer Implementation optional one or more optional s s s is_active Accellera Systems Initiative 27
Layer Example Ethernet PCS ordered sets block lock packets RX RS TX RS mii DEC ENC blocks SHA BER bitstream link state + ipg slip/skip/flip Accellera Systems Initiative 28
Attachment Agents analysis_port #(t_low_abstraction) seq_item_port #(t_low_abstraction) Monitor Driver is_active low abstraction virtual interface An Attachment Agent is a Traditional Agent without a sequencer Accellera Systems Initiative 29
Chains zero or more analysis_port #(t_high_abstraction) L L L AA low abstraction virtual interface SQR is_active 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. Accellera Systems Initiative 30
Chainable Agents analysis_port #(t_low_abstraction) Sequencer Attachment Agent low abstraction virtual inteface is_active A Chainable Agent is a Chain with no Layers Degenerate case similar to a Traditional Agent Accellera Systems Initiative 31
Usage Contexts Accellera Systems Initiative 32
Edge Unit Context CA s AA EU Unit Level C s L L L AA EU Chip Level An Edge Unit has I/O exposed in both scopes The Attachment Agent is ported Accellera Systems Initiative 33
Internal Unit Context SC s L AA IU Unit Level C s L L L AA IU Chip Level An Internal Unit has no I/O exposed at the Chip The Layer is ported Accellera Systems Initiative 34
End Unit Context SC s L AA EU Unit Level Chip C L L L AA EU s Level rx tx An End Unit is the Internal Unit adjacent to the protocol divide The Layer and Sequencer is ported Accellera Systems Initiative 35
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
Questions David Cornfield dcornfield@apm.com Accellera Systems Initiative 38