macro_rules! hassert {
    ($cond: expr, $string: expr) => { ... };
    ($cond: expr, $fstring: expr, $($arg:expr),+) => { ... };
}
Expand description

Assert macro

Syntax

<assert> := hassert!(cond, string) | hassert!(cond, format_string, arg1, arg2, …)

This macro will be compiled as below.

if (~cond {& current path condition}) begin
   $fdisplay(format_string, arg1, arg2, ...);
   $finish;
end

Formatting

For the format string, use the syntax of verilog $display system task.