Download as pdf or txt
Download as pdf or txt
You are on page 1of 9

Xcelium Application Note

BASIC PROFILER
VS
ADVANCED PROFILER

This AppNote will help you understand when to use


Basic Profiler or Advanced Profiler.

Revision: 0.3
June 2021

Copyright Statement

© 2021 Cadence Design Systems, Inc. All rights reserved worldwide. Cadence and the Cadence logo are
registered trademarks of Cadence Design Systems, Inc. All others are the property of their respective
holders.
Basic Profiler vs Advanced Profiler

Contents
Purpose ...................................................................................................................... 3
Audience .................................................................................................................... 3
Overview .................................................................................................................... 3
Basic Profiler .............................................................................................................. 4
Advanced Profiler ....................................................................................................... 6
Summary .................................................................................................................... 8
References ................................................................................................................. 9
Support ...................................................................................................................... 9
Feedback ................................................................................................................... 9

Learn more at Cadence Support Portal - https://support.cadence.com


© 2021 Cadence Design Systems, Inc. All rights reserved worldwide. Page 2
Basic Profiler vs Advanced Profiler

Purpose
Xcelium has a utility to generate profiles for simulation, which are needed to identify the
areas for simulation performance analysis. Two different profiler utilities can give you
information on the performance of the simulation.

Audience
This appnote is intended for those users who want to understand when to use the Basic
Profiler and when to use the Advanced Profiler.

Overview
The profiler is a utility that measures where CPU time is spent during simulation. The
information in the output file helps to identify inefficient HDL coding practices. Once it has
been determined what code the simulator is spending most of its time running, improving
the efficiency of this code will have the greatest effect on the simulation performance. The
profiler internally keeps track of the number of "hits" in each of the different activities,
which approximates the amount of CPU time spent in these activities.

Xcelium has two different profilers:


• The basic profiler gives the type-based characteristics of the simulation. You can have
a look at the summary of the whole simulation along with details on each level.
Overall, the basic profiler gives enough information so that you don’t have to
move to advanced profiler. To generate the profile using basic profiler, use the
runtime option “-profile” along with the Xcelium runtime options. This will generate
a profile whose default file name xmprof.out).

• The advanced profiler is a GUI-based utility that gives advanced/detailed information


on the simulation performance. In addition to the information on the type-based
characteristics, it also gives information which is instance based for designs with more
testbench coverage in SV/UVM and gives information on caller-callee of the functions.
Using the Advanced Profiler causes a simulation performance overhead of 10-30%.
Therefore, it should only be used if there is:

o some overhead in function calls


o you are looking for some specific instances in detail
o if you have massive blocks and want to see which sub-block is taking
most of the time.
To generate the profile report using Advanced profiler, use the elaboration option “-
xprof” along with the Xcelium elab options. This will generate the database after the
simulation is complete.

Learn more at Cadence Support Portal - https://support.cadence.com


© 2021 Cadence Design Systems, Inc. All rights reserved worldwide. Page 3
Basic Profiler vs Advanced Profiler

Note: In case you provide both basic and advanced profiler switches -profile and -
xprof, the basic profiler “-profile” will get a higher precedence and Xcelium will not
generate advanced profiler database.

Basic Profiler
The Basic Profiler generates simulation characteristics of the testcase which includes
various sections in the final output file which is generated. The Basic Profile is
generated using the run-time command -profile.

xmsim -profile <other_options> <snapshot_name>


xrun -profile <other_options> <source_files>
The basic profiler dumps the profile information in a file (default is xmprof.out). The
sections of the profile report are as follows:

xmsim(64): 21.03-i810-20210225: (c) Copyright 1995-2021 Cadence Design Systems, Inc.


