summaryrefslogtreecommitdiff
path: root/lab_1/SRC/macro.svh
diff options
context:
space:
mode:
authorFuwn <[email protected]>2026-02-13 23:23:19 -0800
committerFuwn <[email protected]>2026-02-13 23:23:19 -0800
commit583bec7ffd3c2809ea41aa8a518f53403af3efaa (patch)
tree551fa62ee04d40616db4f2375176c362ae6f3cbc /lab_1/SRC/macro.svh
downloadcst456-583bec7ffd3c2809ea41aa8a518f53403af3efaa.tar.xz
cst456-583bec7ffd3c2809ea41aa8a518f53403af3efaa.zip
Initial commit
Diffstat (limited to 'lab_1/SRC/macro.svh')
-rw-r--r--lab_1/SRC/macro.svh10
1 files changed, 10 insertions, 0 deletions
diff --git a/lab_1/SRC/macro.svh b/lab_1/SRC/macro.svh
new file mode 100644
index 0000000..284b9ae
--- /dev/null
+++ b/lab_1/SRC/macro.svh
@@ -0,0 +1,10 @@
+`ifndef MACRO_SVH
+ `define MACRO_SVH
+
+ `define FAIL_UNLESS_EQUAL(a,b,c="") \
+ if ((a) !== (b)) \
+ begin \
+ $display ("FAIL_UNLESS_EQUAL[%s]: Expected %h but actual value is %h.", c, a, b); \
+ $finish; \
+ end
+`endif