/ovm-2.0.1/examples/hello_world/ovm/hello_world.sv
SystemVerilog | 54 lines | 25 code | 8 blank | 21 comment | 0 complexity | a03be06ddd7c3a855462544d87c826e2 MD5 | raw file
Possible License(s): Apache-2.0
1// $Id: //dvt/vtech/dev/main/ovm/examples/hello_world/ovm/hello_world.sv#6 $ 2//---------------------------------------------------------------------- 3// Copyright 2007-2008 Mentor Graphics Corporation 4// Copyright 2007-2008 Cadence Design Systems, Inc. 5// All Rights Reserved Worldwide 6// 7// Licensed under the Apache License, Version 2.0 (the 8// "License"); you may not use this file except in 9// compliance with the License. You may obtain a copy of 10// the License at 11// 12// http://www.apache.org/licenses/LICENSE-2.0 13// 14// Unless required by applicable law or agreed to in 15// writing, software distributed under the License is 16// distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 17// CONDITIONS OF ANY KIND, either express or implied. See 18// the License for the specific language governing 19// permissions and limitations under the License. 20//---------------------------------------------------------------------- 21`timescale 1ns / 1ns 22 23module hello_world; 24 25 `include "ovm.svh" 26 27 `include "packet.sv" 28 `include "producer.sv" 29 `include "consumer.sv" 30 `include "top.sv" 31 32 top mytop; 33 34 initial begin 35 $timeformat(-9,0," ns",5); 36 ovm_default_table_printer.knobs.name_width=20; 37 ovm_default_table_printer.knobs.type_width=50; 38 ovm_default_table_printer.knobs.size_width=10; 39 ovm_default_table_printer.knobs.value_width=14; 40 set_config_int("top.producer1","num_packets",2); 41 set_config_int("top.producer2","num_packets",4); 42 set_config_int("*","recording_detail",OVM_LOW); 43 ovm_top.enable_print_topology = 1; 44 //ovm_default_printer = ovm_default_tree_printer; 45 ovm_default_printer.knobs.reference=0; 46 mytop = new("top"); 47 ovm_default_table_printer.knobs.type_width=20; 48 run_test(); 49 end 50 51 initial #1us ovm_top.stop_request(); // stops run phase @ 1us 52 53endmodule 54