Linux scc288132 3.0.101-108.87-default #1 SMP Fri Feb 22 16:42:57 UTC 2019 (10e85a8) x86_64 4 CPUs, 64256
Meg RAM, 250 hits/sec,
model name: Intel(R) Xeon(R) CPU E3-1270 v6 @ 3.80GHz
cache size:8192 KB
xmelab options
-NEWPERF
-PLUSPERF
-MESSAGES
-ACCESS
+rwc
worklib
Profiled Intervals:
#start #stop #start_CPU #stop_CPU #CPS
[1] 0 NS to 273187.5 NS 51.7792 5271.5455 52.3371
Memory Usage - 48.0M program + 26440.2M data + 408.5M profile = 26896.7M total
Resident Memory Usage: 26029.5M (26029.5M Peak)
CPU Usage - 17.5s system + 5252.2s user = 5269.6s total (98.3% cpu)
License Acquisition Time - 3.3s
Snapshot Loading: CPU Usage - 10.5s system + 20.4s user = 30.8s total (230.8s, 13.4% cpu)

• The header section which provides information about the version of the tool,
machine details, OS details, %CPU, memory usage, and the command line
options.

Learn more at Cadence Support Portal - https://support.cadence.com


© 2021 Cadence Design Systems, Inc. All rights reserved worldwide. Page 4
Basic Profiler vs Advanced Profiler

• The Stream Type Summary Counts section summarizes the stream counts by the
type of stream or other activity. For example, there might be a total for logic
primitives, timing checks, always or initial statements, non-blocking assignments,
continuous assignments, and so on. This section gives a general idea of where
simulation time is being spent.

------------------------------------------------------------
Stream Type Summary Counts (1450501 hits total)
------------------------------------------------------------
%hits #hits #inst name
59.4 861802 [257122] Always statements
9.7 141021 [25333] Anonymous continuous assignments
9.4 135812 [ ] Simulation Engine Time
3.8 55584 [230112] Non-blocking assignments
3.7 53035 [79092] Verilog tasks
3.3 47866 [82559] Verilog functions
3.1 44759 [103979] Continuous assignments
1.6 23774 [ ] Gate Evaluation Methods
1.5 22472 [ ] Randomization
1.4 19836 [47270] Initial statements
0.9 13625 [ ] SystemC kernel and user processes
0.6 8017 [ ] User-defined primitives
0.4 6071 [ ] Logic primitives
0.3 4229 [ 7167] Other behavioral code
0.2 3116 [ ] CAG2 stream
0.2 2495 [ 2582] Parallel block sub-processes
0.1 2126 [ ] IOPATH Delays
0.1 1575 [ ] System Verilog Garbage Collection
0.1 999 [ ] TCL Functions
0.1 747 [ ] HDL C interface
0.0 485 [ ] Wire evaluation
0.0 404 [ 160] Clocking Block
0.0 300 [ ] Engine support
0.0 175 [ ] Unknown EVS construct
0.0 123 [ 189] Force/assign statements
0.0 44 [ ] Outside engine
0.0 9 [ ] Support for callbacks (or UI)

• The Stream Counts section reports the blocks or the tasks that consume most of
the time. It provides information about the time spent in individual generated code
streams like always blocks, initial blocks, continuous assignments, NBAs, and so
on.

Learn more at Cadence Support Portal - https://support.cadence.com


© 2021 Cadence Design Systems, Inc. All rights reserved worldwide. Page 5
Basic Profiler vs Advanced Profiler

------------------------------------------------------------
Stream Counts (1450501 hits total)
------------------------------------------------------------
%hits #hits #inst name
1.2 17953 [ 2072] Always stmt (file: /projects/../rtl/oct_onehot_mux_m.sv, line: 34 in worklib.oct_onehot_mux_m
[module])
1.2 17482 [ ] Method SSS_MT_DU_PTRNFW (method)
0.9 13625 [ ] SystemC process execution
0.9 12823 [ ] SV randomization language processing (svrnc)
0.9 12560 [ ] Method SSS_MT_DU_BYTENFW (method)
0.8 11727 [ 488] Always stmt (file: /projects/. . ./rtl/rs_rcmpl_match_m.sv, line: 37 in worklib.rs_rcmpl_match_m
[module])
0.8 11121 [ ] Method SSS_MT_SVHASSIGN_ER_US (method)
0.3 4963 Library function svh_dec
0.7 10603 [ 1276] Always stmt (file: /projects/. . ./rtl/oct_onehot_mux_m.sv, line: 34 in worklib.oct_onehot_mux_m
[module])
0.7 9572 [ ] SV randomization strategy and solver (rnc)
0.7 9437 [ 56] Initial stmt (file: /projects/. . ./sv/bb_interface.sv, line: 626 in hvllib.bb_interface [module])
……

