Multilayered Architecture for PCI Express...

31
Multilayered Multilayered Architecture Architecture for for PCI Express PCI Express e e VC VC

Transcript of Multilayered Architecture for PCI Express...

Page 1: Multilayered Architecture for PCI Express eVCparadigm-works.com/wp-content/uploads/Multilayered... · 2015-03-19 · Multilayered Architecture for PCI Express eVC. Introduction Layering

Multilayered Multilayered ArchitectureArchitecture for for

PCI Express PCI Express eeVCVC

Page 2: Multilayered Architecture for PCI Express eVCparadigm-works.com/wp-content/uploads/Multilayered... · 2015-03-19 · Multilayered Architecture for PCI Express eVC. Introduction Layering

IntroductionIntroductionLayering is the new buzzword in eVCmethodologyThis presentation aims to explain why layering is importantWill use examples drawn from Paradigm Works eVCs

Page 3: Multilayered Architecture for PCI Express eVCparadigm-works.com/wp-content/uploads/Multilayered... · 2015-03-19 · Multilayered Architecture for PCI Express eVC. Introduction Layering

Traditional approach to Traditional approach to data generationdata generation

High level data structure with control fields for low level behaviour:

struct my_packet {header : my_header_s;payload : my_payload_s;parity_error_positions : list of uint;

};

Page 4: Multilayered Architecture for PCI Express eVCparadigm-works.com/wp-content/uploads/Multilayered... · 2015-03-19 · Multilayered Architecture for PCI Express eVC. Introduction Layering

TL Packet FormatTL Packet Format

Page 5: Multilayered Architecture for PCI Express eVCparadigm-works.com/wp-content/uploads/Multilayered... · 2015-03-19 · Multilayered Architecture for PCI Express eVC. Introduction Layering

DLL Packet FormatsDLL Packet Formats

Page 6: Multilayered Architecture for PCI Express eVCparadigm-works.com/wp-content/uploads/Multilayered... · 2015-03-19 · Multilayered Architecture for PCI Express eVC. Introduction Layering

PHY Layer Data ViewPHY Layer Data View

Page 7: Multilayered Architecture for PCI Express eVCparadigm-works.com/wp-content/uploads/Multilayered... · 2015-03-19 · Multilayered Architecture for PCI Express eVC. Introduction Layering

That’s a whole big bunch of fields

… and I didn’t even show much of the complexity

Page 8: Multilayered Architecture for PCI Express eVCparadigm-works.com/wp-content/uploads/Multilayered... · 2015-03-19 · Multilayered Architecture for PCI Express eVC. Introduction Layering

Single layer approach Single layer approach breaks downbreaks down

Difficult to control lower layer behaviour from high layer data structuresOften want to concentrate on lower-layer testingOften need control of behaviour between ‘packets’Often need to co-ordinate low and high level behaviour

Page 9: Multilayered Architecture for PCI Express eVCparadigm-works.com/wp-content/uploads/Multilayered... · 2015-03-19 · Multilayered Architecture for PCI Express eVC. Introduction Layering

Enter layeringEnter layeringLayering allows separation of control and observabilityShould break layers at natural boundaries for protocolLayering has only become viable as a result of introduction of eRMUse of eRM very important to get full advantages of layered approach

Page 10: Multilayered Architecture for PCI Express eVCparadigm-works.com/wp-content/uploads/Multilayered... · 2015-03-19 · Multilayered Architecture for PCI Express eVC. Introduction Layering

Requirements for Requirements for lowest layerlowest layer

Sequence driverhigher layers provide connector sequence(s)

Monitor (with scoreboard hooks)higher layers extend scoreboard hooks

In other words...Just a normal eRM compatible eVC

Page 11: Multilayered Architecture for PCI Express eVCparadigm-works.com/wp-content/uploads/Multilayered... · 2015-03-19 · Multilayered Architecture for PCI Express eVC. Introduction Layering

Requirements for Requirements for higher layershigher layers

Connector sequenceSequence kind of lower layer eVC

E.g. PW_ATM_ATM pw_utop_sequenceUsually extends pre_do() method of sequence to grab data from higher layerConstrain default lower layer sequence

Extension to lower layer scoreboard hook(s)

