VPASSERT(1p)

πŸ“¦
version 3.482 Β· 5 versions
, in debian trixie, ubuntu resolute

πŸ’– 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 -II with 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 -v directories 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 $uassert etc.) wants to display a message, call the specified function instead of $display and $stop. Custom function, no cap.
  • --call-info <function> β€” When $uinfo wants to display a message, call the specified function instead of $display. Info vibes.
  • --call-warn <function> β€” When $uwarn (or $uwarn_clk etc.) wants to display a message, call the specified function instead of $display and $stop. Warn vibes.
  • --date β€” Check file dates and sizes versus the last run of vpassert and 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_minimum in the $uinfo test, so that by defining __message_minimum=1 some uinfos may be optimized away at compile time. Compile-time optimization, slay.
  • --noline β€” Do not emit `line directives. If not specified they will be used under --language 1364-2001 and 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 of ifdef's required to feed non-PLI competent synthesis programs. Synthesis-friendly, fr fr.
  • --nostop β€” By default, $error and $warn insert a $stop statement. 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 `else or `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 $timeformat calls before all messages. Use the provided argument as the units. Units is in powers of 10, so -9 indicates 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 a vp_coverage_off. Does not need to be on a unique line. Coverage on, welcome back. βœ…
  • $uassert(case, "message", [vars...] ) β€” Report a $uerror if the given case is FALSE. (Like assert() in C.) Assert, bestie. πŸ’…
  • $uassert_amone(sig, [sig...], "message", [vars...] ) β€” Report a $uerror if 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 $uinfo if the given case is FALSE. (Like assert() in C.) Info assert. ℹ️
  • $uassert_onehot(sig, [sig...], "message", [vars...] ) β€” Report a $uerror if 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 __message level 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 $ui in 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 $uerror etc in a combo logic block (always @*), event based simulators may misfire the assertion due to glitches. $uerror_clk fixes 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_clk is 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