This example shows a SV producer driving an SC consumer via a TLM2 UVMC connection, and an SC consumer sending transactions to a SV scoreboard via a TLM1 analysis connection. It also makes a local UVM analysis connection between the producer and scoreboard. See UVMC Connection Example - Basic Testbench, SV side for the SV portion of this example.

The sc_main function below creates and starts the SC portion of this example. It does the following:
| UVMC Connection Example - Basic Testbench, SC side | |
| This example shows a SV producer driving an SC consumer via a TLM2 UVMC connection, and an SC consumer sending transactions to a SV scoreboard via a TLM1 analysis connection. |
//
//------------------------------------------------------------//
// Copyright 2009-2012 Mentor Graphics Corporation //
// All Rights Reserved Worldwid //
// //
// Licensed under the Apache License, Version 2.0 (the //
// "License"); you may not use this file except in //
// compliance with the License. You may obtain a copy of //
// the License at //
// //
// http://www.apache.org/licenses/LICENSE-2.0 //
// //
// Unless required by applicable law or agreed to in //
// writing, software distributed under the License is //
// distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR //
// CONDITIONS OF ANY KIND, either express or implied. See //
// the License for the specific language governing //
// permissions and limitations under the License. //
//------------------------------------------------------------//
#include "uvmc.h"
using namespace uvmc;
#include "consumer.h"
int sc_main(int argc, char* argv[])
{
consumer cons("cons");
uvmc_connect(cons.in,"stimulus");
uvmc_connect(cons.ap,"analysis");
sc_start(-1);
return 0;
}