Used to extract data from lower layer eVC

Page 12: Multilayered Architecture for PCI Express eVCparadigm-works.com/wp-content/uploads/Multilayered... · 2015-03-19 · Multilayered Architecture for PCI Express eVC. Introduction Layering

More on higher layersMore on higher layersImportant distinction

Higher layer eVCs usually don’t have a physical (signal based) interfaceInstead, they provide a method based interface

Possible to have optional physical interface

Page 13: Multilayered Architecture for PCI Express eVCparadigm-works.com/wp-content/uploads/Multilayered... · 2015-03-19 · Multilayered Architecture for PCI Express eVC. Introduction Layering

Simple layering Simple layering exampleexample

atm_over_xserial_env

atm_env

agent

BFM

sequencedriver

seq

Tx MonRx Mon

xserial_env

agent

BFM

sequencedriver

seq

Tx MonRx Mon

connectorseq

Page 14: Multilayered Architecture for PCI Express eVCparadigm-works.com/wp-content/uploads/Multilayered... · 2015-03-19 · Multilayered Architecture for PCI Express eVC. Introduction Layering

Full Full Example:Example:

PCI PCI ExpressExpress

eeVCVC

SeqDriver

DUT (remote device)

eVC

Tx_0

Rx_n

TLPredictor

BFM

LocalTL

Monitor

RemoteTL

Monitor

SeqDriver

DLLPredictor

BFM

LocalDLL

Monitor

RemoteDLL

Monitor

TL Agent

DLL Agent

SeqDriver

LinkPredictor

BFM

LocalLink

Monitor

RemoteLink

Monitor

PHY_MAC AgentLink to Lane Mapping Interface

SeqDriver

LanePredictor

BFM

LocalLane

Monitor

RemoteLane

Monitor

Lane_Unit_0Lane_Unit_n

Signal Interface

Rx_0

Tx_n

Tx_0

Rx_0

SeqDriver

BFM

LocalDev

Monitor

RemoteDev

MonitorDev Agent(TLP gen/

mon)

LocalConfigAgent

RemoteConfigAgent

Page 15: Multilayered Architecture for PCI Express eVCparadigm-works.com/wp-content/uploads/Multilayered... · 2015-03-19 · Multilayered Architecture for PCI Express eVC. Introduction Layering

CoCo--ordinated testing ordinated testing ––Virtual sequencesVirtual sequences

Can build virtual sequences to control simultaneous behaviour across multiple layers.E.g. A stream of 100 TL packets with an LCRC error on 43rd packet.

Page 16: Multilayered Architecture for PCI Express eVCparadigm-works.com/wp-content/uploads/Multilayered... · 2015-03-19 · Multilayered Architecture for PCI Express eVC. Introduction Layering

ACTIVE SLAVE XSBI EnveVC

Signal interface

Monitor

TX XSBIAgent

BFM Monitor

RX XSBIAgentseq

driverseq

Monitor

TX XGMIIAgent

BFM Monitor

RX XGMIIAgentseq

driverseq

DUT

XSBI Master Ethernet Device(e.g. PCS layer device)

TxRx

BFM Monitor

RX PACKETAgentseq

driverseq

Monitor

TX PACKETAgent

Virtualsequencedriver

seq

Page 17: Multilayered Architecture for PCI Express eVCparadigm-works.com/wp-content/uploads/Multilayered... · 2015-03-19 · Multilayered Architecture for PCI Express eVC. Introduction Layering

More on Virtual More on Virtual SequencesSequences

Can also co-ordinate behaviour across multiple layers AND multiple eVCs.E.g.: Set up DMA transfer on PCI interface to receive Ethernet packet that has error in last XSBI block.

Page 18: Multilayered Architecture for PCI Express eVCparadigm-works.com/wp-content/uploads/Multilayered... · 2015-03-19 · Multilayered Architecture for PCI Express eVC. Introduction Layering

Agents for the Protocol Agents for the Protocol LayersLayers

PCIE eVC encapsulates each protocol layer as an “Agent”An Agent is a UnitAgent units are instantiated inside the envThe user has control over instantiation of agents via constraints on the envThere are standard components within each Agent

Sequence Drivers, Monitors, BFMs, Predictors

