the universal translator · the translation api •derivatives implement the translatetask calling:...

38
The Universal Translator David Cornfield [email protected] © Accellera Systems Initiative 1

Upload: others

Post on 22-Jul-2020

24 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: The Universal Translator · The Translation API •Derivatives implement the translatetask calling: get_inbound_item ( output t_inbound_item item ); try_inbound_item ( output t_inbound_item

The Universal Translator

David [email protected]

© Accellera Systems Initiative 1

Page 2: The Universal Translator · The Translation API •Derivatives implement the translatetask calling: get_inbound_item ( output t_inbound_item item ); try_inbound_item ( output t_inbound_item

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

Page 3: The Universal Translator · The Translation API •Derivatives implement the translatetask calling: get_inbound_item ( output t_inbound_item item ); try_inbound_item ( output t_inbound_item

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

?

Page 4: The Universal Translator · The Translation API •Derivatives implement the translatetask calling: get_inbound_item ( output t_inbound_item item ); try_inbound_item ( output t_inbound_item

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

Page 5: The Universal Translator · The Translation API •Derivatives implement the translatetask calling: get_inbound_item ( output t_inbound_item item ); try_inbound_item ( output t_inbound_item

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

Page 6: The Universal Translator · The Translation API •Derivatives implement the translatetask calling: get_inbound_item ( output t_inbound_item item ); try_inbound_item ( output t_inbound_item

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

Page 7: The Universal Translator · The Translation API •Derivatives implement the translatetask calling: get_inbound_item ( output t_inbound_item item ); try_inbound_item ( output t_inbound_item

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

Page 8: The Universal Translator · The Translation API •Derivatives implement the translatetask calling: get_inbound_item ( output t_inbound_item item ); try_inbound_item ( output t_inbound_item

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

Page 9: The Universal Translator · The Translation API •Derivatives implement the translatetask calling: get_inbound_item ( output t_inbound_item item ); try_inbound_item ( output t_inbound_item

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

Page 10: The Universal Translator · The Translation API •Derivatives implement the translatetask calling: get_inbound_item ( output t_inbound_item item ); try_inbound_item ( output t_inbound_item

The Translator Class

© Accellera Systems Initiative 10

Page 11: The Universal Translator · The Translation API •Derivatives implement the translatetask calling: get_inbound_item ( output t_inbound_item item ); try_inbound_item ( output t_inbound_item

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

Page 12: The Universal Translator · The Translation API •Derivatives implement the translatetask calling: get_inbound_item ( output t_inbound_item item ); try_inbound_item ( output t_inbound_item

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

Page 13: The Universal Translator · The Translation API •Derivatives implement the translatetask calling: get_inbound_item ( output t_inbound_item item ); try_inbound_item ( output t_inbound_item

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

Page 14: The Universal Translator · The Translation API •Derivatives implement the translatetask calling: get_inbound_item ( output t_inbound_item item ); try_inbound_item ( output t_inbound_item

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

Page 15: The Universal Translator · The Translation API •Derivatives implement the translatetask calling: get_inbound_item ( output t_inbound_item item ); try_inbound_item ( output t_inbound_item

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

Page 16: The Universal Translator · The Translation API •Derivatives implement the translatetask calling: get_inbound_item ( output t_inbound_item item ); try_inbound_item ( output t_inbound_item

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

Page 17: The Universal Translator · The Translation API •Derivatives implement the translatetask calling: get_inbound_item ( output t_inbound_item item ); try_inbound_item ( output t_inbound_item

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

Page 18: The Universal Translator · The Translation API •Derivatives implement the translatetask calling: get_inbound_item ( output t_inbound_item item ); try_inbound_item ( output t_inbound_item

Orthogonal Sequencing

© Accellera Systems Initiative 18

Page 19: The Universal Translator · The Translation API •Derivatives implement the translatetask calling: get_inbound_item ( output t_inbound_item item ); try_inbound_item ( output t_inbound_item

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’

Page 20: The Universal Translator · The Translation API •Derivatives implement the translatetask calling: get_inbound_item ( output t_inbound_item item ); try_inbound_item ( output t_inbound_item

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’

Page 21: The Universal Translator · The Translation API •Derivatives implement the translatetask calling: get_inbound_item ( output t_inbound_item item ); try_inbound_item ( output t_inbound_item

Orthogonal Sequencing

© Accellera Systems Initiative 21

• Control sequenced separately from Data

• X timed, Y timed or independent

X to YX Y

Y’

Page 22: The Universal Translator · The Translation API •Derivatives implement the translatetask calling: get_inbound_item ( output t_inbound_item item ); try_inbound_item ( output t_inbound_item

Dynamic Translation

© Accellera Systems Initiative 22

frame

generatorpayload frames

overhead

• Why be limited to Control Knobs for Error Insertion?

• Example: Encapsulation

Page 23: The Universal Translator · The Translation API •Derivatives implement the translatetask calling: get_inbound_item ( output t_inbound_item item ); try_inbound_item ( output t_inbound_item

Adaptive Translation

© Accellera Systems Initiative 23

X to YX Y

• Response Channel used to tune the Dynamic translation.

• Example: IPG requested vs IPG actual

Page 24: The Universal Translator · The Translation API •Derivatives implement the translatetask calling: get_inbound_item ( output t_inbound_item item ); try_inbound_item ( output t_inbound_item

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

Page 25: The Universal Translator · The Translation API •Derivatives implement the translatetask calling: get_inbound_item ( output t_inbound_item item ); try_inbound_item ( output t_inbound_item

The Layered Architecture

© Accellera Systems Initiative 25

Page 26: The Universal Translator · The Translation API •Derivatives implement the translatetask calling: get_inbound_item ( output t_inbound_item item ); try_inbound_item ( output t_inbound_item

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

Page 27: The Universal Translator · The Translation API •Derivatives implement the translatetask calling: get_inbound_item ( output t_inbound_item item ); try_inbound_item ( output t_inbound_item

Layer Implementation

© Accellera Systems Initiative 27

s s s

one or more

optional

optional

is_active

Page 28: The Universal Translator · The Translation API •Derivatives implement the translatetask calling: get_inbound_item ( output t_inbound_item item ); try_inbound_item ( output t_inbound_item

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

Page 29: The Universal Translator · The Translation API •Derivatives implement the translatetask calling: get_inbound_item ( output t_inbound_item item ); try_inbound_item ( output t_inbound_item

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)

Page 30: The Universal Translator · The Translation API •Derivatives implement the translatetask calling: get_inbound_item ( output t_inbound_item item ); try_inbound_item ( output t_inbound_item

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

Page 31: The Universal Translator · The Translation API •Derivatives implement the translatetask calling: get_inbound_item ( output t_inbound_item item ); try_inbound_item ( output t_inbound_item

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)

Page 32: The Universal Translator · The Translation API •Derivatives implement the translatetask calling: get_inbound_item ( output t_inbound_item item ); try_inbound_item ( output t_inbound_item

Usage Contexts

© Accellera Systems Initiative 32

Page 33: The Universal Translator · The Translation API •Derivatives implement the translatetask calling: get_inbound_item ( output t_inbound_item item ); try_inbound_item ( output t_inbound_item

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

Page 34: The Universal Translator · The Translation API •Derivatives implement the translatetask calling: get_inbound_item ( output t_inbound_item item ); try_inbound_item ( output t_inbound_item

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

Page 35: The Universal Translator · The Translation API •Derivatives implement the translatetask calling: get_inbound_item ( output t_inbound_item item ); try_inbound_item ( output t_inbound_item

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

Page 36: The Universal Translator · The Translation API •Derivatives implement the translatetask calling: get_inbound_item ( output t_inbound_item item ); try_inbound_item ( output t_inbound_item

Conclusion

© Accellera Systems Initiative 36

Page 37: The Universal Translator · The Translation API •Derivatives implement the translatetask calling: get_inbound_item ( output t_inbound_item item ); try_inbound_item ( output t_inbound_item

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

Page 38: The Universal Translator · The Translation API •Derivatives implement the translatetask calling: get_inbound_item ( output t_inbound_item item ); try_inbound_item ( output t_inbound_item

Questions

© Accellera Systems Initiative 38

David [email protected]