VPASSERT(1p)
π NAME π
vpassert β Preprocess Verilog code assertions. It's giving "turn your assertions into something a simulator can actually eat" energy. π
β¨ SYNOPSIS β¨
vpassert [ --help ] [ --date ] [ --quiet ] [ -y directories... ] [ files... ]
π¦ DESCRIPTION π¦
Okay so vpassert will read the specified Verilog files and preprocess special PLI assertions. The files are written to the directory named .vpassert unless another name is given with -o. If a directory is passed, all files in that directory will be preprocessed. Lowkey iconic. π
πΈ ARGUMENTS πΈ
Standard VCS and GCC-like parameters are used to specify the files to be preprocessed:
+libext+I<ext>+I<ext>...β Specify extensions to be processed. Bestie, tell it what file endings to care about.-f I<file>β Parse parameters in file. It's giving "read the vibes from this file".-v I<file>β Parse the library file (I<file>). Library file, periodt.-y I<dir>β Parse all files in the directory (I<dir>). Every single one.-II<dir>β Parse all files in the directory (I<dir>). Yes, that's-IIwith two I's, no cap.+incdir+I<dir>β Parse all files in the directory (I<dir>). Include directory energy.
To prevent recursion and allow reuse of the input.vc being passed to the simulator, if the output directory is requested to be preprocessed, that directory is simply ignored. So don't worry, it's not going to loop forever. π
π OPTIONS π
--allfilesβ Preprocess and write out files that do not have any macros that need expanding. By default, files that do not need processing are not written out. This option may speed up simulator compile times; the file will always be found in the preprocessed directory, saving the compiler from having to search a large number of-vdirectories to find it. It's giving "make the compiler's life easier" energy. β¨--axiomβ Special Axiom ATHDL enables/disables added around unreachable code. Axiom energy.--call-error <function>β When$uerror(or$uassertetc.) wants to display a message, call the specified function instead of$displayand$stop. Custom function, no cap.--call-info <function>β When$uinfowants to display a message, call the specified function instead of$display. Info vibes.--call-warn <function>β When$uwarn(or$uwarn_clketc.) wants to display a message, call the specified function instead of$displayand$stop. Warn vibes.--dateβ Check file dates and sizes versus the last run ofvpassertand don't process if the given source file has not changed. It's giving "skip the work if nothing changed" energy. β³--excludeβ Exclude processing any files which begin with the specified prefix. Bye, files that start with that prefix. π--helpβ Displays this message and program version and exits. Help, bestie. π--language <1364-1995|1364-2001|1364-2005|1800-2005|1800-2009|1800-2012|1800-2017|1800-2023>β Set the language standard for the files. This determines which tokens are signals versus keywords, such as the ever-common"do"(data-out signal, versus a do-while loop keyword). Choose your era, periodt.--minimumβ Include__message_minimumin the$uinfotest, so that by defining__message_minimum=1some uinfos may be optimized away at compile time. Compile-time optimization, slay.--nolineβ Do not emit`linedirectives. If not specified they will be used under--language 1364-2001and later. No line directives, bestie.--nopliβ Delete all 'simple' PLI calls. PLI function calls inside parenthesis will not be changed, and thus may still need to be manually ifdef'ed out. Useful for reducing the amount ofifdef's required to feed non-PLI competent synthesis programs. Synthesis-friendly, fr fr.--nostopβ By default,$errorand$warninsert a$stopstatement. With--nostop, this is replaced by incrementing a variable, which may then be used to conditionally halt simulation. No stop, just increment. π’--o fileβ Use the given filename for output instead of the input name.vpassert. If the name ends in a/it is used as a output directory with the default name. Output name custom, bestie.--quietβ Suppress messages about what files are being preprocessed. Shhh. π€«--realintentβ Special RealIntent enable/disables added around unreachable code. RealIntent energy.--synthcovβ When"ifdef SYNTHESIS"is seen, disable coverage. Resume on the`elseor`endif. This does NOT follow child defines, for example:
`ifdef SYNTHSIS
`define MYSYNTH
`endif
`ifdef MYSYNTH // This will not be coveraged-off
--timeformat-units unitsβ If specified, include Verilog$timeformatcalls before all messages. Use the provided argument as the units. Units is in powers of 10, so-9indicates to use nanoseconds. Time format, no cap.--timeformat-precision precβ When using--timeformat-units, use this as the precision value, the number of digits after the decimal point. Defaults to zero. Precision, periodt.--vericovβ Special Vericov enable/disables added around unreachable code. Vericov vibes.--verilatorβ Special Verilator translations enabled. Verilator translations, slay.--versionβ Displays program version and exits. Version check, bestie.--vcsβ Special Synopsys VCS enables/disables added around unreachable code. VCS energy.
π₯ FUNCTIONS π₯
These Verilog pseudo-pli calls are expanded:
/*vp_coverage_off*/β Disable coverage for all tools starting at this point. Does not need to be on a unique line. Coverage off, bye. π«/*vp_coverage_on*/β Re-enable coverage after avp_coverage_off. Does not need to be on a unique line. Coverage on, welcome back. β$uassert(case, "message", [vars...] )β Report a$uerrorif the given case is FALSE. (Likeassert()in C.) Assert, bestie. π$uassert_amone(sig, [sig...], "message", [vars...] )β Report a$uerrorif more than one signal is asserted, or any are X. (None asserted is ok.) The error message will include a binary display of the signal values. AMONE = at most one, no cap. π$uassert_info(case, "message", [vars...] )β Report a$uinfoif the given case is FALSE. (Likeassert()in C.) Info assert. βΉοΈ$uassert_onehot(sig, [sig...], "message", [vars...] )β Report a$uerrorif other than one signal is asserted, or any are X. The error message will include a binary display of the signal values. One-hot check, slay. π₯$uassert_req_ack(req_sig, ack_sig, [data_sig,...] )β Check for a single cycle request pulse, followed by a single cycle acknowledgment pulse. Do not allow any of the data signals to change between the request and acknowledgment. Req/ack handshake, periodt. π€$ucheck_ilevel(level )β Return true if the__messagelevel is greater or equal to the given level, and that global messages are turned on. Level check, iykyk.$ucover_clk(clock, label)β Similar to$uerror_clk, add a SystemVerilog assertion at the next specified clock's edge, with the label specified. This allows cover properties to be specified "inline" with normal RTL code. Cover, inline. π$ucover_foreach_clk(clock, label, "msb:lsb", (... $ui ...))β Similar to$ucover_clk, however cover a range where$uiin the expression is replaced with the range index.
Range is "msb:lsb" to indicate from msb downto lsb inclusive, and/or a comma separated list of values.
Similar to:
for ($ui=msb; $ui>=lsb; $ui=$ui-1) begin
if (expression with $ui)
$ucover_clk(clock, label ## "_" ## bit)
end
However there's no way to form a label from a for loop (as psudocoded with ## above), thus this macro.
$uiβ Loop index used inside$ucover_foreach_clk. The loop bestie.$uinfo(level, "message", [vars...] )β Report an informational message in standard form. End test if warning limit exceeded. Info message, no cap.$uerror("message", [vars...] )β Report an error message in standard form. End test if error limit exceeded. Error message, periodt.$uerror_clk(clock, "message", [vars...] )β Report an error message in standard form at the next clock edge. If you place a$uerroretc in a combo logic block (always @*), event based simulators may misfire the assertion due to glitches.$uerror_clkfixes this by instead creating a temporary signal and then moving the assert itself to a new clocked block at the specified edge. Note any variables printed will be the values at the time of the next clock edge, which may differ from the value where the$uerror_clkis assigned. Clocked error, glitch-free. β°$uwarn("message", [vars...] )β Report a warning message in standard form. Warning, bestie. β οΈ$uwarn_clk(clock "message", [vars...] )β Report a warning message in standard form at the next clock edge. See$uerror_clk. Clocked warning, slay.
π DISTRIBUTION π
Verilog-Perl is part of the <https://www.veripool.org/> free Verilog EDA software tool suite. The latest version is available from CPAN and from <https://www.veripool.org/verilog-perl>.
Copyright 2000-2024 by Wilson Snyder. This package is free software; you can redistribute it and/or modify it under the terms of either the GNU Lesser General Public License Version 3 or the Perl Artistic License Version 2.0.
π AUTHORS π
Wilson Snyder <wsnyder@wsnyder.org>, Duane Galbi <duane.galbi@conexant.com>
π¦ SEE ALSO π¦
Verilog-Perl, Verilog::Parser, Verilog::Pli
π That's the tea! This manual page is from perl v5.40.1, dated 2025-04-20, for vpassert(1p). Stay iconic, bestie! π
π¦ where this page comes from
- debian trixie: libverilog-perl 3.482-2 Β· Artistic-2.0 OR LGPL-3.0-only
- ubuntu resolute: libverilog-perl 3.482-2 Β· Artistic-2.0 OR LGPL-3.0-only
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms