⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 invoke_options_test.v

📁 pli_handbook_examples_pc verilog hdl 与C的接口的典型例子
💻 V
字号:
/**************************************************************************
 * $test_invoke_options example -- Verilog test bench source code
 *
 * Verilog test bench to test the $test_invoke_options PLI application.
 *
 * NOTE: This test uses two supplemental files: invoke_options_test1.f and
 * invoke_options_test1.f.  This test is designed to be invoked as follows:
 *
 *   <simulator_name> +a +b -f invoke_options_test1.f +c
 *
 * For the book, "The Verilog PLI Handbook" by Stuart Sutherland
 *  Book copyright 1999, Kluwer Academic Publishers, Norwell, MA, USA
 *   Contact: www.wkap.il
 *  Example copyright 1998, Sutherland HDL Inc, Portland, Oregon, USA
 *   Contact: www.sutherland.com or (503) 692-0898
 *************************************************************************/
`timescale 1ns / 1ns
module test;
  reg option_exists;
  initial
    begin
      option_exists = $test_invoke_options("+test1");
      if (option_exists)
        $display("\nSimulation WAS invoked with a +test1 option\n");
      else
        $display("\nSimulation was NOT invoked with a +test1 option\n");

      if ($test_invoke_options("+test2"))
        $display("\nSimulation WAS invoked with a +test2 option\n");
      else
        $display("\nSimulation was NOT invoked with a +test2 option\n");

      #1 $finish;
    end

endmodule

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -