pli.v

来自「Verilog Parser in Perl」· Verilog 代码 · 共 37 行

V
37
字号
// DESCRIPTION: Example pli file for vpassert program// This file ONLY is placed into the Public Domain, for any use,// without warranty, 2000-2009 by Wilson Snyder.`timescale 1ns/1nsmodule pli;   // A module called PLI is required, to contain the error counts   // This is required with the vpassert --nostop option, which this example uses   // By default (--stop), this file isn't needed at all   integer errors; initial errors = 0;   integer warnings; initial warnings = 0;   // Normally this would be 0 at startup, then become 1 after reset deasserts   // This prevents false assertion checks during reset   integer message_on; initial message_on = 1;   always @ (errors or warnings) begin`ifdef OPTIONAL_EXIT_ON_WARNING      if (errors!=0 || warnings!=0) begin	 $uinfo (0, "Errors/warnings found, exiting!\n");	 $finish;      end`else      if (errors!=0) begin	 $uinfo (0, "Errors found, exiting!\n");	 $finish;      end      else if (warnings!=0) begin	 $uinfo (0, {"Warnings found, ","consider stopping!\n"});      end`endif   endendmodule

⌨️ 快捷键说明

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