System Verilog OVM – Hello World Program

Here is hello world program in

System Verilog Open Verification Methodology

Download here. hello_ovm

// Filename :

// Author : A.G.Raja

// License : GPL

// Website :

module hello_ovm;

`include “ovm.svh”

class Random extends ovm_transaction;

rand int num;

constraint c { num >= 0 && num < 50; }

function new(string name);;



Random r;

initial begin

r = new(“Hello OVM”);



$psprintf(“Hello World”));



// End of file

One liner to run this in IUS

When OVM library is not installed by default:

1) Set OVMHOME to the root directory where OVM library is installed

setenv OVMHOME /netstar/ag.raja/sv/OVM/ovm-1.1

2.a) IUS 6.2-s003 and IUS 6.2-s004

irun -sv -nowarn PMBDVX -ovmhome $OVMHOME $OVMHOME/src/

2.b) IUS 6.2-s005

irun -sv -ovmhome $OVMHOME $OVMHOME/src/

When OVM is already installed to $CDS_INST_DIR/tools/ovm

a) IUS 6.2-s003 and IUS 6.2-s004

irun -sv -ovm -nowarn PMBDVX

b) IUS 6.2-s005

irun -sv -ovm

Using Options File

irun –f options_file

// options_file begins here



// options_file ends here

Download here. hello_ovm


3 thoughts on “System Verilog OVM – Hello World Program

  1. Pingback: System Verilog OVM - Hello World Program | 101 Articles

  2. Pingback: Electronics

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s