Page 19: Multilayered Architecture for PCI Express eVCparadigm-works.com/wp-content/uploads/Multilayered... · 2015-03-19 · Multilayered Architecture for PCI Express eVC. Introduction Layering

Contents of a PCIE Contents of a PCIE Protocol Layer AgentProtocol Layer Agent

Sequence DriverAPISupplied sequence library

PredictorBFM drives signals

Extensible for unique DUT interfaceMonitor

ProtocolScoreboard interfaceCoverageCompliance

ScoreboardSupplied for TL, Interfaces for other layers

Page 20: Multilayered Architecture for PCI Express eVCparadigm-works.com/wp-content/uploads/Multilayered... · 2015-03-19 · Multilayered Architecture for PCI Express eVC. Introduction Layering

Config AgentConfig AgentEvery bit of every PCIE spec registerTwo roles, instantiated twice by default

Provides eVC’s config regs (active: completions)Shadows DUT’s config regs (active & passive)

Auto shadowing on in-band config space accessUser must update for conditions detected by DUT & DUT back-side access

Method interface providedCan compare to DUT registersMACRO provided for adding user-defined regs

Page 21: Multilayered Architecture for PCI Express eVCparadigm-works.com/wp-content/uploads/Multilayered... · 2015-03-19 · Multilayered Architecture for PCI Express eVC. Introduction Layering

A Note on the Device A Note on the Device LayerLayer

Not a PCIE protocol layerModels the behavior of a PCIE device

Think of it as the Software LayerResponds to:

Memory reads/writesI/O reads/writes

Configurable Address spaceOther characteristics

Page 22: Multilayered Architecture for PCI Express eVCparadigm-works.com/wp-content/uploads/Multilayered... · 2015-03-19 · Multilayered Architecture for PCI Express eVC. Introduction Layering

Anatomy of a Single Anatomy of a Single PCIE Protocol LayerPCIE Protocol Layer

Seq Driver

TLPredictor

BFM

LocalTL

Monitor

RemoteTL

Monitor

TL Agent

Tx Rx Tx Rx

Rx

Page 23: Multilayered Architecture for PCI Express eVCparadigm-works.com/wp-content/uploads/Multilayered... · 2015-03-19 · Multilayered Architecture for PCI Express eVC. Introduction Layering

PHY_MAC AgentPHY_MAC Agent

…is a little different

Tx_0Rx_n

Seq Driver

LinkPredictor

BFM

LocalLink

Monitor

RemoteLink

Monitor

PHY_MAC Agent

Link to Lane Mapping Interface

Seq Driver

LanePredictor

BFM

LocalLane

Monitor

RemoteLane

Monitor

Lane_Unit_0

Lane_Unit_n

Signal Interface

Rx_0 Tx_n

Tx_0 Rx_0

Tx Rx Tx Rx

Tx Rx Tx Rx

Rx

Rx

Page 24: Multilayered Architecture for PCI Express eVCparadigm-works.com/wp-content/uploads/Multilayered... · 2015-03-19 · Multilayered Architecture for PCI Express eVC. Introduction Layering

The EnvThe EnvTop level unit of the eVC, inherits from any_envAgents within are created based on user configuration options

Default 3 agents: Transaction, Data Link and Physical layer agents

Each can be disabled with constraintsOther main fields:

Active/Passive modesLocal/Remote

Upstream/Downstream & Root/EndpointDevice layer presentBus & device identifiers

Page 25: Multilayered Architecture for PCI Express eVCparadigm-works.com/wp-content/uploads/Multilayered... · 2015-03-19 · Multilayered Architecture for PCI Express eVC. Introduction Layering

Ways to Use PCIE eVCWays to Use PCIE eVCActive or PassiveRoot Complex or EndpointComplete PCIE entity

PHY_MAC in PCIE mode1 bit or 10 bit

PHY_MAC in PIPE modeMaster or Slave (for PHY or MAC DUTs)8 bit or 16 bit

DLLTL2 config Agents – provide completions, verify DUT regs Device

Any subset

Page 26: Multilayered Architecture for PCI Express eVCparadigm-works.com/wp-content/uploads/Multilayered... · 2015-03-19 · Multilayered Architecture for PCI Express eVC. Introduction Layering

