From 721f1f5ecfb6334904f6058d6d376d21b5efc438 Mon Sep 17 00:00:00 2001 From: Clifford Wolf Date: Wed, 13 Jul 2016 16:56:17 +0200 Subject: Added basic support for $expect cells --- techlibs/common/simlib.v | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'techlibs/common') diff --git a/techlibs/common/simlib.v b/techlibs/common/simlib.v index 342555024..ea36e2922 100644 --- a/techlibs/common/simlib.v +++ b/techlibs/common/simlib.v @@ -1305,6 +1305,22 @@ endmodule // -------------------------------------------------------- +module \$expect (A, EN); + +input A, EN; + +`ifndef SIMLIB_NOCHECKS +always @* begin + if (A === 1'b1 && EN === 1'b1) begin + $display("Expectation %m passed."); + end +end +`endif + +endmodule + +// -------------------------------------------------------- + module \$equiv (A, B, Y); input A, B; -- cgit v1.2.3