CXL Subsystem SVT Uvm User Guide
CXL Subsystem SVT Uvm User Guide
VC Verification IP
CXL Subsystem UVM
User Guide
Version R-2021.03-1, March 2021
Copyright Notice and Proprietary Information
2021 Synopsys, Inc. All rights reserved. This Synopsys software and all associated documentation are proprietary to Synopsys,
Inc. and may only be used pursuant to the terms and conditions of a written license agreement with Synopsys, Inc. All other use,
reproduction, modification, or distribution of the Synopsys software or the associated documentation is strictly prohibited.
www.synopsys.com
VC VIP CXL Subsystem
UVM User Guide Contents
Contents
Preface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
About This Manual . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
Web Resources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
Customer Support . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
Synopsys Statement on Inclusivity and Diversity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
Chapter 1
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
1.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
1.2 CXL Subsystem Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
1.2.1 Verification Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
1.2.2 Protocol Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
1.2.3 LPIF Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
1.3 Limitations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
Chapter 2
Installation and Licensing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
2.1 Installing the Product . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
2.2 Installing and Running Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
2.2.1 Installing the Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
2.2.2 Running the Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
2.3 Licensing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
2.4 Updating an Existing Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
Chapter 3
General Concepts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
3.1 High Level Architecture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
3.1.1 PCIE VIP with Gen5 APN and CXL.io Link and Transaction Layer . . . . . . . . . . . . . . . . . . . . . . 30
3.1.2 CXL.cache/CXL.mem Link and Transaction Layer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
3.1.3 CXL ARB/MUX component . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
3.1.4 Flex Bus and Physical Layer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
3.2 UVM Components of the CXL Subsystem Environment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
3.2.1 UVM Component for CXL Agents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
3.3 Sequencers and Sequence APIs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
3.3.1 Sequencers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
3.3.2 Sequence APIs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
3.4 Configuration Data Objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
3.4.1 CXL Subsystem Configuration Data Objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
3.5 Status Data Objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
3.5.1 CXL Subsystem Status Data Objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
Feedback
Synopsys, Inc. 3
Contents VC VIP CXL Subsystem
UVM User Guide
Feedback
4 Synopsys, Inc.
VC VIP CXL Subsystem
UVM User Guide Contents
Chapter 4
CXL Subsystem Verification Topologies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81
4.1 Verification Requirements - - Supported CXL Device Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81
4.1.1 CXL Subsystem VIP as Type 1 Device: . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81
4.1.2 CXL Subsystem VIP as Type 2 Device . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83
4.1.3 CXL Subsystem VIP as Type 3 Device . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84
4.2 Verification Requirement - Supported Topologies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86
4.2.1 Topology 1: Connect DUT and VIP at PCIE PIPE/ Serial . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89
4.2.2 Topology 2: Connect DUT and VIP at ARB MUX (TLM/ LPIF/ Proprietary) . . . . . . . . . . . . . . 90
4.2.3 Topology 3: Connect DUT and VIP Link Layer Signalling (TLM/ LPIF/ Proprietary) . . . . . . 92
4.2.4 Running CXL Subsystem VIP example Test Cases with Topology #3 . . . . . . . . . . . . . . . . . . . . . 92
4.2.5 Topology 4: Connect DUT and VIP at Transaction Layer Signalling (TLM/Proprietary) . . . . 93
Chapter 5
CXL Application Layer Agent . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95
5.1 Agent Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95
5.2 User API of CXL Subsystem Application . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96
Chapter 6
CXL.io Agent . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97
6.1 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97
6.2 Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101
6.3 Status . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102
6.4 Sequencers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 104
6.5 Sequences . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 108
6.6 APIs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109
Chapter 7
CXL.mem and CXL.cache Agent . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111
7.1 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111
7.1.1 CXL.mem and CXL.cache Agent . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111
7.1.2 Classes and Applications for Using CXL.mem/cache Component . . . . . . . . . . . . . . . . . . . . . . 112
7.2 Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113
7.3 Status . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 114
7.4 Sequencers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 116
7.4.1 Description of CXL Cache/mem Sequencers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 118
7.5 Sequences . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 119
7.6 APIs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 120
7.7 Auto/Default Response Sequence Support . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 122
7.7.1 GO-Err/GO-Err-WritePull Response . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 123
7.8 Backdoor Access to Memcore (Memory Core) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 123
7.8.1 Initialize Memory Content Through Backdoor Access . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 123
7.8.2 Accessing the Memory Content Through Backdoor Mechanisms like Peek/Poke . . . . . . . . . 124
Chapter 8
CXL ARB/MUX Agent . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 125
8.1 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 125
8.1.1 Agent Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 125
8.1.2 Classes and Applications for Using ARB/MUX Component . . . . . . . . . . . . . . . . . . . . . . . . . . . 127
8.2 Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 128
8.3 Status . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 129
Feedback
Synopsys, Inc. 5
Contents VC VIP CXL Subsystem
UVM User Guide
Chapter 9
Logical PHY Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 137
9.1 Logical PHY Interface (LPIF) Use Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 137
9.1.1 LPIF Usage Modes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 137
9.2 Integration Steps . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 137
9.2.1 Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 137
9.2.2 Generation of LPIF Agent . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 137
9.3 LPIF Example Testbench . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 138
9.4 LPIF Protocol Checks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 138
9.4.1 LPIF Protocol Check Coverage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 140
9.5 LPIF Service Requests . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 140
9.6 LPIF XCHECK . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 140
9.7 LPIF Specification Version 1.1 Support . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 141
9.8 HVP Plans details . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 141
9.8.1 CXL Cache/Mem HVP Plans . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 144
Chapter 10
Debug Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 147
10.1 CXL.cache/mem Transaction Logger . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 148
10.1.1 Printing CXL.cache/mem Transaction Data into Log file . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 148
10.1.2 Fields of the CXL.cache/mem Transaction Log Header . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 148
10.2 CXL.io Transaction Logger . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 151
10.2.1 Printing CXL.io Transaction Data into Log File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 151
10.2.2 Fields of the Transaction Log Header . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 151
10.3 CXL.io Flit Logger . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 157
10.3.1 Printing CXL.io Flit handshaking into Log File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 157
10.3.2 Fields of the CXL.io Flit Log Header . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 157
10.4 ARB/MUX Transaction Logger . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 157
10.4.1 Printing Mem Transaction Data into Transaction Log File . . . . . . . . . . . . . . . . . . . . . . . . . . . . 157
10.4.2 Fields of the ARB/MUX Transaction Log Header . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 158
10.5 Symbol Logger . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 161
10.5.1 Printing Transmitted and Received symbols into Symbol Log File . . . . . . . . . . . . . . . . . . . . . 161
10.5.2 Fields of the Symbol Log Header . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 161
10.5.3 Special Encodings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 162
10.5.4 Special Messages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 163
10.5.5 Synchronization of Simulation Time Between Transaction Log and Symbol Log . . . . . . . . . 163
Feedback
6 Synopsys, Inc.
VC VIP CXL Subsystem
UVM User Guide
Preface
Web Resources
❖ Documentation through SolvNet: https://solvnetplus.synopsys.com (Synopsys password required)
❖ Synopsys Common Licensing (SCL): http://www.synopsys.com/keys
Customer Support
To obtain support for your product, choose one of the following:
1. Go to https://solvnetplus.synopsys.com and open a case.
Enter the information according to your environment and your issue.
2. Send an e-mail message to [email protected].
Include the Product name, Sub Product name, and Tool Version in your e-mail so it can be routed
correctly.
3. Telephone your local support center.
✦ North America:
Call 1-800-245-8005 from 7 AM to 5:30 PM Pacific time, Monday through Friday.
✦ All other countries:
http://www.synopsys.com/Support/GlobalSupportCenters
Feedback
Synopsys, Inc. 7
Preface VC VIP CXL Subsystem
UVM User Guide
Feedback
8 Synopsys, Inc.
VC VIP CXL Subsystem
UVM User Guide
1
Introduction
1.1 Introduction
This guide describes the use model and high-level architecture of the CXL Subsystem solution for a
Compute Express Link (CXL) based system.
These are the specification references:
❖ Compute Express Link Specification: 20190701_ComputeExpressLink_Specification_r1p1.pdf
Revision 1.1 (June 2019)
❖ Compute Express Link Specification: CXL
Specification_rev2p0_ver1p0_2020Oct26_clean_Approved.pdf
❖ Logical PHY Interface (LPIF) Specification - LPIF 1.0 (March 23, 2019)
✦ Contact Synopsys for LPIF 1.1 specification information.
❖ PCIe Base specification Gen5 v1.0: NCB-PCI_Express_Base_5.0r1.0-2019-05-22.pdf
✦ Key interest: Gen5 and Alternate Protocol Negotiation (APN)
❖ PIPE Specification: phy-interface-pci-express-sata-usb30-architectures-3.1_v5_1_1.pdf
✦ Key interest: SerDes Arch features
Feedback
Synopsys, Inc. 9
Introduction VC VIP CXL Subsystem
UVM User Guide
Feedback
10 Synopsys, Inc.
VC VIP CXL Subsystem
UVM User Guide Introduction
Feedback
Synopsys, Inc. 11
Introduction VC VIP CXL Subsystem
UVM User Guide
Chapter 4 CXL Link Layer: Note1 - 32-byte support for mem traffic is
CXL.io - not present (32-byte support for cache
• PCIe Data Link Layer as the link layer of traffic exists)
CXL.io
CXL.mem and CXL.cache Common Link
Layer -
• Link Layer Registers
• Flit Packing Rules
• Link Layer Control Flit
• Link Layer Initialization
• CXL.cache/ CXL.mem Link Layer Retry
• CXL.cache-Side Poison and Viral
Roadmap items*:
• LinkError/LinkDisable
• DAPM
Chapter 6 Flex Bus Physical Layer: Note 1 - Flits with implied EDS can be seen
• Flex Bus.CXL Framing and Packet only with Null flit (with implied EDS).
Layout CXL.IO / Cache.Mem / ARB-MUX flits are
• Link Training currently not supported for implied EDS.
• Recovery.Idle and Config.Idle
Transactions to L0 Note 2 - L1 Abort Scenario is currently not
• L1 Abort Scenario supported.
• Retimers and Low Latency Mode
Chapter 7 Control and Status Registers: Note 1: VIP configuration and status class
• Configuration Space Registers provide attribute to configure for desired
• Memory Mapped Registers operation & report status
• CXL RCRB Base Register Roadmap item* - Hooks for Control and
Status Registers management, control and
verification
Feedback
12 Synopsys, Inc.
VC VIP CXL Subsystem
UVM User Guide Introduction
Chapter 11 Reliability, Availability and Serviceability Note 1: Error injection through Callbacks
• Supported RAS Features (CXL.io -TL/DL, CXL.Cache/mem -
• Link CRC and Retry, Link Retraining and DL/ARBMux)
Recovery, eDPC, ECRC, Hot-Plug,
Corrected Error Count Information, Data Note 2: CXL subsystem VIP does not
Poisoning, Viral
support dropping of write data upon
• CXL Error Handling detection of viral.
• CXL Link Down Handling Roadmap item* -: Generation and handling
• CXL Viral Handling of AER
• CXL Error Injection
Feedback
Synopsys, Inc. 13
Introduction VC VIP CXL Subsystem
UVM User Guide
Section 1.3-1.8 • Interface reset requirements Note1 - All mandatory features are
• Exit clock gating mechanism supported except mid-sim reset.
• Data Transfer & Stall mechanism Note2 - Support for CXL.$ (CXL.io,
• Stream ID rules CXL.mem & CXL.cache)
• LPIF Request and Status
Section 1.22 Support for Pipelining Note - VIP works with DUT having
• Insertion of staging buffers pipelining support.
• logPHY implementation for pipelining
Feedback
14 Synopsys, Inc.
VC VIP CXL Subsystem
UVM User Guide Introduction
Section 1.24 Support for CXL All features are supported for CXL
• CXL over Flexbus logPHY
• L0s support
• LTSSM to LPIF state mappings
1.3 Limitations
These features are not supported in this release of CXL Subsystem:
❖ Passive mode
❖ CXL functional coverage
❖ Entry/Exit for L2
Feedback
Synopsys, Inc. 15
Introduction VC VIP CXL Subsystem
UVM User Guide
Feedback
16 Synopsys, Inc.
VC VIP CXL Subsystem
UVM User Guide
2
Installation and Licensing
❖ Set DESIGNWARE_HOME to the absolute path where Synopsys CXL subsystem VIP needs to be
installed:
setenv DESIGNWARE_HOME <absolute_path_to_designware_home>
❖ Execute the .run file by invoking its filename. For example,
vip_cxl_subsystem_svt_<version>.run --dir $DESIGNWARE_HOME.
Feedback
Synopsys, Inc. 17
Installation and Licensing VC VIP CXL Subsystem
UVM User Guide
The VIP is unpacked, and all the files and directories are installed under the path specified by the
DESIGNWARE_HOME environment variable. The .run file can be executed from any directory. The important
step is to set the DESIGNWARE_HOME environment variable before executing the .run file.
Once the .run file is extracted, you can see the following directories inside the DESIGNWARE_HOME.
The CXL (which is a combination of 3 products - PCIe, CXL and CXL subsystem) gets installed inside the
VIP directory.
After extracting the .run file, you can see the following directories inside VIP directory.
❖ common: This contains the VIP common files and Synopsys Common Licensing files.
❖ svt: svt is set of base classes and library which are created on top of UVM/OVM/VMM
methodologies. All Synopsys VIP's share a common structure and agents, environments, sequencers
are designed in such a way that the VIP conveniently supports all three methodologies.
Feedback
18 Synopsys, Inc.
VC VIP CXL Subsystem
UVM User Guide Installation and Licensing
❖ examples: Each VIP includes example testbenches. The dw_vip_setup utility adds them in this
directory, along with a script for simulation. If an example testbench is specified on the command
line, this directory contains all files required for model, suite, and system testbenches.
Feedback
Synopsys, Inc. 19
Installation and Licensing VC VIP CXL Subsystem
UVM User Guide
❖ include: This contains language-specific include files. This directory "include/sverilog" is specified
in simulator commands to locate model files.
❖ src: Synopsys-specific include files This directory "src/sverilog/vcs" must be included in the
simulator command to locate model files.
The example would get installed under:
<design_dir>/examples/sverilog/cxl_subsystem_svt/tb_cxl_subsystem_uvm_basic_sys
❖ Go inside the example and run the example (using the command mentioned in next step)
%cd <design_dir>/examples/sverilog/cxl_subsystem_svt/tb_cxl_subsystem_uvm_basic_sys
Here, you can find three directories named 'env', 'tests', 'dut'
You must use the svt_cxl_subsystem.uvm.pkg package, if the top-level environment that is
Note instantiated in the testbench is svt_cxl_subsystem_env.
Feedback
20 Synopsys, Inc.
VC VIP CXL Subsystem
UVM User Guide Installation and Licensing
Note: These three option files would be used when using the Makefile options to run the simulation:
vcs_build_options: This file contains the compilation options when using the VCS simulator
vcs_build_options_with_aes: This file contains the compilation options for the VCS simulator to include
ELLIPSYS library files when using CXL IDE feature
vcs_elab_options*: This file contains the elaboration options when using the VCS simulator
sim_build_options : This file contains the compile time options to be picked up irrespective of the simulator
used
sim_run_options : This file contains the Run time options to be picked up irrespective of the simulator
used
ncv_build_options: This file contains the compilation options when using the Xcelium simulator
ncv_run_options* : This file contains the runtime options when using the Xcelium simulator
mti_build_options: This file contains the compilation options when using the MTI simulator
The following are the topology files available as part of the example. These files contain the topology
specific information (Creating the VIP instances and connecting them back to back)
❖ topology_snps_vip_cxl_b2b.svi
❖ topology_snps_vip_cxl_b2b_lpif.svi
❖ topology_snps_vip_cxl_io_dl_b2b.svi
These are the compile files available as part of the example. These compile files are used to manage the
components to be enabled and the interface to be used for the connection
Compile file related to Full Stack topology:
Feedback
Synopsys, Inc. 21
Installation and Licensing VC VIP CXL Subsystem
UVM User Guide
❖ compile_snps_vip_pcie_serial.f
❖ compile_snps_vip_cxl_io_only_pcie_pipe.f
❖ compile_snps_vip_cxl_io_only_pcie_serial.f
Compile files related to LPIF topology:
❖ compile_snps_vip_io_lpif.f
❖ compile_snps_vip_cache_mem_only_dl_tl_lpif.f
❖ compile_snps_vip_cache_mem_lpif.f
For more information of the above topology files and/or compiles files (and for the
Note description about the HDL Interconnect Macros used in topology files and compile options
used in compile files) refer to the following section in VC Verification IP CXL Subsystem VIP
DUT Integration guide
Feedback
22 Synopsys, Inc.
VC VIP CXL Subsystem
UVM User Guide Installation and Licensing
env/ : All the environment related files are present inside the env directory. The following files and
directories are present inside this directory.
svt_cxl_subsystem_base_test.sv - This is the base test. It will instantiate all the required objects like
agents, env, configuration and status required for using the CXL Subsystem VIP. This will also contain the
basic configurations required to configure the Subsystem VIP
svt_cxl_subsystem_basic_env.sv -
hdl_interconnect_macros.sv - This will contain implementation of all the HDL Interconnect macros. These
macros will be used in topology file for creating VIP instances and for connecting signals.
Feedback
Synopsys, Inc. 23
Installation and Licensing VC VIP CXL Subsystem
UVM User Guide
svt_cxl_subsystem_ts_env.pkg - This env package file includes all other files present in env directory.
svt_cxl_subsystem_test_suite_utils.svi* - This file is a container for all complex macros which are used at
multiple places to reduce lines of code.
svt_cxl_subsystem_user_defines.svi - This file contains the definition of user defines present in this
testbench
svt_cxl_dispatch_connector.sv - This files contains a connector class which is of type generic and used to
connect dispatch sequencer of a 'local' VIP to blocking put port of a 'remote' VIP in a typical back to back
testbench setup
The following files include the test cases specific to that component
❖ cxl_cache_mem_testlist.svi - This file includes CXL.cache/mem test cases
❖ cxl_io_testlist.svi - This file includes CXL.io test cases
❖ cxl_lpif_testlist.svi* - This file includes CXL LPIF test cases
svt_cxl_subsystem_ts_sequence_collection.svi - This file includes all the sequence collection lists present
inside env/seq_and_cb directory.
seq_and_cb/ - This directory contains all the sequences and sequence collection lists present as part of the
example - cxl_subsystem_svt/tb_cxl_subsystem_uvm_basic_sys
Possible usage scenarios with valid combinations of topology and compile files are present in
Chapter 4 CXL Subsystem Verification Topologies.
You can also invoke the command gmake help to show more options.
Feedback
24 Synopsys, Inc.
VC VIP CXL Subsystem
UVM User Guide Installation and Licensing
Feedback
Synopsys, Inc. 25
Installation and Licensing VC VIP CXL Subsystem
UVM User Guide
+define+SYNOPSYS_SV
+incdir+<testbench_dir>/examples/sverilog/cxl_subsystem_svt/tb_cxl_subsystem_uvm_basic_
sys/. \
+incdir+<testbench_dir>/examples/sverilog/cxl_subsystem_svt/tb_cxl_subsystem_uvm_basic_
sys/../../env \
+incdir+<testbench_dir>/examples/sverilog/cxl_subsystem_svt/tb_cxl_subsystem_uvm_basic_
sys/../env \
+incdir+<testbench_dir>/examples/sverilog/cxl_subsystem_svt/tb_cxl_subsystem_uvm_basic_
sys/env \
+incdir+<testbench_dir>/examples/sverilog/cxl_subsystem_svt/tb_cxl_subsystem_uvm_basic_
sys/dut \
+incdir+<testbench_dir>/examples/sverilog/cxl_subsystem_svt/tb_cxl_subsystem_uvm_basic_
sys/hdl_interconnect \
+incdir+<testbench_dir>/examples/sverilog/cxl_subsystem_svt/tb_cxl_subsystem_uvm_basic_
sys/lib \
+incdir+<testbench_dir>/examples/sverilog/cxl_subsystem_svt/tb_cxl_subsystem_uvm_basic_
sys/tests \
-o ./output/simvcssvlog -f top_files -f hdl_files
For VIPs with dependency, include the +incdir+ for each dependent VIP.
Note
2.3 Licensing
CXL 2.0 Subsystem features can be enabled by the following license features:
❖ SUB-CXL20-SVT (or)
❖ VIP-LIBRARY2019-SVT+SUB-CXL20-EA-SVT (Library license must be present to use EA key)
CXL 1.1 Subsystem features can be enabled by following license feature:
❖ SUB-CXL-SVT / VIP-LIBRARY2019-SVT
To debug license issues, you can capture the SLI information into a log file by following these steps:
Step1: Set the following environment variables to capture the SLI information.
setenv FLEXLM_DIAGNOSTICS 5
setenv SLI_DEBUG_SERVER 1
setenv SLI_DEBUG_CLIENT 1
Step2: Generate the lic.log using the following command along with the gmake.
gmake .. |&tee lic.log
If you face any license issue, open a case over SolvNetPlus to obtain Synopsys VIP Support.
Feedback
26 Synopsys, Inc.
VC VIP CXL Subsystem
UVM User Guide Installation and Licensing
Feedback
Synopsys, Inc. 27
Installation and Licensing VC VIP CXL Subsystem
UVM User Guide
Feedback
28 Synopsys, Inc.
VC VIP CXL Subsystem
UVM User Guide
3
General Concepts
Feedback
Synopsys, Inc. 29
General Concepts VC VIP CXL Subsystem
UVM User Guide
3.1.1 PCIE VIP with Gen5 APN and CXL.io Link and Transaction Layer
The PCIe VIP link and transaction layer is enhanced to handle the CXL.io protocol messages.
The CXL VIP autonomously negotiates CXL by sending Modified TS Ordered Sets advertising Alternate
Protocol during configuration states.
Feedback
30 Synopsys, Inc.
VC VIP CXL Subsystem
UVM User Guide General Concepts
The class reference for VC Verification IP for CXL Subsystem is available at:
Note
$DESIGNWARE_HOME/vip/svt/cxl_subsystem_svt/latest/doc/cxl_subsystem_svt_uv
m_public/html/index.html
Feedback
Synopsys, Inc. 31
General Concepts VC VIP CXL Subsystem
UVM User Guide
Feedback
32 Synopsys, Inc.
VC VIP CXL Subsystem
UVM User Guide General Concepts
3.3.1 Sequencers
Each component in the agent has its own service sequencer. All SVT sequences are derived from
uvm_sequence. Sequences or individual sequence items are executed on the appropriate sequencer.
svt_cxl_subsystem_sequencer: This class is the UVM System sequencer class. Top level virtual sequencer
which can be used to control all of the CXL.io/cache/mem and ARB-MUX/LPIF sequencers present in the
CXL Subsystem.
Feedback
Synopsys, Inc. 33
General Concepts VC VIP CXL Subsystem
UVM User Guide
svt_cxl_subsystem_sequencer
|
|--------> cxl_io_virt_seqr[] (type= svt_pcie_device_virtual_sequencer)
|
|--------> arb_mux_virt_seqr[] (type= svt_cxl_arb_mux_virtual_sequencer)
|
|--------> lpif_virt_seqr[]) (type= svt_cxl_lpif_virtual_sequencer)
|
|-------> subsystem_app_virt_seqr[] (type= svt_cxl_subsystem_app_virtual_sequencer)
|
|--------> cache_mem_system_seqr (type= svt_cxl_system_virtual_sequencer)
|
|----------> cache_mem_virt_seqr (type= svt_cxl_virtual_sequencer)
Feedback
34 Synopsys, Inc.
VC VIP CXL Subsystem
UVM User Guide General Concepts
svt_cxl_tl_req_sequencer This class is UVM Sequencer that provides stimulus for the
svt_cxl_tl_driver class. The svt_cxl_tl_agent
class is responsible for connecting this sequencer to the
driver if the agent is configured as UVM_ACTIVE.
Feedback
Synopsys, Inc. 35
General Concepts VC VIP CXL Subsystem
UVM User Guide
Feedback
36 Synopsys, Inc.
VC VIP CXL Subsystem
UVM User Guide General Concepts
You can refer the VC Verification IP for CXL Subsystem class reference available at:
Note
$DESIGNWARE_HOME/vip/svt/cxl_subsystem_svt/latest/doc/cxl_subsystem_svt_uvm_public/html/s
equences/class_svt_cxl_subsystem_virtual_api_collection_sequence.html
Feedback
Synopsys, Inc. 37
General Concepts VC VIP CXL Subsystem
UVM User Guide
Configuration data objects are abstracted data objects that represent the content of CXL VIP configuration
data and protocol transactions. The top-level configuration data objects are:
svt_cxl_subsystem_link_configuration is used to encapsulate host and device configuration
information.
Feedback
38 Synopsys, Inc.
VC VIP CXL Subsystem
UVM User Guide General Concepts
svt_cxl_subsystem_link_configuration(cust_cfg)
|
|------>svt_cxl_subsystem_configuration(host_cfg/device_cfg)
|
|--------> cxl_io_cfg[] (type= svt_pcie_device_configuration)
|
|--------> arb_mux_cfg[] (type= svt_cxl_arb_mux_configuration)
|
|--------> lpif_cfg[] (type= svt_cxl_lpif_configuration)
|
|--------> subsystem_app_cfg[] (type= svt_cxl_subsystem_app_configuration)
|
|--------> cache_mem_sys_cfg (type= svt_cxl_system_configuration)
|
|----------> host_cfg/device_cfg (type= svt_cxl_cache_mem_configuration)
Feedback
Synopsys, Inc. 39
General Concepts VC VIP CXL Subsystem
UVM User Guide
svt_cxl_subsystem_link_configuration cust_cfg(user_cfg)
Note : <user_cfg> is the configuration attribute handle name which is given by user.
Class user_base_test extends svt_cxl_subsystem_base_test;
/**
* Instance of CXL Subsytem native system environment
*/
svt_cxl_subsystem_env env;
/**
* Instance of CXL Subsytem native system configuration
*/
svt_cxl_subsystem_link_configuration cust_cfg;
virtual function void build_phase( uvm_phase phase );
/** Create the configuration object required for this test */ This create object of CXL
VIP configuration
cust_cfg = svt_cxl_subsystem_link_configuration ::type_id::create("cust_cfg");
endfunction
endclass
Accessing CXL.io or cache/mem Configuration
These can be accessed through below hierarchy.
cust_cfg.host_cfg.cxl_io_cfg[i].apn_mode != svt_pcie_types::APN_PCIE_TLP_DLLP_ONLY
cust_cfg.device_cfg.cache_mem_sys_cfg.device_cfg[i].device_type
=svt_cxl_cache_mem_configuration::TYPE2_DEVICE;
cache_mem_sys_cfg -> is a common handle to cache and mem blocks of VIP. This can accessed as
explained above in a hierarchical manner. For more details, refer to respective chapter 6.2 Configurations
cachemem section.
Example of configuration attributes usage in CXL subsystem
The following illustration shows the inheritance diagram for the svt_pcie_device_configuration
configuration objects. CXL subsystem can be programmed as a Host or a Device.
svt_cxl_subsystem_configuration::set_subsystem_type(subsystem_type_enum subsystem_type)
❖ Setup CXL subsystem as CXL.io, Cache.mem with ARB MUX, Cache.mem & PCIE Only.
svt_cxl_subsystem_configuration::configure_subsystem(subsystem_type_enum);
❖ Set existing or user-created PCIe VIP configuration handle
svt_cxl_subsystem_configuration::set_cxl_io_cfgs(svt_pcie_device_configuration)
❖ Enable/Setup APN negotiation of PCIe VIP. It also sets APN capabilities for Flex bus support.
svt_cxl_subsystem_configuration::configure_flex_bus(common_clk, sync_header_bypass,
retimer_1_aware, retimer_2_aware, pcie_cxl_capables , vendor_id );
Feedback
40 Synopsys, Inc.
VC VIP CXL Subsystem
UVM User Guide General Concepts
❖ To peform APN negotiation in CXL mode, "configure_flex_bus" API can be used directly after the
specification version is set using "set_spec_ver" API. This allows to configure different settings of
flexbus
/** Configure PCIe APN capabilities for Flex bus operation for both host and device flex
bus */
cust_cfg.host_cfg.configure_flex_bus(0,0,0,0);
cust_cfg.device_cfg.configure_flex_bus(0,0,0,0);
OR
cust_cfg.host_cfg.configure_flex_bus(1,1,0,0);// common_clk enabled with
sync_header_bypass feature
cust_cfg.device_cfg.configure_flex_bus(1,1,0,0);// common_clk enabled with
sync_header_bypass feature
To enable and wait for link up of flexbus, wait_for_flexbus_linkup API can be used available inside
svt_cxl_subsystem_virtual_api_collection_sequence.
For the usage of the configurations related to CXL.io, you can refer the section 5.2 Configuration, for
CXL.cache.mem configurations, refer to the section 6.2 Configurations and for ARB/MUX configurations
refer to the section 7.2 Configurations.
Feedback
Synopsys, Inc. 41
General Concepts VC VIP CXL Subsystem
UVM User Guide
Feedback
42 Synopsys, Inc.
VC VIP CXL Subsystem
UVM User Guide General Concepts
Feedback
Synopsys, Inc. 43
General Concepts VC VIP CXL Subsystem
UVM User Guide
Feedback
44 Synopsys, Inc.
VC VIP CXL Subsystem
UVM User Guide General Concepts
set_dut_type(`SVT_CXL_SUBSYSTEM_TEST_CONFIGURATION_TYPE::VIP_DUT,svt_cxl_subsystem_confi
guration::HOST_SUBSYSTEM)
❖ set_cxl_subsytem_env_host_cfg: API to setup Host side of Subsystem. For example, the
following configuration does the setup on Host side in full stack topology.
cust_cfg.set_cxl_subsystem_env_host_cfg(0,svt_cxl_subsystem_configuration::IO_TL_DL_ONLY
_STACK);
❖ set_cxl_subsytem_env_device_cfg: API to setup the Device side of Subsystem. For example, the
following configuration does the setup on device side for full stack topology.
cust_cfg.set_cxl_subsystem_env_device_cfg(1,svt_cxl_subsystem_configuration::IO_TL_DL_ON
LY_STACK);
Internally these APIs reuse the Subsystem APIs to setup the Host side.
For example: set_subsystem_type and configure_subsystem APIs.
Refer the CXL Class reference guide for details of these APIs.
In the case of CXL.io enabled topologies, you need to take care of the VIP instance.
Note
Here is a glimpse of protocol check table. You can select the Group as LPIF to see all the available checks.
For specific features, you can selec the Sub Group. For example, here selected sub group is "Active State
Rules". You can see all the available checks under this category. The details of every check are present in
Reference and Description column.
Feedback
Synopsys, Inc. 45
General Concepts VC VIP CXL Subsystem
UVM User Guide
Also you can select a particular instance name and the hyperlink will take you to the instance description.
You will find below fields there:
❖ Check Description - Describes which signal/cfg VIP checks to trigger the protocol checker
❖ Pass condition - How should the signal/cfg behave to pass the checker
❖ Fail condition - How should the signal/cfg behave to fail the checker
❖ Applicable device type - DUT type for which the checker is valid
❖ Additional information - Any VIP related parameters which can trigger the checker.
For example, refer below snippet:
Feedback
46 Synopsys, Inc.
VC VIP CXL Subsystem
UVM User Guide General Concepts
It is must to get the cfg (using get_cfg) and clone it first before applying the changes using
Note reconfiguration.
Feedback
Synopsys, Inc. 47
General Concepts VC VIP CXL Subsystem
UVM User Guide
Feedback
48 Synopsys, Inc.
VC VIP CXL Subsystem
UVM User Guide General Concepts
cache_mem_sys_cfg =
svt_cxl_system_configuration::type_id::create("cache_mem_sys_cfg");
`endif
`ifdef SVT_VMM_TECHNOLOGY
host_cfg = svt_cxl_subsystem_configuration::create_instance(this, "host_cfg",
`__FILE__, `__LINE__);
host_cfg.log.set_instance($sformatf("%s.host_cfg", log.get_instance()));
this.log.is_above(host_cfg.log);
`else
host_cfg = svt_cxl_subsystem_configuration::type_id::create("host_cfg");
`endif
host_cfg.cache_mem_sys_cfg = this.cache_mem_sys_cfg;
`ifdef SVT_VMM_TECHNOLOGY
device_cfg = svt_cxl_subsystem_configuration::create_instance(this, "device_cfg",
`__FILE__, `__LINE__);
device_cfg.log.set_instance($sformatf("%s.device_cfg", log.get_instance()));
this.log.is_above(device_cfg.log);
`else
device_cfg = svt_cxl_subsystem_configuration::type_id::create("device_cfg");
`endif
device_cfg.cache_mem_sys_cfg = this.cache_mem_sys_cfg;
endfunction: new
1. Specify the address ranges for each host and device cxl cache_mem agents by calling
set_addr_range(<host/device>, <host/device agent index>, <start_addr>,
<end_addr>,<host_indices_can_access_addr>,<device_indices_can_access_addr>.
The API sets the address range for a specified Host or Device agent and this address range
specifically refers to the memory attached to the corresponding Host or Device agent. By specifying
distinct address ranges for each Host and Device, it is possible to query the Host or Device agent
memory to which a specific address belongs.
Feedback
Synopsys, Inc. 49
General Concepts VC VIP CXL Subsystem
UVM User Guide
if(configure_system_address_map) begin
// configure system address ranges for each HOST and DEVICE component for Register
and Memory access
cust_cfg.cache_mem_sys_cfg.set_addr_range(svt_cxl_cache_mem_configuration::DEVICE,-1,
'h0, 'h3fff); //register space
cust_cfg.cache_mem_sys_cfg.set_addr_range(svt_cxl_cache_mem_configuration::DEVICE, 0,
'h8000, 'hffff); //memory
cust_cfg.cache_mem_sys_cfg.set_addr_range(svt_cxl_cache_mem_configuration::HOST,
-1, 'h4000, 'h7fff); //register space
cust_cfg.cache_mem_sys_cfg.set_addr_range(svt_cxl_cache_mem_configuration::HOST,
0, 'h10000, 'h1ffff);//memory
end
end
create_cfg_called = 1;
end
`svt_note("create_cfg", "Exiting...");
Endfunction
The register spaces are indicated by setting host/device agent index as -1. This ensures that no host
or device requests are expected to these address ranges.
2. CXL Cache_Mem request generating sequences must also be updated, so that it generates traffic
targeting to the valid address ranges. For example, the device that generates transactions to Host or
Device address ranges. Otherwise, CXL VIP reports as routing error. An example sequence is given
below with system address range specific assignments and constraints.
task svt_cxl_tl_virtual_cache_mem_sequence::body();
< variable declarations... >
raise_phase_objection();
................
fork
// Cache Request
begin //{
int addr_range_index;
foreach(cache_req_xact[i]) begin
`svt_xvm_create_on(cache_req_xact[i], p_sequencer.tl_req_seqr);
cache_req_xact[i].cfg = this.cfg;
addr_range_index = cfg.sys_cfg.get_rand_addr_range_index(~is_host);
rand_status = cache_req_xact[i].randomize() with {xact_protocol ==
((cfg.agent_type == svt_cxl_cache_mem_configuration::HOST) ?
svt_cxl_common_transaction::CACHE_H2D_XACT:
svt_cxl_common_transaction::CACHE_D2H_XACT);
if(addr_range_index >= 0) {
Feedback
50 Synopsys, Inc.
VC VIP CXL Subsystem
UVM User Guide General Concepts
if(cfg.agent_type == svt_cxl_cache_mem_configuration::HOST){
xact_type dist { svt_cxl_transaction::H2D_SNPDATA := snpdata_wt,
..............
svt_cxl_transaction::D2H_CACHEFLUSHED := cacheflushed_wt
};}
};
End
`svt_xvm_send(cache_req_xact[i]);
track_responses(cache_req_xact[i]);
track_data(cache_req_xact[i]);
end
end
//Mem Req
begin
int addr_range_index;
foreach(mem_req_xact[i]) begin
if (cfg.agent_type == svt_cxl_cache_mem_configuration::HOST) begin
if(mem_req_xact[i] == null) begin
`svt_xvm_create_on(mem_req_xact[i], p_sequencer.tl_req_seqr);
mem_req_xact[i].cfg = this.cfg;
addr_range_index = cfg.sys_cfg.get_rand_addr_range_index(0);
//TODO open the xact_type
rand_status = mem_req_xact[i].randomize() with {xact_protocol ==
svt_cxl_common_transaction::MEM_REQ_XACT;
if(addr_range_index >= 0) {
addr >= cfg.sys_cfg.addr_ranges[addr_range_index].start_addr;
addr <= cfg.sys_cfg.addr_ranges[addr_range_index].end_addr;
} else {
addr inside {0,64,128,256};
}
end
`svt_xvm_send(mem_req_xact[i]);
track_responses(mem_req_xact[i]);
track_data(mem_req_xact[i]);
check_completion_timeout(mem_req_xact[i], 10000);
end //if(HOST)
end //foreach(memreq)
end //MemReq
join
fork
forever get_response(rsp);
join_none
`svt_xvm_debug("body", "Waiting for all responses to be received");
wait (trans_count == received_responses);
`svt_xvm_debug("body", "Received all responses. Dropping objections");
drop_phase_objection();
`svt_note(method_name, "Ending.................");
endtask : body
Feedback
Synopsys, Inc. 51
General Concepts VC VIP CXL Subsystem
UVM User Guide
Note
Refer the Chapter ‘PCIe Verification Topologies’ from PCIe VIP User guide for details on DUT integrations.
This chapter provides details of PCIe Unified VIP component. Refer the section ‘DUT integration’ for DUT
integration details.
Note
In the case of CXL.io enabled topologies, you need to take care of Unified VIP instance.
Feedback
52 Synopsys, Inc.
VC VIP CXL Subsystem
UVM User Guide General Concepts
❖ Device and Host both can send coherent requests to allocate or de-allocate a cacheline targeted to the
Host attached Memory address range. CXL VIP establishes the required transaction flow and track
allocation and de-allocation of the targeted cache lines. It also performs the read and write from the
attached memory based on the requirement of the corresponding transaction.
Example Scenario:
✦ Device sends allocating coherent request for Exclusive Ownership
✦ Allocates the cacheline once response is received from the Host
✦ Performs a store operation and modifies the cacheline data
✦ Host at a later point sends Snoop to claim the ownership
✦ Device invalidates the line in it's cache and forwards the data to Host
✦ Host receives snoop response and allocates the cacheline with snoop data in it's cache
✦ Later Host can update Host attached memory with the cacheline data
2. System Address Map based Routing Check
Host and Devices can be configured with the applicable address ranges as a System Address Map
and CXL VIP performs request routing check. If any coherent or memory request is found to be sent
to any unmapped address space, then VIP reports an error.
This feature can be used to verify any unintended request sent by any connected component, which
are either Host or Device.
✦ Host and Device both can be configured with the same or overlapped address ranges by setting
allow_overlapping_addr to ‘1’ in svt_cxl_system_configuration
Feedback
Synopsys, Inc. 53
General Concepts VC VIP CXL Subsystem
UVM User Guide
3.15 Steps to Move from PCIe VIP based Testbench to CXL Subsystem Based
Testbench
These are the list of steps/changes based on PCIE VIP Unified Testbench
(tb_pcie_svt_uvm_unified_vip_sys) to have support for CXL Subsystem, and also these are steps based
on single instance usage.
3.15.1 Include the CXL Related Files (Make sure DESIGNWARE_HOME created & set from
CXL Subsystem)
Feedback
54 Synopsys, Inc.
VC VIP CXL Subsystem
UVM User Guide General Concepts
cxl_cfg = svt_cxl_subsystem_configuration::type_id::create($sformatf("cxl_cfg"),this);
You need to set Subsystem Id & Host/Device subsystem for configuration variable subsystem_type
as HOST_SUBSYSTEM/DEVICE_SUBSYSTEM.
Note
An API to configure the host/device is planned to be offered through which you can do complete
configuration without the need for individual configuration.
cxl_cfg.subsystem_id = <Subsystem ID>;
/** Passing existing PCIe VIP configuration from TB. */
cxl_cfg.set_cxl_io_cfgs(<PCIe VIP Configuration handle>);
/** Configuring CXL Subsystem as CXL IO. */
cxl_cfg.configure_subsystem(svt_cxl_subsystem_configuration::PCIE_IO_FULL_STACK);
/** Setting up CXL subsystem as Host. */
cxl_cfg.set_subsystem_type(svt_cxl_subsystem_configuration::HOST_SUBSYSTEM);
/** Configure PCIe APN capabilities for Flex bus operation for flex bus */
cxl_cfg.configure_flex_bus(0,0,0,0);
uvm_config_db#(svt_cxl_subsystem_configuration)::set(this, {env_name,"*"}, "cxl_cfg",
cxl_cfg);
Note
For complete details on Configuration APIs, you can refer CXL Subsystem Class reference guide.
Class Reference for VC Verification IP for CXL Subsystem is available at:
$DESIGNWARE_HOME/vip/svt/cxl_subsystem_svt/latest/doc/cxl_subsystem_svt_uvm_public/html
/index.html
3.15.4 Environment:
❖ Capture the configuration from test and pass the configuration to CXL Subsystem
if(uvm_config_db#(svt_cxl_subsystem_configuration)::get(get_parent(), get_name(),
"cxl_cfg", cxl_cfg)) begin
`uvm_info("build_phase", "Using test case provided cxl_cfg", UVM_LOW)
end
else `uvm_fatal("build_phase", "Expecting test case provided cxl_cfg")
❖ Create CXL Subsystem Host/Device ENV and pass the existing PCIe VIP component through
uvm_config_db
//Pass configurations to individual component E.g. Host component.
uvm_config_db#(svt_cxl_subsystem_configuration)::set(this, "cxl_host_env", "cfg",
cxl_cfg);
// Passing existing PCie VIP Root component to CXL Host.
uvm_config_db#(svt_pcie_device_agent)::set(this, "cxl_host_env",
"io_agent[0]",root);
Feedback
Synopsys, Inc. 55
General Concepts VC VIP CXL Subsystem
UVM User Guide
❖ Create the CXL subsystem Sequencer and connect PCIe sequence with CXL sequencers, such as
connecting CXL Host sequence with PCIe Sequencer.
/** Create Subsystem sequencer for host */
cxl_env_seqr = svt_cxl_subsystem_sequencer::type_id::create("cxl_env_seqr",this);
cxl_env_seqr = cxl_host_env.subsystem_virt_seqr;
root.virt_seqr = cxl_env_seqr.cxl_io_virt_seqr[0];
Note
Avoid using combination of PCIE VIP API ‘<PCIe VIP
Configuration>.pcie_cfg.pl_cfg.set_modified_ts_mode_values’ and ‘<CXL Subsystem
configuration>.configure_flex_bus(0,0,0,0);’. This might result in unexpected behavior.
❖ Subsystem VIP provides svt_cxl_subsystem_link_configuration(encapsulates host_cfg and
device_cfg of svt_cxl_subsystem_configuration) and svt_cxl_subsystem_link_status
(encapsulates host_status and device_status of svt_cxl_subsystem_status) to provide easier control
over link. You can use these classes instead of creating them individually. See the VIP example areas
for more details on usage. Based on link behavior, additional APIs are also part of these classes.
3.16 Enumeration
This section provides the CXL 2.0 Enumeration applicable for devices such as, D1 - CXL 1.1 Device, D2 -
CXL 2.0 Device.
3.16.1 Requirements
❖ CXL Defined Configuration space DVSECs (8.1)
❖ CXL Register Interface (8.2.8)
❖ CXL Memory Register (8.2.5)
❖ CXL Command Interface (8.2.9)
❖ Component register enumeration & Base address of capabilities.
❖ CXL 1.1 device Enumeration for CXL 2.0 defined applicable DVSECs & memory mapped
capabilities.
Feedback
56 Synopsys, Inc.
VC VIP CXL Subsystem
UVM User Guide General Concepts
Naming convention in CSR Status class are referenced from CXL Compliance Tests chapter and
Note register names defined in Control and Status Registers.
Highest
DVSEC
DVSEC Revision Not
CXL Capability ID ID Mandatory1 Permitted Optional
Feedback
Synopsys, Inc. 57
General Concepts VC VIP CXL Subsystem
UVM User Guide
Highest
DVSEC
DVSEC Revision Not
CXL Capability ID ID Mandatory1 Permitted Optional
PCIe DVSEC for Flex Bus Port 7 1 D1, D2, LD, FMLD, P
(Section8.1.8) UP1, DP1, R, USP,
DSP
Register Locator for DVSEC 8 0 D2, LD, FMLD, R, USP, P D1, UP1,
(Section8.1.9) DSP DP1
1. P-PCI Express Device, D1 - CXL 1.1 Device, D2-CXL 2.0 Device, LD-Logical Device, FMLD- Fabric Manager
Owned LD 0xFFFF, UP1 - CXL 1.1 Upstream Port RCRB, DP1- CXL 1.1 Downstream Port RCRB, R- CXL 2.0
Root Port, USP- CXL Switch Upstream Port, DSP - CXL Switch Downstream Port
This is the table mapping the DVSEC's/Capabilities/Memory Mapped Regions with the CSR Status class
attribute:
CXL DVSECs
Additional Capabilities
Feedback
58 Synopsys, Inc.
VC VIP CXL Subsystem
UVM User Guide General Concepts
CSR Status class is available in CXL Subsystem Status class and this can be used at sequence. The following
is reference usage:
<host status>.csr_status[link_num].cxl_device_dvsec
VIP Enumeration API captures the base address of Component registers, and you can add the offset and
traverse the specific registers.
Component Register Base address in CSR Status class : cxl_device_component_register_base_addr
For example, cxl_device_component_register_base_addr + 1000h will lead to CXL.Cache and CXL.mem
Registers.
Feedback
Synopsys, Inc. 59
General Concepts VC VIP CXL Subsystem
UVM User Guide
Feedback
60 Synopsys, Inc.
VC VIP CXL Subsystem
UVM User Guide General Concepts
CSR Status class keep each capability information captured through associative array:
cxl_device_capability_base_addr[int]
For example:
cxl_device_capability_base_addr[1] - Device Status Register
cxl_device_capability_base_addr[2] - Primary Mailbox
cxl_device_capability_base_addr[3] - Secondry Mailbox
cxl_device_capability_base_addr[4000] - Memory Device Status Register
Feedback
Synopsys, Inc. 61
General Concepts VC VIP CXL Subsystem
UVM User Guide
svt_pcie_ep_enumeration_pf_control device_parms;
device_parms=new();
device_parms.max_num_functions_supported=max_num_function;
device_parms.enable_sriov =0;
device_parms.max_num_vfs_per_pf = 32;
Feedback
62 Synopsys, Inc.
VC VIP CXL Subsystem
UVM User Guide General Concepts
device_parms.bus_number = 8'hD0;
device_parms.device_number=5'b11000;
host_seq.disable_cxl_upstream_membar0_enumeration =
disable_cxl_upstream_membar0_enumeration;
host_seq.disable_cxl_upstream_rcrb_enumeration = disable_cxl_upstream_rcrb_enumeration;
// Enumeration API for CXL Device.
host_seq.enumerate_cxl_device(0/*link num*/,max_num_function/*Max Number of
Function*/,0/*SRIOV*/,32/*Max VFs per PF*/,,device_parms);
//
/**
* sets the Upstream port MEMBAR base address.
* 64K Memory range is required for MEMBAR.
* Note : This address should not lie inside any of the BAR ranges.
*/
rand bit[63:0] upstream_port_membar0_base_addr=64'h0000_0000_0002_0000;
Reference Access path:
cust_cfg.host_cfg.upstream_port_rcrb_base_addr
cust_cfg.host_cfg.upstream_port_membar0_base_addr
2. How to manage multiple instances of EP Enumeration status?
Feedback
Synopsys, Inc. 63
General Concepts VC VIP CXL Subsystem
UVM User Guide
3.16.6 Debug
3.16.6.1 Transcript
The Enumeration of CSR Status class can be used to get some information about the capabilities
enumerated. The following snippet is for CXL1.1 mode enumeration for CXL 2.0 device.
Feedback
64 Synopsys, Inc.
VC VIP CXL Subsystem
UVM User Guide General Concepts
As mentioned in the Licensing section, CXL 2.0 features can be enabled and used when using the
Note license SUB-CXL20-SVT (or)VIP-LIBRARY2019-SVT+SUB-CXL20-EA-SVT.
The spec version must be set to spec_ver = svt_cxl_types::CXL_VER_2_0.
Feedback
Synopsys, Inc. 65
General Concepts VC VIP CXL Subsystem
UVM User Guide
Feedback
66 Synopsys, Inc.
VC VIP CXL Subsystem
UVM User Guide General Concepts
Currently, CXL VIP considers complete device address range for QoS.
Therefore, if it is set to any value, it considers the device end address only.
✦ @param thrtl_window Throttling th parameter which indicates when to sample the loadmax
value for throttling control.
This argument is used by host VIP only.
✦ @param normal_delta_time The wait time which will be increased for moderate load (or)
decreased for light load
This argument is used by host VIP only.
✦ @param severe_delta_time The wait time which will be increased for moderate load (or)
decreased for light load
This argument is used by host VIP only.
✦ @param max_thrtl_wait_time The maximum wait time which is allowed before sending the
transaction from the TL layer.
This argument is used by host VIP only.
Example
✦ Host VIP
Suppose previous transaction was sent without waiting for any delay.
So, wait time for previous transaction (previous_wait_time) was 0ns.
Now,the sampled Loadmax value at host end is SEVERE_OVERLOAD.
Hence, the new transaction needs to wait for:
wait_time = severe_delta_time i.e.(previous_wait_time + severe_delta_time) before sending
from the TL layer.
Now, suppose the sampled Loadmax value at host end is MODERATE_OVERLOAD.
Feedback
Synopsys, Inc. 67
General Concepts VC VIP CXL Subsystem
UVM User Guide
3.17.3.1 IDE
❖ Prerequisites: Synopsys DesignWare Cores Cryptography Library
Cryptographic algorithms are not shipped as part of VIP deliverable. As a prerequisite, you must have
Note access to Access to Synopsys Designware Core Cryptographic Software Library (CSL).
Feedback
68 Synopsys, Inc.
VC VIP CXL Subsystem
UVM User Guide General Concepts
3.17.3.3 Debug
AES-GCM Trace file to debug:
You can enable the trace file from AES-GCM Layer to debug the message encrypted or decrypted via
"enable_transaction_logging" attribute available in Cache-Mem Configuration.
Feedback
Synopsys, Inc. 69
General Concepts VC VIP CXL Subsystem
UVM User Guide
Feedback
70 Synopsys, Inc.
VC VIP CXL Subsystem
UVM User Guide General Concepts
❖ svt_cxl_system_configuration::configure_memory_interleaving_parameters(bit
is_host_interleaved_group, bit [`SVT_CXL_MAX_ADDR_WIDTH-1:0] interleaving_start_addr, bit
[`SVT_CXL_MAX_ADDR_WIDTH-1:0] interleaving_end_addr, int interleave_granularity, int
interleave_ways, int tgt_agent_id[]);
CXL VIP does not support multi host or multi device topology. So, the configuration API
Note configure_memory_interleaving_parameters should be called for only one host or
device(i.e. interleave ways=1).
Example:
cust_cfg.cache_mem_sys_cfg.configure_memory_interleaving_parameters(0, 'h8000, 'hffff,
256, 1, {0});
Feedback
Synopsys, Inc. 71
General Concepts VC VIP CXL Subsystem
UVM User Guide
3. restore_credits() is used to restore credits to the remote partner. (Invoked internally by the other
APIs for the features supported)
Feedback
72 Synopsys, Inc.
VC VIP CXL Subsystem
UVM User Guide General Concepts
task svt_cxl_subsystem_virtual_api_collection_sequence::perform_warm_reset (
int link_num = 0 )
API to perform Warm Reset VDM exchange and moving to Detect via Hot.Reset entry. (Implicitly calls
reset_prep_vdm_exchange API with value of 8'h10)
Usage example
vip_seq.pm_credit_initialization();
vip_seq.perform_warm_reset();
Logs Snippet
Transaction log shows the Message with Data VDM packets.
Waveform will show the LTSSM going into Hot Reset state:
Signals:
<test_top>.spd_0.m_ser.port0.pl0.ascii_ltssm_rx_state[255:1]
<test_top>.spd_0.m_ser.port0.pl0.ascii_ltssm_tx_state[255:1]
<test_top>.spd_0.m_ser.port0.pl0.ascii_phy_rate[959:1]
Keywords to debug:
❖ pm_credit_initialization
Feedback
Synopsys, Inc. 73
General Concepts VC VIP CXL Subsystem
UVM User Guide
❖ generate_cxl_pm_vdm
❖ perform_warm_reset
❖ reset_prep_vdm_exchange
3.19.1 Overview
The class svt_pcie_device_virtual_doe_sequence is introduced to encapsulate a DOE transfer. You
must provide all the fields defined in this specification for a doe_transaction. It performs the following
steps:
1. Read the DOE status register. Check that the DOE busy bit is clear. If not, start the polling routine
until the busy bit is clear.
2. Write the provided DOE structure to the DOE write data mailbox register. The user is responsible
for constructing a proper DOE structure.
3. Set the DOE go bit in the DOE control register.
4. Optionally set the DOE interrupt register.
5. If the interrupt register is set, wait for MSI interrupt. If not, you must poll the data object ready bit in
configurable intervals.
6. If polling and polling timeout is hit, write the abort bit in the DOE control register and end the
transaction and update status with failure.
7. After the MSI is received or while polling, read the DOE status register. Ensure that the DOE error
bit is clear. If not, flag an error. If interrupts are enabled, check that the interrupt status bit is set.
8. Check that the data object ready bit is set. If an interrupt is received and the data object ready bit is
not set, then flag an error. If an error occurs, abort the transaction and update the status as
unsuccessful.
9. Once a response is ready, read data, one dword at a time from the DOE read data mailbox.
10. If interrupts are used, write 1 to the interrupt status bit to clear it.
11. You must update the status as successful or unsuccessful after all data has been read and return the
data.
There is no attempt to interpret the data that was exchanged. It is at your discretion to process this data.
Example using DOE discovery:
The DOE discovery object contains 3 DW. The first 2 DW are described as above. For PCIE the vendor ID is
‘h0001. For CXL the vendor ID is ‘h1E98. Since a DOE discovery object is 3DW the length is set to 3. The
discovery 1DW payload is defined as:
Feedback
74 Synopsys, Inc.
VC VIP CXL Subsystem
UVM User Guide General Concepts
7:0 Index - Indicates DOE Discovery entry index queried. Indices must start
at 00h and increase monotonically by 1.
You need to construct a 3DW array using these definitions and assign it to write_mailbox in the doe
transaction.
This transaction uses interrupts. If during discovery the attached device did not support
Note interrupts, then the interrupt_enable bit must not be set.
Example pseudo-code:
svt_pcie_device_virtual_doe_sequence doe_discovery;
doe_discovery =
svt_pcie_device_virtual_doe_sequence::type_id:create(“doe_discovery”);
doe_discovery.write_mailbox.push_back({8’b0, 8’b0, 16’h1e98}); // 8 reserved bits, data
object type=discover, CXL ID
doe_discovery.write_mailbox.push_back(32’h0000_0003);
doe_discovery.write_mailbox.push_back(32’h0000_0000); // Index 0 points to discovery.
So we are asking if the device is capable of CXL discovery.
doe_discovery.doe_capabilities_base_addr = 12’h0abcd;
doe_discovery.interrupt_enable = 1’b1; // use interrupts.
doe_discovery.doe_polling_interval = 1000; // poll every 1us
doe_discovery.doe_timeout = 1000000; // command timeout after 1ms.
doe_discovery.interrupt_number = 7; // Look for MSI with bit 7 set to indicate the
device’s read mailbox is ready.
start_item(doe_discovery);
finish_item(doe_discovery);
get_response(doe_discovery);
if (doe_discovery.status != doe_discovery::SUCCESSFUL) $dislpay(“ERROR!”);
else begin// check the contents of read_mailbox_data
for (int i=0; i<doe_read_mailbox.size();i++) begin
$display(doe_discovery.read_mailbox[i]); // print the response
…
end
end
Feedback
Synopsys, Inc. 75
General Concepts VC VIP CXL Subsystem
UVM User Guide
4. interrupt_enable- Indicates whether the interrupt bit should be set when writing to the DOE control
register.
5. interrupt_number- Indicates the MSI interrupt number that should be used to determine if the DOE
read mailbox is ready.
6. int doe_polling_interval_ns- Indicates the polling interval to be used to check the data_object_ready
bit.
7. int doe_timeout_ns- Indicates the amount of time the DOE sequence should wait before declarding a
timeout on the DOE transfer.
8. typedef enum doe_status- Indicates wether or not the DOE transaction was successful.
3.20.3 Validation
Preliminary validation covers following scenario.
Feedback
76 Synopsys, Inc.
VC VIP CXL Subsystem
UVM User Guide General Concepts
Feedback
Synopsys, Inc. 77
General Concepts VC VIP CXL Subsystem
UVM User Guide
vip_seq.update_cxl_viral_status(.cache_mem_link_num(link_num),.viral_state(svt_cxl_type
s::VIRAL_ACTIVE));
Also indicate the Retry.Ack reception/ sending as shown. This is required to start executing the protocol
checks for the Mem read transaction’s responses at Host end.
vip_seq.update_cxl_viral_status(.cache_mem_link_num(link_num),.viral_state(svt_cxl_type
s::VIRAL_COMMUNICATED));
Process to Exit out of viral state
Any Conventional reset say, hot, warm or cold reset must cause the Viral exit, as shown:
// Initiating reset at Host end to push Host and devices out of Viral state
vip_seq.enter_hot_reset();
<design_dir>/examples/sverilog/cxl_subsystem_svt/tb_cxl_subsystem_uvm_basic_sys/env/sv
t_cxl_subsystem_basic_env.sv
For more details, refer the class reference:
Feedback
78 Synopsys, Inc.
VC VIP CXL Subsystem
UVM User Guide General Concepts
https://spdocs.synopsys.com/dow_retrieve/latest/vg/snps_vip_lib/class_ref/cxl_subsystem
_svt_uvm_class_reference/html/tlm_ports.html
Feedback
Synopsys, Inc. 79
General Concepts VC VIP CXL Subsystem
UVM User Guide
Feedback
80 Synopsys, Inc.
VC VIP CXL Subsystem
UVM User Guide
4
CXL Subsystem Verification Topologies
Feedback
Synopsys, Inc. 81
CXL Subsystem Verification Topologies VC VIP CXL Subsystem
UVM User Guide
CXL Subsystem VIP supports the Type1 CXL.cache transactions and all CXL.io transactions when using in
this mode.
Feedback
82 Synopsys, Inc.
VC VIP CXL Subsystem
UVM User Guide CXL Subsystem Verification Topologies
Feedback
Synopsys, Inc. 83
CXL Subsystem Verification Topologies VC VIP CXL Subsystem
UVM User Guide
CXL Subsystem supports all three kinds of transactions (CXL.io, CXL.cache, and CXL.mem traffic) when
using it in Type 2 Device.
The above test is created for CXL.cache and CXL.mem traffic in VIP back to back setup. You can use
Note it as a reference for creating the test cases related to Type 2 Device.
Feedback
84 Synopsys, Inc.
VC VIP CXL Subsystem
UVM User Guide CXL Subsystem Verification Topologies
CXL Subsystem VIP supports the Type3 CXL.mem transactions when using in this mode.
Feedback
Synopsys, Inc. 85
CXL Subsystem Verification Topologies VC VIP CXL Subsystem
UVM User Guide
The above test is created for VIP back to back setup. You can use it as a reference for creating
Note the test cases related to Type 3 Device.
Full stack verification of CXL Connect DUT and VIP at PCIE PIPE/Serial Interface
features
Verification of CXL.mem and Connect DUT and VIP link layer signaling (TLM/LPIF/Proprietary)
CXL.cache features at link layer
Verification of CXL.mem and Connect DUT and VIP transaction layer signaling (TLM/Proprietary)
CXL.cache features at Transaction
layer
This diagram shows the topologies supported for the Verification requirement.
Feedback
86 Synopsys, Inc.
VC VIP CXL Subsystem
UVM User Guide CXL Subsystem Verification Topologies
#1 Full stack PIPE with CXL.io CXL Subsystem VIP connected at the PIPE interface
and with the DUT. CXL.io, CXL.cache & CXL.mem
CXL.cache/CXL.me components are enabled. All Device Types ( 1, 2 and 3)
m are supported.
#1 Full stack PIPE with only CXL Subsystem VIP connected at the PIPE interface
CXL.io with the DUT. Only CXL.io component is enabled.
#1 Full stack Serial with CXL.io CXL Subsystem VIP connected at the Serial interface
and with the DUT. CXL.io, CXL.cache & CXL.mem
CXL.cache/CXL.me components are enabled. All Type 1, 2 and 3 Device
m types are supported.
#1 Full stack Serial with only CXL Subsystem VIP connected at the Serial interface
CXL.io with the DUT. Only CXL.io component enabled.
#2 ARB Mux LPIF with CXL.io and CXL Subsystem VIP connected at the LPIF interface
CXL.cache/CXL.me with the DUT. CXL.io, CXL.cache & CXL.mem
m components are enabled. All Type 1, 2 and 3 Device
types are supported.
#2 ARB Mux LPIF with only CXL Subsystem VIP connected at the LPIF interface
CXL.io with the DUT. Only CXL.io component is enabled. All
Type 1, 2 and 3 Device types are supported.
Feedback
Synopsys, Inc. 87
CXL Subsystem Verification Topologies VC VIP CXL Subsystem
UVM User Guide
#2 ARB Mux LPIF with only CXL Subsystem VIP connected at the LPIF interface
CXL.cache/CXL.me with the DUT. Only CXL.cache & CXL.mem component
m is enabled. All Type 1, 2 & 3 Device types are
supported.
#2 ARB Mux TLM with CXL.io and CXL Subsystem VIP connected with DUT using TLM
CXL.cache/CXL.me ports. Only CXL.io component is enabled. All Type 1, 2
m & 3 Device types are supported.
Note: TLM to DUT signaling interface BFM is provided
by user (or) is part of the DUT module.
#2 ARB Mux TLM with only CXL.io CXL Subsystem VIP connected with DUT using TLM
ports. Only CXL.io component is enabled. All Type 1, 2
& 3 Device types are supported.
Note: TLM to DUT signaling interface BFM is provided
by user (or) is part of the DUT module.
#2 ARB Mux TLM with only CXL Subsystem VIP connected with DUT using TLM
CXL.cache/CXL.me ports. Only CXL.cache & CXL.mem component is
m enabled. All Type 1, 2 & 3 Device types are supported.
Note: TLM to DUT signaling interface BFM is provided
by user (or) is part of the DUT module.
#3 Link Layer LPIF with CXL.io and CXL Subsystem VIP connected with the DUT using
CXL.cache/CXL.me LPIF interface . CXL.io, CXL.cache & CXL.mem
m components are enabled. All Type 1, 2 & 3 Device types
are supported
#3 Link Layer LPIF with only CXL Subsystem VIP connected with the DUT using
CXL.io [only TL+DL] LPIF interface with only Transaction and Link layer
enabled. Only CXL.io component is enabled. All Type 1,
2 & 3 Device types are supported
#3 Link Layer LPIF with only CXL Subsystem VIP connected at the LPIF interface
CXL.cache/CXL.me with the DUT. Only CXL.cache & CXL.mem component
m is enabled. All Type 1, 2 & 3 Device types are supported
#3 Link Layer TLM with CXL.io and CXL Subsystem VIP connected with DUT using TLM
CXL.cache/CXL.me ports at link layer. CXL.io, CXL.cache & CXL.mem
m components are enabled. All Type 1, 2 & 3 Device types
are supported.
Note: TLM to DUT signaling interface BFM is provided
by user (or) is part of the DUT module.
#3 Link Layer TLM with only CXL.io CXL Subsystem VIP connected with DUT using TLM
ports at link layer. Only CXL.io component is enabled.
All Type 1, 2 & 3 Device types are supported.
Note: TLM to DUT signaling interface BFM is provided
by user (or) is part of the DUT module.
Feedback
88 Synopsys, Inc.
VC VIP CXL Subsystem
UVM User Guide CXL Subsystem Verification Topologies
#3 Link Layer TLM with only CXL Subsystem VIP connected with DUT using TLM
CXL.cache/CXL.me ports at link layer. Only CXL.cache & CXL.mem
m component is enabled. All Type 1, 2 & 3 Device types
are supported.
Note: TLM to DUT signaling interface BFM is provided
by user (or) is part of the DUT module.
#4 Transaction Layer TLM with only CXL Subsystem VIP connected with DUT using TLM
CXL.cache/CXL.me ports at the Transaction layer. Only CXL.cache &
m CXL.mem component is enabled. All Type 1, 2 & 3
Device types are supported.
Note: TLM to DUT signaling interface BFM is provided
by user (or) is part of the DUT module.
CXL Subsystem VIP is providing the following modes of usage under Topology #1
❖ PIPE with CXL.io and CXL.cache/CXL.mem
❖ PIPE with only CXL.io
❖ Serial with CXL.io and CXL.cache/CXL.mem
❖ Serial with only CXL.io
Feedback
Synopsys, Inc. 89
CXL Subsystem Verification Topologies VC VIP CXL Subsystem
UVM User Guide
4.2.1.1 Running CXL Subsystem VIP Example Test Cases with Topology #1
Here is the list of valid combinations of topology and compile files to be used for Topology #1
Valid Combinations of Compile and Topology Files for Full Stack Topology
4.2.2 Topology 2: Connect DUT and VIP at ARB MUX (TLM/ LPIF/ Proprietary)
Feedback
90 Synopsys, Inc.
VC VIP CXL Subsystem
UVM User Guide CXL Subsystem Verification Topologies
CXL Subsystem VIP is providing the following modes of usage under Topology #2
❖ LPIF with CXL.io and CXL.cache/CXL.mem
❖ LPIF with only CXL.io
❖ LPIF with only CXL.cache/CXL.mem
❖ TLM with CXL.io and CXL.cache/CXL.mem
❖ TLM with only CXL.io
❖ TLM with only CXL.cache/CXL.mem
Feedback
Synopsys, Inc. 91
CXL Subsystem Verification Topologies VC VIP CXL Subsystem
UVM User Guide
4.2.3 Topology 3: Connect DUT and VIP Link Layer Signalling (TLM/ LPIF/ Proprietary)
4.2.4 Running CXL Subsystem VIP example Test Cases with Topology #3
Here is the list of valid combinations of topology and compile files to be used for Topology #3
Valid Combinations of Compile and Topology Files for TL+DL (with and without LPIF) Topology
Feedback
92 Synopsys, Inc.
VC VIP CXL Subsystem
UVM User Guide CXL Subsystem Verification Topologies
4.2.5 Topology 4: Connect DUT and VIP at Transaction Layer Signalling (TLM/Proprietary)
CXL Subsystem VIP is providing the following mode of usage under Topology #4
❖ TLM with only CXL.cache/CXL.mem
4.2.5.1 Running CXL Subsystem VIP Example Test Cases with Topology #4
Here is the list of valid combinations of topology and compile files to be used for Topology #4
Feedback
Synopsys, Inc. 93
CXL Subsystem Verification Topologies VC VIP CXL Subsystem
UVM User Guide
TL Only topology
cxl_tl_type3_mem_wr_rd topology_snps_vip_cxl_b2b.svi
Feedback
94 Synopsys, Inc.
VC VIP CXL Subsystem
UVM User Guide
5
CXL Application Layer Agent
Feedback
Synopsys, Inc. 95
CXL Application Layer Agent VC VIP CXL Subsystem
UVM User Guide
CXL Subsystem VIP uses the rx_tlp_out_port TLM port of PCIe TL and Target App. You are
recommended to use the rx_tlp_peek_port in their testbench instead of this put_port.
Feedback
96 Synopsys, Inc.
VC VIP CXL Subsystem
UVM User Guide
6
CXL.io Agent
6.1 Overview
The CXL VIP, at its highest level, encapsulates the PCIe UVM VIP, which is composed of the
svt_pcie_device_agent class acting as the CXL.io agent. This will generate CXL.io transactions.
CXL VIP leverages the PCIe VIP agent for all CXL.io operations in a similar way where CXL protocol
leverages PCIe features for non-coherent load/store interface for IO devices.
Feedback
Synopsys, Inc. 97
CXL.io Agent VC VIP CXL Subsystem
UVM User Guide
Feedback
98 Synopsys, Inc.
VC VIP CXL Subsystem
UVM User Guide CXL.io Agent
❖ The Application Layer: The CXL VIP has a layer on top of the CXL.io stack representing the software
layer in a real application of the PCIe bus. The application layer is responsible for generating and
handling transactions. The application layer of the CXL.io agent is the layer that is typically
programmed by the test to generate stimulus or respond to the incoming requests. The application
layer has the following blocks that perform specific functions:
✦ Driver Application (Type=svt_pcie_driver_app, Instance=driver[0]): The Driver application
provides a simple interface that can be used to quickly create CXl.io transaction requests
(memory read/write request, I/O read/write requests etc.,). The application deals with driver
application transaction objects (svt_pcie_driver_app_transaction) which is an abstract
description of the transaction layer packet.
✦ Requester Application (Type=svt_pcie_requester_app, Instance=requester): The requester
application can be used to generate PCIe memory/read transaction to a remote target. The
application can be configured to choose addresses at random (constrained by
minimum/maximum configuration parameters) and have varying lengths (again, constrained
by minimum/maximum configuration parameters) and generate traffic at a requested
bandwidth (again, constrained by minimum/maximum configuration parameters). This
application will be useful where a background exerciser of write/read request is required.
✦ Target Application (Type=svt_pcie_target_app, Instance=target[0]): The target application is the
block that automatically responds to various inbound CXL.io requests. Read transaction requests
can be optionally broken up into multiple completions, potentially interleaved with other read
completions by configuration. The target application has auxiliary blocks that represent the
completion memory used while generating completions. These blocks include Memory Target,
IO Target and Configuration Database. The blocks comprise of a sparse memory allowing a wide
variety memory/IO addresses/registers to be accessed by a DUT.
✦ Memory Target (Type=svt_pcie_mem_target, Instance=mem_target): The memory target is the
PCIe VIP's sparse memory model used to store write data and return read data to the incoming
memory requests. This sparse memory model responds to a wide variety of addresses (32-bit
and 64-bit) when accessed by a requester. The memory target has APIs to write into its sparse
memory through backdoor or read from its sparse memory through backdoor to meet different
kinds of testing requirements.
✦ I/O Target (Type=svt_pcie_io_target, Instance=io_target): The I/O target is the PCIe VIP's
sparse memory model used to store write data and return read data to the incoming I/O
requests. This sparse memory model responds to a wide variety of addresses (32-bit and 64-bit)
when accessed by a requester. The I/O target has APIs to write into its sparse memory via
backdoor or read from its sparse memory via backdoor to meet different kinds of testing
requirements.
✦ Configuration Database (Type=svt_pcie_cfg_database, Instance=
svt_pcie_target_app::cfg_database): The configuration database is the sparse memory model of
PCIe VIP that is used to store write data and return read data to the incoming configuration
requests. This sparse memory model responds to a wide variety of addresses (type 0, type 1,
extended capability registers, and so on) when accessed by a requester. The configuration
database has APIs to write into its sparse memory through backdoor or read from its sparse
memory through backdoor to meet different kinds of testing requirements.
Feedback
Synopsys, Inc. 99
CXL.io Agent VC VIP CXL Subsystem
UVM User Guide
✦ PCIe Agent: The PCIe Agent encapsulates the UVM drivers that represents the Transaction
Layer, the Data-link Layer, and the Physical Layer of the PCIe protocol stack. The
svt_pcie_agent class represents this encapsulation in the PCIe VIP. The PCIe agent class is
instanced as pcie_agent within svt_pcie_device_agent. The agent class consists of the
following layers:
✧ The Transaction Layer (Type=svt_pcie_tl, Instance=pcie_tl): The svt_pcie_tl class defines
functions of the transaction layer (TL) in the PCIe VIP. The applications transfer transaction
requests to the TL for transmission. The TL composes the transaction layer packet (TLP) and
hands it down to the data-link layer located below it. The transaction layer also receives TLPs
from the data-link layer which gets routed up to the correct application. It is also possible for
the test to interface directly with the TL to generate TLPs. But it is recommended to use the
application layers.
✧ The Data-link Layer (Type=svt_pcie_dl, Instance=pcie_dl): The svt_pcie_dl class defines
the functions of the data-link (DL) layer in the PCIe VIP. The TL transfers TLPs to the DL to
be framed with a sequence number and a CRC and ensure the remote receiver receives the
packet without any errors. The DL also performs the other standard functions of link
management using data-link layer packets (DLLPs).
✧ Physical Layer (Type=svt_pcie_pl, Instance=pcie_pl): The svt_pcie_pl class defines the
functions of the physical layer (PL) in the PCIe VIP. The PL breaks down packets it receives
(from the DL) into symbols and encodes them as per the specification before transmission. It
also composes packets from data received on the receive data lanes and sends them back to
the DL. It also performs other functions to maintain the link such as the LTSSM and functions
for low power and so on. This includes Flex Bus also. Refer Chapter 3 for more details.
Feedback
100 Synopsys, Inc.
VC VIP CXL Subsystem
UVM User Guide CXL.io Agent
6.2 Configuration
The CXL.io Agent is configured using an object of class svt_pcie_device_configuration (cxl_io_cfg[] as
the handle) defined within the top level configuration class svt_cxl_subsystem_configuration of CXL
VIP. This class has other class objects defined within it to form a hierarchy that corresponds to the hierarchy
inside the CXL.io Agent.
Refer the Section 3.4 for top level configuration class details. This chapter assumes that you
Note have already created environment.
svt_pcie_device_configuration (cxl_io_cfg[])
|
|--------> driver_cfg[] (type=svt_pcie_driver_app_configuration)
|
|--------> requester_cfg (type=svt_pcie_requester_app_configuration)
|
|--------> target_cfg[] (type=svt_pcie_target_app_configuration)
|
|--------> pcie_cfg (type=svt_pcie_configuration)
Feedback
Synopsys, Inc. 101
CXL.io Agent VC VIP CXL Subsystem
UVM User Guide
|
|--------> tl_cfg (type=svt_pcie_tl_configuration)
|
|--------> dl_cfg (type=svt_pcie_dl_configuration)
|
|--------> pl_cfg (type=svt_pcie_pl_configuration)
This class is comprised of direct variables and class objects that are used to configure other agents/drivers
that are part of the CXL.io agent.
Only the top-level configuration handle is user-defined. After that, the instance handle
Note names remains fixed and must not be changed by the user.
6.3 Status
Status is used to get run time information of PL/DL/TL layer aspects of a CXL.io agent. The CXL.io Agent
provides a set of state values representing the status of its sub-components at anytime in the test simulation.
svt_cxl_subsystem_status is the CXL Subsystem 'top level' status class. It encapsulates the IO status
class object corresponding to the CXL.io agents present in the CXL Subsystem.
Refer Section 3.5 for top level status class details. This chapter assumes the you have already
Note created the environment.
The svt_pcie_device_status class (io_status[] as handle) will provide us the CXL.io agent status.
Feedback
102 Synopsys, Inc.
VC VIP CXL Subsystem
UVM User Guide CXL.io Agent
svt_pcie_device_status (io_status[])
|
|--------> driver_status[] (type = svt_pcie_driver_app_status)
|
|--------> requester_status (type= svt_pcie_requester_app_status )
|
|--------> target_status [] (type = svt_pcie_target_app_status)
|
|--------> pcie_status (type = svt_pcie_status)
|
|--------> tl_status (type = svt_pcie_tl_status)
|
|--------> dl_status (type = svt_pcie_dl_status)
|
|--------> pl_status (type = svt_pcie_pl_status)
Example usage:
How to check Host APN status?
Feedback
Synopsys, Inc. 103
CXL.io Agent VC VIP CXL Subsystem
UVM User Guide
Only the top-level status handle is user-defined. After that, the instance handle names remain fixed
Note and must not be changed by the user.
6.4 Sequencers
The CXL.io Agent class (svt_pcie_device_agent) has different UVM sequencer objects to schedule
transaction requests or service requests on any of its subcomponent Drivers. A UVM sequencer is an arbiter
that controls the transaction flow from multiple stimulus generators. The sequencers communicate with
drivers using the TLM interfaces.
Refer Section 3.3 for top level sequencer details. This chapter assumes that you have already created
Note environment.
Feedback
104 Synopsys, Inc.
VC VIP CXL Subsystem
UVM User Guide CXL.io Agent
Using the cxl_io_virt_seqr[], you can use all the sequencers present for the CXl.io agent.
Example Usage:
How to access the sequencer hierarchy for pl_seqr?
Feedback
Synopsys, Inc. 105
CXL.io Agent VC VIP CXL Subsystem
UVM User Guide
Assuming you already have created the handle for top-level virtual sequencer as host_seqr, for using any
sequencer of CXL.io Agent, you can use cxl_io_virt_seqr[]. It contains of pcie_virt_seqr for pl/dl/tl
protocol layer sequencers. Inside pcie_virt_seqr, you will have pl_seqr.
<p_sequencer/top_level_seqr_handle>.cxl_io_virt_seqr[0].pcie_virt_seqr.pl_seqr
Refer this figure and follow the colored part.
Feedback
106 Synopsys, Inc.
VC VIP CXL Subsystem
UVM User Guide CXL.io Agent
Only the top-level sequencer handle is user-defined. After that, the instance handle names remain
Note fixed and must not be changed by the user.
Feedback
Synopsys, Inc. 107
CXL.io Agent VC VIP CXL Subsystem
UVM User Guide
6.5 Sequences
Many sequences are present for CXL.io agent. They can be divided in two categories:
❖ Transaction sequences
❖ Service sequences.
Refer the HTML class reference for more information.
Example Usage:
How do I enable link up or send a Memory TLP?
/** Creating object handle of sequence class */
/** PCIe PL Link sequences */
svt_pcie_pl_service_set_phy_en_sequence pl_link_en_seq;
/** PCIE DL Link Enable sequence */
svt_pcie_dl_service_set_link_en_sequence dl_link_en_seq;
/** PCIE Driver APP Mem traffic sequence for Mem Write/Read transactions */
svt_pcie_driver_app_mem_request_sequence mem_wr_seq, mem_rd_seq;
……
bit[32:0] local_addr;
bit[9:0] local_len;
……
/** Enabling PHY for CXL.io agent */
`svt_uvm_do_on_with(pl_link_en_seq,
p_sequencer.cxl_io_virt_seqr[0].pcie_virt_seqr.pl_seqr, {phy_enable == 1'b1;})
Feedback
108 Synopsys, Inc.
VC VIP CXL Subsystem
UVM User Guide CXL.io Agent
6.6 APIs
There are various APIs that are available to ease the development process. All the APIs are present in the
svt_cxl_subsystem_virtual_api_collection_sequence class. This sequence is for API based traffic
generation for complete Subsystem.
As an example, there are APIs to generate memory request for CXL.io such as generate_cxl_io_mem_rd,
generate_cxl_io_mem_wr and so on.
For complete list of available APIs and their input parameters, refer the HTML class reference:
$DESIGNWARE_HOME/vip/svt/cxl_subsystem_svt/latest/doc/cxl_subsystem_svt_uvm_public/html
/sequences/class_svt_cxl_subsystem_virtual_api_collection_sequence.html
Feedback
Synopsys, Inc. 109
CXL.io Agent VC VIP CXL Subsystem
UVM User Guide
Feedback
110 Synopsys, Inc.
VC VIP CXL Subsystem
UVM User Guide
7
CXL.mem and CXL.cache Agent
7.1 Overview
7.1.1 CXL.mem and CXL.cache Agent
The CXL Subsystem environment, svt_cxl_subsystem_env contains the svt_cxl_env class which
comprises the CXL Cache/mem Agent - is the CXL Cache/mem component with the Transaction Layer and
Link Layer.
Feedback
Synopsys, Inc. 111
CXL.mem and CXL.cache Agent VC VIP CXL Subsystem
UVM User Guide
❖ svt_cxl_agent
svt_cxl_agent encapsulates the Transaction Layer and Link Layer of CXL Cache/mem component. This
comprises of Driver, Monitor, and Sequencer at Transaction Layer level and Data Link Layer level.
Components present inside the svt_cxl_agent
❖ CXL Transaction Layer Driver (Type= svt_cxl_tl, Instance= tl_driver):
The svt_cxl_tl_monitor class defines the functions of the CXL Cache/mem Transction Layer (TL)
Monitor in the CXL Subsystem VIP. Once the CXL transaction on the bus is complete, the completed
sequence item is provided to the analysis node of monitor, which can be used by the testbench.
❖ CXL Transaction Layer Monitor (Type= svt_cxl_tl_monitor, Instance= tl_mon):
The svt_cxl_tl_monitor class defines the functions of the CXL Cache/mem Transction Layer (TL)
Monitor in the CXL Subsystem VIP. Once the CXL transaction on the bus is complete, the completed
sequence item is provided to the analysis node of monitor, which can be used by the testbench.
For the available Analysis TLM Ports at this level, refer the svt_cxl_tl_monitor class in the HTML
Class reference.
Link to HTML Class reference:
$DESIGNWARE_HOME/vip/svt/cxl_subsystem_svt/latest/doc/cxl_subsystem_svt_uvm_publi
c/html/monitor/class_svt_cxl_tl_monitor.html
❖ CXL Transaction Layer Sequencers
You can provide CXL sequences to the CXL Transaction Layer sequencer. All the available CXL
Transaction Layer sequencers are discussed in the Section 6.4 Sequencers.
❖ CXL Data Link Layer Driver (Type= svt_cxl_dl, Instance= dl_driver):
The svt_cxl_dl class defines the functions of the CXL Cache/mem Data Link Layer (DL) Driver in
the CXL Subsystem VIP. Within the Data Link Layer, the CXL driver gets sequences from the CXL
sequencer. The CXL driver then drives the CXL transactions on the CXL node.
❖ CXL Data Link Layer Monitor(Type= svt_cxl_dl_monitor, Instance= dl_mon):
The svt_cxl_dl_monitor class defines the functions of the CXL Cache/mem Data Link Layer (DL)
Monitor in the CXL Subsystem VIP. Once the CXL transaction on the bus is complete, the completed
sequence item is provided to the analysis node of monitor, which can be used by the testbench.
For the available Analysis TLM Ports at this level, refer the svt_cxl_dl_monitor class in the HTML
Class reference.
Link to HTML Class reference:
$DESIGNWARE_HOME/vip/svt/cxl_subsystem_svt/latest/doc/cxl_subsystem_svt_uvm_public/html/
monitor/class_svt_cxl_dl_monitor.html
❖ CXL Data Link Layer Sequencers
You can provide CXL sequences to the CXL Data Link Layer sequencer. All the available CXL Data
Link Layer sequencers are discussed in the section 6.4 Sequencers.
Feedback
112 Synopsys, Inc.
VC VIP CXL Subsystem
UVM User Guide CXL.mem and CXL.cache Agent
7.2 Configuration
The CXL.Cache/mem Agent is configured using an object of class svt_cxl_system_configuration
(cache_mem_sys_cfg is the handle) defined within the top level configuration class
svt_cxl_subsystem_configuration of CXL Subsystem VIP.
Refer the Section 3.4 for top level configuration class details. This chapter assumes that you have
Note already created the environment.
Feedback
Synopsys, Inc. 113
CXL.mem and CXL.cache Agent VC VIP CXL Subsystem
UVM User Guide
svt_cxl_system_configuration (cache_mem_sys_cfg)
|
|--------> host_cfg/device_cfg (<host_cfg/device_cfg>)
For all the available configuration attributes and functions related to CXL.Cache/mem agent, refer to the
HTML Class reference:
$DESIGNWARE_HOME/vip/svt/cxl_subsystem_svt/latest/doc/cxl_subsystem_svt_uvm_public/html
/configuration/class_svt_cxl_cache_mem_configuration.html
Example usage:
How to configure the DL Credit return priority between CXL.cache Vs CXL.mem for Host?
svt_cxl_subsystem_link_configuration cust_cfg;
/** Configuring the CXL.Cache/mem agent **/
// Sample Format ->
//<cust_cfg>.<host_cfg/device_cfg>.cache_mem_sys_cfg.<host_cfg[0]/device_cfg[0]>.<Cache
/mem configuration attribute>
/** Setting DL Credit return priority mode as PROT_PRIORITY_MODE - This indicates that the protocol
selected for credit return on the next outgoing flit will be based on the priority of protocol. If the desired
protocol (CXL.Cache or CXL.mem) has at least 1 credit, it gets priority over the other.**/
cust_cfg.host_cfg.cache_mem_sys_cfg.host_cfg[0].dl_credit_return_priority_mode =
svt_cxl_cache_mem_configuration::PROT_PRIORITY_MODE ;
Only the top-level configuration would be defined by you. After that, the instance handle
Note names remains fixed and must not be changed by you.
7.3 Status
This figure highlights the svt_cxl_system_status, which contains the set of status attributes related to
CXL Cache/mem Component that is present inside the top level status class: svt_cxl_subsystem_status.
Refer Section 3.5 for top level status class details. This chapter assumes that you have already
Note created environment svt_cxl_system_status is the Status class used to get the information
about CXL.Cache/mem Agent's status. svt_cxl_subsystem_status is the CXL Subsystem 'top
level' status class. It encapsulates the CXL.Cache/mem status class as an object.
Feedback
114 Synopsys, Inc.
VC VIP CXL Subsystem
UVM User Guide CXL.mem and CXL.cache Agent
svt_cxl_system_status contains instances of the class svt_cxl_status for both Host and Device
statuses
svt_cxl_status contains all the status attributes related to the CXL.Cache/mem agent.
svt_cxl_system_status (cache_mem_sys_status)
|
|--------> svt_cxl_status(host_cache_mem_status[0]/
device_cache_mem_status[0]>)
|
|--------> svt_cxl_tl_status (tl_status)
|
|--------> svt_cxl_dl_status (dl_status)
❖ CXL Transaction Layer Status (Type= svt_cxl_tl_status, Instance= tl_status):
svt_cxl_tl_status is a Transaction Layer Status class. This contains information related to the
CXL.Cache/mem Transaction Layer. Refer to the documentation of #svt_cxl_tl_status class for
more details.
❖ CXL Link Layer Status (Type= svt_cxl_dl_status, Instance= dl_status):
svt_cxl_dl_status is a Link Layer Status class. This contains information related to the
CXL.Cache/mem the Link layer. Refer to the documentation of #svt_cxl_dl_status class for more
details.
For all the available status attributes related to CXL.Cache/mem agent, refer to the HTML Class reference:
Feedback
Synopsys, Inc. 115
CXL.mem and CXL.cache Agent VC VIP CXL Subsystem
UVM User Guide
$DESIGNWARE_HOME/vip/svt/cxl_subsystem_svt/latest/doc/cxl_subsystem_svt_uvm_public/html
/status/class_svt_cxl_system_status.html
Example usage:
How to wait for CXL.Cache/mem DL link to be up?
/** Instances of Subsystem status */
svt_cxl_subsystem_status host_status;
// Sample Format:
//<subsystem_status_class_obj_handle>.cache_mem_sys_status.
<host_cache_mem_status[0]/device_cache_mem_status[0]>.dl_status.<status_attribute>
/** wait for the CXL.Cache/mem DL link to be up**/
wait(host_status.cache_mem_sys_status.host_cache_mem_status[0].dl_status.curr_fsm_state
== svt_cxl_dl_status::LINK_UP);
Only the top-level status handle is user-defined. After that, the instance handle names
Note remains fixed and must not be changed by the user.
7.4 Sequencers
There are two kinds of sequencers available in CXL Subsystem VIP.
1. Service Sequencers
These are used to schedule service sequences. These won't create any transactions and are used to
request a change in the behavior of the VIP.
2. Transaction Sequencers
These are used to schedule transactions sequences. These sequencers will generate the transactions.
The following figure highlights the svt_cxl_system_virtual_sequencer, which contains all the
sequencers related to CXL Cache/mem Component, present inside the top level sequencer class -
svt_cxl_subsystem_sequencer.
Feedback
116 Synopsys, Inc.
VC VIP CXL Subsystem
UVM User Guide CXL.mem and CXL.cache Agent
Only the top-level sequencer handle is user-defined. After that, the instance handle names remains
Note fixed and must not be changed by the user.
Feedback
Synopsys, Inc. 117
CXL.mem and CXL.cache Agent VC VIP CXL Subsystem
UVM User Guide
|
|--------> svt_cxl_channel_sequencer (dl_cache_rsp_seqr)
|
|--------> svt_cxl_channel_sequencer (dl_cache_data_seqr)
|
|--------> svt_cxl_channel_sequencer (dl_mem_ndr_seqr)
|
|--------> svt_cxl_channel_sequencer (dl_mem_data_seqr)
|
|--------> svt_cxl_flit_packer_sequencer
(dl_flit_packer_seqr)
|
|--------> svt_cxl_flit_sequencer (flit_seqr)
|
|--------> svt_cxl_dl_service_sequencer (dl_svc_seqr)
|
|--------> svt_cxl_dl_command_sequencer (dl_cmd_seqr)
Feedback
118 Synopsys, Inc.
VC VIP CXL Subsystem
UVM User Guide CXL.mem and CXL.cache Agent
7.5 Sequences
Similar to Sequencers there are two types of sequences related to CXL Cache/mem available in CXL
Subsystem VIP.
Those are:
1. Transaciton Sequences
2. Service Sequences
Transaction Sequences are used to generate traffic at different layers. On the other hand, Service sequences
are used for changing the behavior of VIP.
For the description about all the CXL Cache/mem sequences available, refer to the HTML Class reference:
$DESIGNWARE_HOME/vip/svt/cxl_subsystem_svt/latest/doc/cxl_subsystem_svt_uvm_public/html
/sequencepages.html
Feedback
Synopsys, Inc. 119
CXL.mem and CXL.cache Agent VC VIP CXL Subsystem
UVM User Guide
These transaction sequences are present at CXL Cache/meme Transaction Layer and Data Link Layer in the
CXL Subsystem VIP.
List of CXL.cache/mem Transaction sequences present at each layer
Example Usage:
How do I generate Single CXL.mem request using the Transaction sequence available ?
/* CXL.Cache/mem transaction sequence to generate the CXL.cache/mem requests */
svt_cxl_tl_virtual_cache_mem_sequence tl_cache_mem_seq;
/* Put the constraints to take no. of Mem Requests with Data (i.e. Mem Write) to 1 and remaining to 0 */
`uvm_do_on_with(
tl_cache_mem_seq,
vip_seqr.cache_mem_system_seqr.cache_mem_virt_seqr[0],
{ tl_cache_mem_seq.num_mem_rwd == 1;
tl_cache_mem_seq.num_mem_req == 0;
tl_cache_mem_seq.num_cache_req == 0;});
7.6 APIs
The APIs related to CXL.Cache/mem component are available in the CXL Subsystem VIP. These can be
used to create sequences (The existing sequences which are part of the example -
cxl_subsystem_svt/tb_cxl_subsystem_uvm_basic_sys can be referred for the usage of the APIs).
These APIs are present inside the sequence class - svt_cxl_subsystem_api_collection_sequence
For complete details on the available sequence APIs, refer to HTML Class reference:
$DESIGNWARE_HOME/vip/svt/cxl_subsystem_svt/latest/doc/cxl_subsystem_svt_uvm_public/html
/sequences/class_svt_cxl_subsystem_virtual_api_collection_sequence.html
To use these APIs, you can create their own sequence class by extending from the API base sequence class
and use the APIs to activate the link and to initiate the traffic.
Feedback
120 Synopsys, Inc.
VC VIP CXL Subsystem
UVM User Guide CXL.mem and CXL.cache Agent
host_seq.generate_cxl_tl_rand_mem_traffic(.cache_mem_link_num(cache_mem_link_num),
.num_mem_req(num_mem_req), .num_mem_rwd(num_mem_rwd)); host_seq_cnt++;
end
host_seq.generate_cxl_tl_rand_cache_mem_traffic(.cache_mem_link_num(0),.num_cache_req(1
), .num_mem_req(0), .num_mem_rwd(0)); host_seq_cnt++;
end end begin
repeat (sequence_length) begin
Feedback
Synopsys, Inc. 121
CXL.mem and CXL.cache Agent VC VIP CXL Subsystem
UVM User Guide
device_seq.generate_cxl_tl_rand_cache_mem_traffic(.cache_mem_link_num(0),.num_cache_req
(1), .num_mem_req(0), .num_mem_rwd(0));
device_seq_cnt++; end
end join
`svt_note("body", "Exiting..."); endtask: body
Example and Usage for using update_cxl_tl_mem_poison() method
This API is applicable for CXL.Mem and can be used for user specific poison injection/clearing at a given
Device address
fork
begin
// Guarded against the TL B2B topology
if (link_cfg.get_subsystem_comp_avlb(1,
svt_cxl_subsystem_configuration::CACHE_MEM_LL))
host_seq.activate_cache_mem_link(.link_num(cache_mem_link_num));
end
begin
// Guarded against the TL B2B topology
if (link_cfg.get_subsystem_comp_avlb(0,
svt_cxl_subsystem_configuration::CACHE_MEM_LL))
device_seq.activate_cache_mem_link(.link_num(cache_mem_link_num));
end
join
// Inject Poison at given address using TL Service Request
device_seq.update_cxl_tl_mem_poison(.cache_mem_link_num(0),
.addr(addr),.poison(1));
// Clear Poison for given address using TL Service Request
device_seq.update_cxl_tl_mem_poison(.cache_mem_link_num(0),
.addr(addr),.poison(0),.data(clean_data));
`svt_note("body", "Exiting...");
endtask: body
Feedback
122 Synopsys, Inc.
VC VIP CXL Subsystem
UVM User Guide CXL.mem and CXL.cache Agent
following code allows you to disable the default response sequence for all the Cache Memory Host and
Device response sequencers of the Transaction Layer.
virtual function void build_phase(uvm_phase phase ); string method_name =
"build_phase"; super.build_phase( phase );
for (int i = 0; i < cust_cfg.host_cfg.cache_mem_sys_cfg.num_host_agent ; i++) begin
cust_cfg.host_cfg.cache_mem_sys_cfg.host_cfg[i].enable_tl_user_rsp_seq = 1;
end
for (int i = 0; i < cust_cfg.device_cfg.cache_mem_sys_cfg.num_device_agent ; i++)
begin
cust_cfg.device_cfg.cache_mem_sys_cfg.device_cfg[i].enable_tl_user_rsp_seq = 1;
end
endfunction
After enabling this user-defined response sequence configuration, you can create your own response
sequence and use it in the test case.
Feedback
Synopsys, Inc. 123
CXL.mem and CXL.cache Agent VC VIP CXL Subsystem
UVM User Guide
Look for testcase ts.cxl_tl_backdoor_mem_wr_rd.sv in the basic examples which are present at:
$DESIGNWARE_HOME/vip/svt/cxl_subsystem_svt/latest/examples/sverilog
The test uses the sequence which is present in the HTML documentation at:
$DESIGNWARE_HOME/vip/svt/cxl_subsystem_svt/latest/examples/sverilog/tb_cxl_subsystem_uv
m_basic_sys/env/seq_and_cb/svt_cxl_subsystem_ts_cache_mem_sequence_collection/svt_cxl_s
ubsystem_ts_backdoor_mem_tl_wr_rd_sequence.sv
Step 3: Perform memory content initialization/ pre-loading using the API as below:
// Different initialization patterns are allowed, refer the HTML documentation
host_mem_backdoor.initialize(svt_mem_backdoor::INIT_CONST,0,0,((1 <<
link_cfg.cache_mem_sys_cfg.host_cfg[cache_mem_link_num].addr_width)-1));
7.8.2 Accessing the Memory Content Through Backdoor Mechanisms like Peek/Poke
To access memory content using backdoor approach, follow above Step 1 and Step 2 to create the backdoor
handle to memcore. Refer the above-mentioned test and sequence for reference. Then follow this step:
Step 3: Perform memory content write followed by read operation using the peek and poke APIs as below:
// First argument is aligned logical address, second argument is data to be poked into memory
void'(host_mem_backdoor.poke(address, data));
// First argument is aligned logical address, second argument is data peeked from the memory.
void'(host_mem_backdoor.peek(address, data));
The address must be aligned wrt the data width (defined by SVT_CXL_MAX_DATA_WIDTH), and the
Note address width will be defined by SVT_CXL_MAX_ADDR_WIDTH.
To run test ts.cxl_tl_backdoor_mem_wr_rd.sv, do following:
For running with Full Stack topology, use compile_snps_vip_pcie_serial.f
gmake USE_SIMULATOR=vcsvlog cxl_tl_backdoor_mem_wr_rd
SVT_CXL_SUBSYSTEM_COMPILE_FILE=compile_snps_vip_pcie_serial.f
For running with TL+DL topology, use compile_snps_vip_cxl_cache_mem.f
gmake USE_SIMULATOR=vcsvlog cxl_tl_backdoor_mem_wr_rd
SVT_CXL_SUBSYSTEM_COMPILE_FILE=compile_snps_vip_cxl_cache_mem.f
For running with TL Only topology, use compile_snps_vip_cxl_cache_mem_tl.f
gmake USE_SIMULATOR=vcsvlog cxl_tl_backdoor_mem_wr_rd
SVT_CXL_SUBSYSTEM_COMPILE_FILE=compile_snps_vip_cxl_cache_mem_tl.f
Feedback
124 Synopsys, Inc.
VC VIP CXL Subsystem
UVM User Guide
8
CXL ARB/MUX Agent
8.1 Overview
8.1.1 Agent Overview
ARB/MUX is needed for sharing the same Physical Layer for multiple Link Layers. On Data Path,
multiplexing is done at Flit level. Link Layers for each stack have separate credit checks before reaching
ARB/MUX. On Control Path, ARB/MUX provides abstraction and coordination with the remote side for
ACTIVE/PowerManagement transitions.
The svt_cxl_arb_mux_agent encapsulates ARB/MUX driver, sequencer and monitor. The
svt_cxl_arb_mux_agent can be configured to operate in active mode. The svt_cxl_arb_mux_agent is
configured using configuration svt_cxl_arb_mux_configuration. For transmit path,
svt_cxl_arb_mux_sequencer will receive the dispatched CXL.cache/mem flits from the DL driver. Within
the svt_cxl_arb_mux_agent, the svt_cxl_arb_mux driver gets svt_cxl_flit type sequence items from
the svt_cxl_arb_mux_agent sequencer. The driver also gets CXL.io Flits (svt_pcie_dl_packet) from PCIE
DL layer. The svt_cxl_arb_mux driver and monitor components within svt_cxl_arb_mux_agent call
callback methods at various phases of execution of CXL.cache/mem/io Flit. After the transaction on the bus
is complete, the completed sequence item is provided to the analysis port of port monitor, which can be
used by the testbench.
Virtual Link State Machine (vLSM) and ALMPs
The ARB/MUX maintains vLSM state for each CXL link layer it interfaces with - CXL.io and CXL.mem. It
receives requests from power management controller (PMC), local link layer and the remote ARB/MUX on
behalf of a remote link layer to resolve a single state request to forward to the physical layer.
The ARB/MUX uses ALMPs to communicate virtual link state transition requests and responses associated
with each link layer to the remote ARB/MUX. CXL ALMP transaction generated whenever there is ALMP
State Request or Status from Host or Device.
❖ ALMP transaction generated whenever there is L1.x, L2 request from Host or Device.
❖ ALMP transactions are generated after link-up and on successful ALMP handshake indicate
ARB_MUX is in active state and can accept packets from Data Link Layers.
❖ When link is up in cxl.io mode ALMP generation is bypassed as there is only one active link.
❖ Different vLSM states are RESET_NOP, ACTIVE, DAPM, L1_1, L1_2, L1_3, L1_4, L2, LINKRESET,
LINKERROR, RETRAIN LINKDISABLE
Feedback
Synopsys, Inc. 125
CXL ARB/MUX Agent VC VIP CXL Subsystem
UVM User Guide
Feedback
126 Synopsys, Inc.
VC VIP CXL Subsystem
UVM User Guide CXL ARB/MUX Agent
Feedback
Synopsys, Inc. 127
CXL ARB/MUX Agent VC VIP CXL Subsystem
UVM User Guide
Min value: 0
Max value: \`SVT_CXL_MAX_NUM_ARB_MUX (`SVT_CXL_MAX_NUM_ARB_MUX)
This parameter (num_arb_mux) is to be treated as read-only for any accesses from outside the
Note CXL subsystem configuration Writing/modifying this attributes may lead to unexpected
results from the VIP.
8.2 Configuration
Use the svt_cxl_arb_mux_configuration to define the overall behavior of the ARB/MUX component.
You must note that most configurable attributes are defined as SystemVerilog types. Consult the CXL
HTML Class Reference on declared data types.
Refer Section 3.4 for top level configuration class details. This chapter assumes the you have already
Note created the environment.
For all the available configuration attributes and functions related to CXL ARB/MUX agent, refer to the
HTML Class reference:
$DESIGNWARE_HOME/vip/svt/cxl_subsystem_svt/latest/doc/cxl_subsystem_svt_uvm_public/html
/configuration/class_svt_cxl_arb_mux_configuration.html
Feedback
128 Synopsys, Inc.
VC VIP CXL Subsystem
UVM User Guide CXL ARB/MUX Agent
Example usage:
How to introduce the delay while sending the ALMP requests from VIP to remote IO vLSM?
svt_cxl_subsystem_link_configuration cust_cfg;
/** Configuring the CXL.Cache/mem agent **/
// Sample Format ->
//<cust_cfg>.<host_cfg/device_cfg>.arb_mux_cfg[0].<host_cfg[0]/device_cfg[0].< ARB/MUX
configuration attribute>
/*Set the confiugrations for the dealy, in ns, after which VIP will send Active State
Request ALMP to remote IO vLSM during ARB/MUX Initialization */
8.3 Status
The svt_cxl_arb_mux_status class gives the specific status information related to ARB/MUX component.
Refer Section 3.5 for top level status class details. This chapter assumes the you have already
Note created the environment.
Feedback
Synopsys, Inc. 129
CXL ARB/MUX Agent VC VIP CXL Subsystem
UVM User Guide
For all the available status attributes related to CXL ARB/MUX agent, refer to the HTML Class reference:
$DESIGNWARE_HOME/vip/svt/cxl_subsystem_svt/latest/doc/cxl_subsystem_svt_uvm_public/html
/status/class_svt_cxl_arb_mux_status.html
Example usage:
How to wait for CXL.io vLSM to be in L1 states when creating low power scenario?
// Sample Format:
//<subsystem_status_class_obj_handle>.arb_mux_status[0].<ARB//MUX status_attribute>
Only the top-level status handle is user-defined. After that, the instance handle names remain fixed and
must not be changed by the user.
Feedback
130 Synopsys, Inc.
VC VIP CXL Subsystem
UVM User Guide CXL ARB/MUX Agent
8.4 Sequencers
CXL ARB/MUX agent has these service sequencers present for providing information to Arb/Mux for
Arb/Mux functionality. For transmit path, svt_cxl_arb_mux_sequencer receives the dispatched
CXL.cache/mem flits from the DL driver. Within the svt_cxl_arb_mux_agent. The svt_cxl_arb_mux
driver gets svt_cxl_flit type sequence items from the svt_cxl_arb_mux_agent sequencer.
Feedback
Synopsys, Inc. 131
CXL ARB/MUX Agent VC VIP CXL Subsystem
UVM User Guide
8.5 Sequences
List of sequences present at ARB/MUX layer:
svt_cxl_arb_mux_service_base_sequence This sequence is the base class for CXL ARB MUX Service
sequences. All the other sequences are extended from this
sequence.
8.6 APIs
The APIs related to CXL.ARB/MUX component are available in the CXL Subsystem VIP. These can be used
to create sequences (The existing sequences which are part of the example -
cxl_subsystem_svt/tb_cxl_subsystem_uvm_basic_sys can be referred for the usage of the APIs).
Feedback
132 Synopsys, Inc.
VC VIP CXL Subsystem
UVM User Guide CXL ARB/MUX Agent
Example:
Feedback
Synopsys, Inc. 133
CXL ARB/MUX Agent VC VIP CXL Subsystem
UVM User Guide
/**Specifies the almp byte_2 error values by corrupting rsvd fields to be injected */
int unsigned almp_byte2_error = $urandom_range(13,127);
/**Class Constructor*/
function new ( string name = "svt_cxl_arb_mux_almp_err_injection_cb");
super.new(name);
endfunction
Feedback
134 Synopsys, Inc.
VC VIP CXL Subsystem
UVM User Guide CXL ARB/MUX Agent
svt_cxl_arb_mux_callback_pool::add(env.device_env.arb_mux[i].driver,
drv_almp_err_cb);
end
endfunction :connect_phase
Feedback
Synopsys, Inc. 135
CXL ARB/MUX Agent VC VIP CXL Subsystem
UVM User Guide
Feedback
136 Synopsys, Inc.
VC VIP CXL Subsystem
UVM User Guide
9
Logical PHY Interface
Feedback
Synopsys, Inc. 137
Logical PHY Interface VC VIP CXL Subsystem
UVM User Guide
If_type svt_cxl_subsystem_types:LPIF_IF
is_phy_lpif 1,0
indicates whether the agent will drive the pl_* signals (1'b1) or lp_* signals
(1'b0)
1 lp_state_req_encoding Verify that lp_state_req does not indicate any reserved encodings
2 pl_state_sts_encoding Verify that pl_state_sts does not indicate any reserved encodings
3 pl_link_cfg_value Verify that pl_lnk_cfg does not indicate any reserved encoding when
pl_state_sts=RETRAIN or ACTIVE.
4 lp_port_activity Verify that none of the lp_* signal change their values till pl_portmode_val
is asserted
5 pl_speedmode_value Verify that pl_speedmode does not indicate any reserved encoding when
pl_state_sts=RETRAIN or ACTIVE.
8 pl_exit_cg_req_val_wrt_rst_and_ Verify that once asserted while exiting LP states or reset, pl_exit_cg_req
low_pwr_state stays asserted untill LTSSM advances
9 pl_exit_cg_req_is_glitch_free Verify that once asserted, pl_exit_cg_req does not toggle till
lp_exit_cg_ack gets asserted
Feedback
138 Synopsys, Inc.
VC VIP CXL Subsystem
UVM User Guide Logical PHY Interface
12 pl_state_sts_transit_frm_active_ Verify that when pl_state_sts changes from ACTIVE to any other state,
state both pl_stallreq and lp_stallack are high.
14 lpif_exit_condition_from_reset_st Verify that PL transition to the ACTIVE state upon observing lp_state_req
ate == RESET (NOP) for at least one clock while pl_state_sts is indicating
RESET; and then followed by observing lp_state_req == ACTIVE
16 stallack_val_wrt_lp_valid_and_lp Verify that when LL asserts lp_stallack, lp_valid and lp_irdy are both
_irdyl deasserted as well on the same lclk edge.
18 stallreq_low_wn_stallack_or_res Verify that when PHY deasserts pl_stallreq, lp_stallack is high or reset is
et_assrtd asserted. Also verify that pl_stallreq deasserts, within user specified time,
after lp_stallack is asserted.
20 phy_exiting_pm_state_upon_req Verify that PHY asserts pl_exit_cg_req, within user specified time, after LL
uest updates lp_state_req from PM to ACTIVE
23 lp_wake_ack_transition_wrt_lp_ Verify that pl_wake_ack is 1 only when lp_wake_req is asserted and gets
wake_req cleared when lp_wake_req has de-asserted
26 stall_req_ack_handshake Verify that PHY asserts pl_stallreq, within user specified time, after LL
updates lp_state_req to a PM state.
27 trdy_val_aftr_stallreqack_comple Verify that after successful completion of Stall protocol, PHY keeps pl_trdy
tion deasserted till pl_state_sts updates to ACTIVE
Feedback
Synopsys, Inc. 139
Logical PHY Interface VC VIP CXL Subsystem
UVM User Guide
28 pl_state_sts_updated_to_pm Verify that PHY updates pl_state_sts to the requested PM (decided after
DAPM & L1.x resolution) state, within user specified time, on successful
completion of Stall protocol.
29 pl_phyinl1_pl_phyinl2_val_in_l1_ Verify that PHY asserts pl_phyinl1 or pl_phyinl2, within user specified time,
or_l2 when lp_state_req was DAPM/L1.x or L2 respectively after successful
completion of Stall protocol.
30 l1x_pl_state_sts_val_for_dapm Verify that when LL requested DAPM, PHY updated pl_state_sts with any
of the L1.x values.
31 l1x_substate_pl_state_sts_return Verify that when LL requested L1.x, PHY updated pl_state_sts with same
ed or a lower L1.x value.
lpif_check_cov_fail_ctrl Attribute used to control LPIF FAIL protocol check coverage. When set to
1'b1, it enables LPIF FAIL check coverage.
Feedback
140 Synopsys, Inc.
VC VIP CXL Subsystem
UVM User Guide Logical PHY Interface
Feedback
Synopsys, Inc. 141
Logical PHY Interface VC VIP CXL Subsystem
UVM User Guide
Attributes Used:
Feedback
142 Synopsys, Inc.
VC VIP CXL Subsystem
UVM User Guide Logical PHY Interface
d. Opening the plan will automatically back annotate the coverage based on the HVP.
e. For Cache/Mem TL Protocol checks, load modifiers to filter the checks based upon Agent Type.
Click this Load modifiers icon in the Hvp window.
Feedback
Synopsys, Inc. 143
Logical PHY Interface VC VIP CXL Subsystem
UVM User Guide
Attribute Description
Feedback
144 Synopsys, Inc.
VC VIP CXL Subsystem
UVM User Guide Logical PHY Interface
Feedback
Synopsys, Inc. 145
Logical PHY Interface VC VIP CXL Subsystem
UVM User Guide
Feedback
146 Synopsys, Inc.
VC VIP CXL Subsystem
UVM User Guide
10
Debug Features
To ease the debugging process, Synopsys CXL Subsystem Verification IP provides you the following
logging support:
❖ CXL.cache/mem Transaction Logger
❖ CXL.io Transaction Logger
❖ CXL.io Flit Logger
❖ ARB/MUX Transaction Logger
❖ Symbol Logger
Transaction logging feature is supported for CXL IO/ Cache/ mem Protocols of CXL Subsystem SVT for
capturing the information at the following layers
❖ Transaction Layer and Data Link Layer:
At this level, VIP can capture both CXL.io transactions (TLPs, DLLPs) and CXL.Cache/mem
transactions into separate log files. Those are CXL.io Transaction Logger and CXL.cache/mem
Transaction Logger respectively.
Along with CXL.io Transaction Logger (which captures the information about TLPs and DLLPs
transmitted from and received by VIP), CXL.io Flit Logger is also supported. This log captures the
CXL.io flits handshake between CXL.io Data Link layer and ARB/MUX
❖ ARB/MUX Layer:
At this level, the transactions arrived and created at ARB/MUX will be captured into ARB/MUX
transaction log file.
❖ Flex bus Physical Layer:
At this level, VIP captures the symbols transmitted and received (with respect to VIP) on the lanes
into a separate log file.
By default, no transaction log file is generated (all the transaction log files generation is disabled by
Note default). To enable all the transaction log files generation, use the following command line option.
CXL Subsystem VIP specific command line option:
SVT_CXL_SUBSYSTEM_ENABLE_LOGGING=1
Or
Feedback
Synopsys, Inc. 147
Debug Features VC VIP CXL Subsystem
UVM User Guide
Configurations available for enabling individual log file generation can also be used.
If you want to print the transaction log with user-defined name, add it as:
for (int i = 0 ; i < cust_cfg.host_cfg.cache_mem_sys_cfg.num_cache_mem_agent; i++)
begin
cust_cfg.host_cfg.cache_mem_sys_cfg.cache_mem_cfg[i].transaction_log_filename=
"debug_log";
end
If different components are programmed to generate the transaction log with same name then a
Note combined transaction log will be generated.
Reporter Start End D Type Obj T Tag/ Addres Respon Meta Meta Snp RSP Rsp N Data
Time Time I Num C ID s se / Field Value Type pre data T [Hex
(ns) (ns) R [Hex] Opcod ]
e
Feedback
148 Synopsys, Inc.
VC VIP CXL Subsystem
UVM User Guide Debug Features
Field: Reporter
Description:
This field represents an instance of the VIP in the test environment. The transaction log information is
reported for this VIP instance.
Field: DIR
Description:
This field represents the direction of the transaction, based on the source and destination components
Field: Type
Description:
This field represents the Request Transaction type
Field: TC
Description:
This field represents the Traffic Class of the Request
Field: Tag / ID
Description:
This field represents the Tag for the mem transactions and ID for the cache transaction
Field: Address
Description:
Feedback
Synopsys, Inc. 149
Debug Features VC VIP CXL Subsystem
UVM User Guide
Address of transaction
Field: Response/ Opcode
Description:
Response type for cxl_transaction, Request / response Opcode for the cxl_channel_transaction
Field: NT
Description:
Non-Temporal type of transaction
Field: DATA
Description:
Data involved with the data transfer
DATA print:
Print of DATA in the log will be in 4 double word format(2 MSB, 2 LSB are picked).
Feedback
150 Synopsys, Inc.
VC VIP CXL Subsystem
UVM User Guide Debug Features
Field: Dir
Description:
This field represents the direction of the transaction from the VIP instance. "T" represents a transmit
Feedback
Synopsys, Inc. 151
Debug Features VC VIP CXL Subsystem
UVM User Guide
Field: TC VC
Description:
This field represents the value of the Traffic Class field of the TLP.
Field: TH
Description:
This field represents the 1-bit TH field of the common TLP packet header. The TH field is an indication of
the TLP Processing Hints (TPH) and the Optional TPH TLP Prefix when applicable presented in the TLP
header.
Field: PH
Description:
This field represents processing hint.
Field: IDO RO
Description:
These 2 fields represent the Ordering Attribute Bits as defined in Table 2-10 of the PCIe Specification.
Feedback
152 Synopsys, Inc.
VC VIP CXL Subsystem
UVM User Guide Debug Features
Field: NS
Description:
This field represents the No Snoop bit value of the TLP.
Field: Address
Reg#/MsgRt/Cpl
HdrFC DataFC
Description:
This field has multiple representations. For a TLP transaction, the value(s) displayed depends on the TLP
type as shown in the following table. For a DLLP transaction, the Flow Control header and data are
displayed.
<address> IO request:
This field represents the IO address
Feedback
Synopsys, Inc. 153
Debug Features VC VIP CXL Subsystem
UVM User Guide
Field: BE | ST
BC
MCode
Description:
This field has multiple representations of a TLP transaction.
Feedback
154 Synopsys, Inc.
VC VIP CXL Subsystem
UVM User Guide Debug Features
Field: Len/Idx DW
Description:
This field has 2 representations of a TLP transaction.
<payload length> For the TLP Header displayed on the first row of data, this field represents the
length of the payload in double word (DW)
<data index> For the TLP payload displayed from the second row of data and on, this field
represents the accumulative count of DW data
Feedback
Synopsys, Inc. 155
Debug Features VC VIP CXL Subsystem
UVM User Guide
Field: ECRC
Description:
This field represents the ECRC value of a TLP as defined in the PCIe Specification.
Field: LCRC
CRC
Description:
This field has 2 representations. For a TLP transaction, the LCRC value as defined in the PCIe
Specification is displayed. For a DLLP transaction, the CRC value as defined in the PCIe
Specification is displayed.
Field: TX/RX Error
Description:
This field represents the type of error injection when error injection is enabled in a transmit (tx)
transaction. For a receive (rx) transaction, this field represents the detected error.
Feedback
156 Synopsys, Inc.
VC VIP CXL Subsystem
UVM User Guide Debug Features
The fields of the CXL.io flit log header are described in this section. These fields are listed from left to right
as they appear on the header.
Field: Time
Description: This field represents the simulation time in ns when the transaction starts
Field: TX/RX
Description: This field represents the direction of the Flit. It will specify whether the flit is transmitted or
received with respect to VIP.
Example code present in the test to enable the transaction logging for the HOST is shown here:
Feedback
Synopsys, Inc. 157
Debug Features VC VIP CXL Subsystem
UVM User Guide
if(cust_cfg.host_cfg.num_arb_mux != 0) begin
for (int i = 0 ; i < cust_cfg.host_cfg.num_arb_mux; i++) begin
cust_cfg.host_cfg.arb_mux_cfg[i].enable_transaction_logging = 1;
end
end
By default, the log gets generated/ saved with Hierarchy of the component appended with. xact_log.
Example:
uvm_test_top.env.device_env.arb_mux[0].driver.xact_log
uvm_test_top.env.host_env.arb_mux[0].driver.xact_log
If you want to print the transaction log with user-defined name, add it as:
if(cust_cfg.host_cfg.num_arb_mux != 0) begin
for (int i = 0 ; i < cust_cfg.host_cfg.num_arb_mux; i++) begin
cust_cfg.host_cfg.arb_mux_cfg[i].transaction_log_filename = "debug_log";
end
end
Flit/
DLLP
SubT
ype
TLP
Type
R_ID
Requ Flit _Tag/
est Type ST | | |Phy | | | |
(IO/ IO VLSM Slot |llr |
CM/ DLLP/ Req/ Credit For |E- |Re-|Re- |Em-
ALM TLP/ Sts Return mat |Vi-|Wr-
Event Flit VSLM P) VLSM State Count S0 |Free|Wrap|
Reporter Time Dir Type [Prv Req/S [Req | S1 A |Seq|try|Init|pty|ra
[Curr
(ns) (Tx/ (IO/ VLS ts Data | S2 C BE SZ CRC l| Ptr|Buf |Val |
VLSM
Rx) CM) M] ====> ] Rsp] S3 K
Field: Reporter
Description:
This field represents the VIP component (HOST/DEVICE) with respect to which the Transactions received
or transmitted are mentioned
Feedback
158 Synopsys, Inc.
VC VIP CXL Subsystem
UVM User Guide Debug Features
This field represents the time when ARB Mux is observing the event
Feedback
Synopsys, Inc. 159
Debug Features VC VIP CXL Subsystem
UVM User Guide
Field: ACK
Description: This field indicates an acknowledgment of 8 successful flit transfers
Field: BE
Description:This field represents the Byte Enable field of the flit header
Field: SZ
Description:This Size field reflects the transmission of data at the half cache line granularity
Field: CRC
Description:This field represents CRC of the flit
Feedback
160 Synopsys, Inc.
VC VIP CXL Subsystem
UVM User Guide Debug Features
The Flit details are printed when flit is received from IO/CM DL. When Stream is received from PHY
Note layer, only flit type IO/CM is printed.
The symbol log filename is appended to the full hierarchical name of the port0 instance
Note generating it.
Field: INSTANCE
Description: This field represents an instance of the VIP in the test environment. The symbol log
information is reported for this VIP instance.
Field: < lane symbols >
Description: This field represents symbols on the active lane(s). The format of the field header is:
[R00] [R01] [R02] … [R<n>] | [T00] [T01] [T02] … [T<n>] Where, "R" represents the receive symbol on the
lane. "T" represents the transmit symbol on the lane.
<n> is the number of the highest configured lane.
The encodings of the lane symbols are listed in the following tables.
Field: LTSSM State
Feedback
Synopsys, Inc. 161
Debug Features VC VIP CXL Subsystem
UVM User Guide
Description: This field represents the state of the LTSSM state machine as defined in section 4.2.5 of the
PCIe specification. For states such as L0 and L0s where the receive (rx) and transmit (tx) LTSSM states may
diverge, the rx and tx states are displayed separately. Otherwise, only a single state is displayed for both rx
and tx states.
Symbol Description
z Electrical Idle
q Error injection pending: appended on each symbol that will have disparity
inverted. Only applies on Tx lanes
j Error injection pending: appended on each symbol that will have a random bit
flipped. Only applies on TX lanes.
v Error injection pending: appended on each symbol that will have an invalid
encoding. Only applies on TX lanes.
For link operation at 8GT/s, symbols after the sync headers are prepended with encodings of the sync
headers listed in this table.
Sync Header Encodings for Link Operation at 8GT/s
Symbol Description
@ 2'b'00 (Reserved)
$ 2'b'11 (Reserved)
Additional encodings for link operation at 8GT/s are listed in this table.
Special Character Encodings for Link Operation at 8GT/s
Symbol Description
Feedback
162 Synopsys, Inc.
VC VIP CXL Subsystem
UVM User Guide Debug Features
Symbol Description
Q Error injection pending on last symbol of a tlp or dllp: appended if last symbol
has disparity inverted. Only applies on TX lanes.
J Error injection pending on last symbol of a tlp or dllp: appended if last symbol
has a random bit flipped. Only applies on TX lanes.
V Error injection pending on last symbol of a tlp or dllp: appended if last symbol
has an invalid encoding. Only applies on TX lanes.
10.5.5 Synchronization of Simulation Time Between Transaction Log and Symbol Log
Transaction logging times represent times at the periphery of the VIP. Symbol logging times are captured at
the PIPE interface, which may be internal or external to the VIP depending on the interface type. For Serial
and PMA interface, there is no correlation between the time displayed in the transaction log and the symbol
log. Due to delay through the PHY layer, symbols are logged at a different time than the transaction log for
the same packet.
For PIPE interface, the simulation time displayed in the transaction log and symbol log are synchronized for
the same packet. The ‘Start Time’ of the transaction log corresponds to the time of a transaction with the
"STP" or "SDP" symbol in the symbol log. The ‘End Time’ of the transaction log corresponds to the time of a
transaction with the ‘END’ symbol in the symbol log.
Feedback
Synopsys, Inc. 163
Debug Features VC VIP CXL Subsystem
UVM User Guide
Feedback
164 Synopsys, Inc.