Is Specman Still Relevant Using Uvm ML To Take Advantage of Multiple Verification Languages
Is Specman Still Relevant Using Uvm ML To Take Advantage of Multiple Verification Languages
Abstract- Introduction: Silicon Design Lab (SDL) has a long history of developing and using industry leading
verification methodologies. In the past, SDL utilized a proprietary methodology based on TestBuilder and SystemC. More
recently, we have built our simulation environments with UVM, utilizing both Specman/e and SystemVerilog verification
languages. Through the years, we have seen the need to have a flexible environment which supports multiple verification
languages all working together. As a result, we have adopted the Accellera UVM multi-language (UVM-ML) approach
within our organization. With this approach, we are well equipped to use powerful verification languages such as
Specman/e, utilize a broad range of verification collateral developed in UVM-SV, and support partner and industry
engagements with other companies utilizing verification collateral based on SystemC and C++.
UVM-ML is widely adopted across the industry, companies, and EDA making VLSI teams well served to understand
its use and capability. This paper will provide insight into how we adopted UVM-ML, will describe a side-by-side example
of a verification component that was written in both UVM-SV and UVM-e, and will showcase how UVM-ML has equipped
us to easily adapt to a rapidly changing environment including the enablement of emerging industry standard interfaces.
I. INTRODUCTION
In today’s verification landscape, teams must use a wide variety of technologies to verify the increasingly complex
designs. Teams must make use of VIP developed from a wide range of sources from internally developed VIP and
purchased 3rd party VIP, to content from partner organizations. With all of these sources and the long history of
verification technology, these VIPs may come in many languages and many forms. UVM, specifically UVM-SV, has
recently become the de facto standard for VIP in the industry, but there are still many VIPs that were and are developed
using Specman/e or SystemC, among others. This paper will focus on case studies involving the integration and
interoperability of VIPs from these three languages, Specman/e, SystemVerilog, and SystemC.
A. What is UVM-ML
What exactly is UVM-ML? As background, UVM itself is a standard that aims to improve the interoperability of
VIP along with reducing the cost of repurchasing or rewriting IP for each new project [1]. Included in the methodology
is a standard class reference implemented in SystemVerilog (referred to in this paper as UVM-SV). Other languages
have also implemented part or all of the methodology including Specman/e (UVM-e) and SystemC (UVM-SC). To
support the interoperability goal of UVM, a framework is needed to facilitate the mixing of these languages as teams
combine VIPs from various sources. UVM-ML provides this framework in the form of an open source library that
enables the integration of components written in multiple languages.
UVM-ML Stimulus
Integrating stimulus mechanisms across multiple languages is required in order to provide a full featured UVM-ML
environment. Using the type mapping and data serialization concepts described earlier allows for the transfer of
sequence items as well as sequences between languages. UVM-ML provides a set of TLM ports and implementations
to facilitate the passing of data between the sequencers of different languages. These ports help to define a “proxy”
sequencer that can be used in the foreign language and interact with the native language sequencer of the UVM
component being used to drive stimulus
UVM-ML defines mechanisms for splitting the randomization between the different languages such that some fields
are randomized first by the test and then later additional fields are randomized in the native language of the component.
SDL has found that for the use cases encountered keeping the randomization entirely within a single language greatly
reduces the complexity and keeps the interface consistent from the test writer’s perspective. The primary downside
to doing the randomization this way is that it requires providing (or duplicating) all of the necessary constraints into
both languages. This adds some overhead and maintenance to the solution, but it is a tradeoff between support costs
on a smaller component development team vs sequence test complexity which would be seen by a much larger set of
DV engineers.
In sophisticated UVM components, it is not uncommon for the sequencer to provide functionality to its sequences
to aid in creating interesting and complex stimulus. With UVM-ML, the test writer no longer has direct access to the
native sequencer that the sequences will be run on. It takes some thought and care to develop an API that will be
exported to the foreign language for use by the remote sequences. One example of this from the use cases is that the
packet contains an extensive amount of code that was needed in post_randomize() to calculate some of the fields
that could not be randomized. To solve this, a non-blocking transport TLM port was added to “finalize” the packet.
The transport TLM allows the packet to be sent across to the native language, finalize the packet as if
post_randomize() had been called, and then update the contents back into the original packet so that from the user’s
perspective post_randomize() just gets called as expected even though it was in a foreign language. Using the TLM
ports in this way greatly reduce the amount of code that would need to be present in both languages, allowing for
effective reuse of the content.
extend abc_seq_driver_proxy {
!finalize_pkt_out: out interface_port of tlm_nonblocking_transport of (abc_pkt, abc_pkt);
};
extend abc_pkt {
post_generate() is also {
finalize_pkt();
};
finalize_pkt() is {
var tmp: abc_pkt;
if(finalize_pkt_out == NULL) {
if(driver != NULL) {
finalize_pkt_out = ml_driver.finalize_pkt_out;
} else {
dut_error("abc_pkt finalize_pkt can’t find valid TLM port");
};
};
compute finalize_pkt_out$.nb_transport(me, tmp);
// Copy back all fields from tmp to me that can be changed by finalize_pkt
// Details up to implementation (could use reflection, or just plain asignments)
};
};
extend abc_seq_driver_proxy {
!tracked_reqs: list(key: struct_id) of abc_ml_tracker;
get(req : *any_sequence_item)@sys.any is {
var pkt: any_sequence_item;
pkt = get_next_item();
// Instead of returning the item directly we wrap it in a “tracker” for
// later processing the deferred response
var tracker: abc_ml_tracker = new with {
.pkt = pkt.as_a(abc_pkt);
.struct_id = sn_unique_id_for_struct(pkt);
};
track_request(tracker);
req = tracker;
};
track_request(tracker: abc_ml_tracker) is {
// Add qualifications for request tracking so that only packets/requests
// that eventually receive a response are added to the list
tracked_reqs.add(tracker);
};
try_put_deferred_resp(resp: abc_ml_tracker): bool is {
if(tracked_reqs.key_exists(resp.struct_id)) {
var req: abc_pkt;
req = tracked_reqs.key(resp.struct_id).pkt;
// Call whatever “response done” processing API is used
req.set_response_done(resp.pkt);
tracked_reqs.delete(tracked_reqs.key_index(resp.struct_id));
} else {
check NO_TRACKED_REQ_EXISTS that FALSE else
dut_error("No tracked request exists with struct_id=", resp.struct_id);
};
};
};
One feature common in many of the interface VCs being developed was the need for active agents to act as an
“auto-responder” for requests monitored on the interface. This was done in the UVM-SV VC by automatically
creating response sequences from a common response sequence base class. Within a purely UVM-SV test bench, it
would be possible to change the behavior of the response sequences by using class extensions of the response sequence
along with type overrides in the UVM factory. While this would still be possible from a UVM-ML environment, it
would have exposed more of the multi-language aspects to the test writers primarily writing Specman/e code. Instead
SDL created several configuration modes and structures that are interpreted by the response sequence to change its
behavior. The result is a comprehensive set of functionality to support various auto-responder behaviors. The down
side is the need to edit a common source for all of the functionality. SDL chose to place a slightly higher burden on
the VC development team instead of pushing the extra complexity to the much larger group primarily using UVM-e
for test development.
extend abc_ml_env_u {
config: abc_config_obj;
!ml_check_config: abc_config_obj;
config_dbg(cfg: any_struct, msg: string): any_struct is {
message(LOW, "uvm_config_set(", me.e_path(), ".*sv_proxy*,", msg, ")") {
print cfg;
};
result = cfg;
if(cfg is a abc_config_obj (my_cfg)) {
ml_check_config = deep_copy(my_cfg);
};
};
keep uvm_config_set("*sv_proxy*", "config_obj", config_dbg(config, "config_obj"));
post_generate() is also {
var cfg_diffs: list of string;
cfg_diffs = deep_compare(config, ml_check_config, 100);
if(!cfg_diffs.is_empty()) {
// Print differences and thrown an error
};
};
Several of the VCs in the use cases explored required the use of parameters within the UVM-SV component.
Typically this has occurred when the SV interface itself is parameterized. In order for the driver, monitor, etc. to get
the correct virtual interface, those components must know the parameter values. This requires passing the parameter
values down through the UVM-SV component hierarchy. This poses a challenge for the unified hierarchy with UVM-
ML as the instantiation of a UVM-SV component from UVM-e is done using a string based lookup in the UVM
factory. To solve this problem, the VCs implement a string representation of the set of parameterized VCs that can
be created. Those strings are then used to add explicit strings to the UVM factory for each possible use case. See
Example 4 for details. This can get quite verbose if there are large numbers of parameters with many valid
permutations. This has not been an issue in the cases evaluated here, but some form of automation could be used if
the list grew too large or complex.
Example 4: Using Parameterized UVM-SV Components with the Unified UVM-ML Hierarchy
read/write vr_ad_proxy_agent
peek/poke vr_ad_proxy vr_ad_proxy
UVM-SV Register reg_adapter sequencer
Model
vr_ad2reg_predictor
vr_ad_proxy vr_ad_proxy
monitor driver
TLM Port TLM Port
Backdoor
TLM Port TLM Port
Peek/Poke
UVMe Register Model (vr_ad)
DUT
Frontdoor
Read/Write Active
Register
Interface VC
Gen-Z Env
TX Agent
Protocol
Emulators/
RX Agent Sequencer
Checkers Gen-Z Env
TX Agent
Mon Mon Driver
Protocol
Emulators/
CODI-GzSpec
RX Agent Sequencer
Mon Adapter
Mon Adapter
Seq Adapter
Checkers
Adapter
DUT DUT
Figure 2: Gen-Z CODI and Gen-Z PLA Interface VCs
Performance Analysis
e Tests / Sequences
Checkers and
Scoreboards
UVM-e
Gen-Z ML Proxy
Config
RX Agent TX Agent
Proxy
Mon Mon Sequencer
TLM Port TLM Port TLM Port
UVM-SV
Gen-Z ML Env
Gen-Z Env
Config TX Agent
IV. CONCLUSIONS
SDL has been using UVM-ML functionality for multiple years across numerous projects and designs. The use
cases discussed in this paper have been in use for over a year and a half. Through these projects, SDL has been able
to take advantage of many of the advanced testing features available in Specman/e while utilizing a variety of UVM-
SV content from internally developed VCs to externally purchased Verification IPs. This technology has also enabled
us to make content available in a language native way across both UVM-e and UVM-SV test benches. There certainly
have been costs to developing the content to be multi-language aware, but that scope has been fairly localized to a
small component development team. Through the capabilities already present in UVM-ML as well as those added by
SDL itself, the larger integration and test teams have been insulated from most of the multi-language aspects.
So is Specman still relevant? We believe yes! It is still relevant to our industry as it has many advanced features
that are not available in other languages. However UVM-ML is a necessary component of that solution as it is clear
that no one language has yet filled all of the needs of the verification industry.
V. REFERENCES