Code Browser Pages:
| //////////////////////////////////////////////// ////s~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~s//// ////s s//// ////s VMM Tutorial s//// ////s s//// ////s gopi@testbench.in s//// ////s~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~s//// //////////////////////////////////////////////// `include "vmm.sv" class my_env extends vmm_env; vmm_opts op = new(); virtual function void gen_cfg(); integer foo1; string foo2; bit foo3; super.gen_cfg(); `vmm_note(log,"START OF GEN_CFG "); foo1 = vmm_opts::get_int("foo1" , 10 , "Help for the option foo1: pass any integer between 0 to 100"); foo2 = vmm_opts::get_string("foo2" , "default_string" , "Help for the option foo2: pass any string"); foo3 = vmm_opts::get_int("foo3" , "Help for the option foo3: just use foo3 to enable "); `vmm_note(log,$psprintf("\n Run time Options \n foo1 : 0 \n foo2 : \n foo3 : 0 \n",foo1,foo2,foo3)); `vmm_note(log,"END OF GEN_CFG "); endfunction endclass program main(); initial begin my_env env; env = new(); env.run(); end endprogram |