For more details on how to do the analysis from basic profiler report, refer the other
appnote in the References section.

Advanced Profiler
The Advanced Profiler provides detailed information on the simulation characteristics in
addition to what the Basic Profiler provides. This profile is generated using the -xprof
option in elaboration time, which creates a database when the simulation is complete.
Using the Advanced profiler, you can see a performance degradation of 10-30%.
Therefore, its use is recommended only when you want to look at the instances, caller-
callee relationship of the functions or sub-blocks in case of big blocks.

This profiler database is read by a GUI tool xprof present inside the Xcelium installation
area. The argument to the -load option is the directory that contains
the xprof.xpd database. For example:

xprof -load xprof_report_dir/prof_cpu

Learn more at Cadence Support Portal - https://support.cadence.com


© 2021 Cadence Design Systems, Inc. All rights reserved worldwide. Page 6
Basic Profiler vs Advanced Profiler

This will open a GUI window that will show general information like, the tool version,
machine details, OS details, %CPU, Memory usage, etc., similar to the basic profiler.

On analyzing this profiler data, you can see instance-based, type-based, and category-
based views.

The instance-based view shows the time spent in each instance of the design and
verification environment in a hierarchical tree view (top to bottom), where Self % means
the time consumed by this instance and cumulative grade means the time consumed by
this hierarchy.

Learn more at Cadence Support Portal - https://support.cadence.com


© 2021 Cadence Design Systems, Inc. All rights reserved worldwide. Page 7
Basic Profiler vs Advanced Profiler

The type-based view is similar to that of the basic profiler, as it lists the time spent in each
type. A type is HDL scope or CU scope. "Self %" shows the time spent in a type including
the sum of all the instances of the same type.

The categories view shows multiple categories like time spent in user assertion code,
time spent in SV class-based Tasks /Functions and the caller-callee relationship, time
spent in user HDL blocks, and time spent in SV class randomization.

For more details on the Advanced profiler, refer to the links given in References section.

Summary
To summarize, the Basic Profiler will help you check the overall type-based simulation
characteristics like, the various tool options used, type-based code stream hits, most
active modules, summarizing by grouping the total simulation time consumption in
continuous assignments, always blocks, functions, tasks, clocking blocks etc. The basic
profiler also gives details on the broad categories like RTL, Testbench, GLS,
Randomization etc.

The Advanced Profiler provides an instance-based view, profiles the sub-blocks and
helps identify which sub-block is consuming most of the time and provides a callgraph
Learn more at Cadence Support Portal - https://support.cadence.com
© 2021 Cadence Design Systems, Inc. All rights reserved worldwide. Page 8
Basic Profiler vs Advanced Profiler

with caller-callee relationship and details. Using the Advanced Profiler causes a
simulation performance overhead of 10-30%.

References
• For details on looking at the Basic Profiler report, please refer the following
article: Analyzing Xcelium Simulator Performance.
• FAQ: Frequently Asked Questions on performance and usage of Xcelium /
Incisive profiler
• Advanced Profiler User Guide
• Incisive Unified Profiler Videos : These Incisive Unified Profiler Videos introduce
you to its basic features, callgraph features, how to profile PLI, VPI or DPI
contribution, and first-level analysis of memory profiler.
• Using the Advanced Profiler (Video) : This video helps you to get started locating
performance bottlenecks with the Advanced Profiler. It demonstrates the use of
the Advanced Profiler to profile a simulation and
graphically analyze the profile data.

Cadence Learning and Support


Cadence Learning and Support Portal provides access to support resources, including
an extensive knowledge base, access to software updates for Cadence products, and
the ability to interact with Cadence Customer Support. Visit
https://support.cadence.com.

Feedback
Email comments, questions, and suggestions to [email protected].

Learn more at Cadence Support Portal - https://support.cadence.com


© 2021 Cadence Design Systems, Inc. All rights reserved worldwide. Page 9

You might also like