Passive Passive ModeMode

DUT

eVCLocal

TLMonitor

RemoteTL

Monitor

LocalDLL

Monitor

Remote DLLMonitor

TLAgent

DLLAgent

LocalLink

Monitor

RemoteLink

Monitor

PHY_MACAgent

Link to Lane Mapping Interface

LocalLane

Monitor

RemoteLane

Monitor

Lane_Unit_0

Lane_Unit_n

Signal InterfaceRx_0Tx_0

Root Complex(local device)

Endpoint(remote device)

Tx

Tx

Rx

Rx

Tx TxRx Rx

Tx Rx Tx Rx

Tx Rx Tx Rx

LocalConfigAgent

RemoteConfigAgent

Tx Rx Tx Rx

Tx Rx

Tx Rx

Tx Rx

Page 27: Multilayered Architecture for PCI Express eVCparadigm-works.com/wp-content/uploads/Multilayered... · 2015-03-19 · Multilayered Architecture for PCI Express eVC. Introduction Layering

Active Active Mode, Mode,

Full Full eeVCVC

SeqDriver

DUT (remote device)

eVC

Tx_0

Rx_n

TLPredictor

BFM

LocalTL

Monitor

RemoteTL

Monitor

SeqDriver

DLLPredictor

BFM

LocalDLL

Monitor

RemoteDLL

Monitor

TL Agent

DLL Agent

SeqDriver

LinkPredictor

BFM

LocalLink

Monitor

RemoteLink

Monitor

PHY_MAC AgentLink to Lane Mapping Interface

SeqDriver

LanePredictor

BFM

LocalLane

Monitor

RemoteLane

Monitor

Lane_Unit_0Lane_Unit_n

Signal Interface

Rx_0

Tx_n

Tx_0

Rx_0

SeqDriver

BFM

LocalDev

Monitor

RemoteDev

MonitorDev Agent(TLP gen/

mon)

LocalConfigAgent

RemoteConfigAgent

Page 28: Multilayered Architecture for PCI Express eVCparadigm-works.com/wp-content/uploads/Multilayered... · 2015-03-19 · Multilayered Architecture for PCI Express eVC. Introduction Layering

Active Mode, Module Test ExamplesActive Mode, Module Test Examples

TL/DLL DUT

DLLTL

DEV

eVC

DEV

PHY_MAC DUT

DLLTL

DEV

DLLTL

(Pipe)

PHY_MAC eVC

eVC

(Pipe)

(PCIE)

eVCDEV

Page 29: Multilayered Architecture for PCI Express eVCparadigm-works.com/wp-content/uploads/Multilayered... · 2015-03-19 · Multilayered Architecture for PCI Express eVC. Introduction Layering

Compliance UnitCompliance UnitRobust protocol checking in monitorsMapped to compliance checklist items

Hundreds implemented so far, more in progressBlack Box checksUser can extend for white box checksAll compliance checks are also coverage itemsCompliance reporting can be turned offPossible check result values:

YesNOT_EXERCISED

ERRORNOT_APPLICABLE

Page 30: Multilayered Architecture for PCI Express eVCparadigm-works.com/wp-content/uploads/Multilayered... · 2015-03-19 · Multilayered Architecture for PCI Express eVC. Introduction Layering

Log FilesLog Files3 built-in formats for different verbosity levels

Low, medium, highUser can add new formats, extend existing

Constraints on logfile name will control how messages are split up among filesextend INST_A DEV pw_pcie_monitor_u { keep

log_filename == appendf("PW_PCIE_%s_%s_DEV.log", name, monitor_kind);keep file_formatter.log_level == LOW;

};

Page 31: Multilayered Architecture for PCI Express eVCparadigm-works.com/wp-content/uploads/Multilayered... · 2015-03-19 · Multilayered Architecture for PCI Express eVC. Introduction Layering

SummarySummaryLayering solves complex test scenario problemsLayering will be necessary to solve tomorrows verification problems.Paradigm Works PCI Express eVC is the state-of-the-art layered eVCIt is easy to add functionality to a verification component if well designedIt is impossible to add usability and reusability to a verification component if it is not well designed!