/ovm-2.0.1/examples/hello_world/ovm/hello_world.sv

http://camlet.googlecode.com/ · SystemVerilog · 54 lines · 25 code · 8 blank · 21 comment · 0 complexity · a03be06ddd7c3a855462544d87c826e2 MD5 · raw file

  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. module hello_world;
  23. `include "ovm.svh"
  24. `include "packet.sv"
  25. `include "producer.sv"
  26. `include "consumer.sv"
  27. `include "top.sv"
  28. top mytop;
  29. initial begin
  30. $timeformat(-9,0," ns",5);
  31. ovm_default_table_printer.knobs.name_width=20;
  32. ovm_default_table_printer.knobs.type_width=50;
  33. ovm_default_table_printer.knobs.size_width=10;
  34. ovm_default_table_printer.knobs.value_width=14;
  35. set_config_int("top.producer1","num_packets",2);
  36. set_config_int("top.producer2","num_packets",4);
  37. set_config_int("*","recording_detail",OVM_LOW);
  38. ovm_top.enable_print_topology = 1;
  39. //ovm_default_printer = ovm_default_tree_printer;
  40. ovm_default_printer.knobs.reference=0;
  41. mytop = new("top");
  42. ovm_default_table_printer.knobs.type_width=20;
  43. run_test();
  44. end
  45. initial #1us ovm_top.stop_request(); // stops run phase @ 1us
  46. endmodule