summaryrefslogtreecommitdiff
path: root/lab_4/SRC/macro.svh
blob: 72bf47195b8c65305b3e25d0e927c3bcdca1e1f9 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
`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); \
    end

    `define RND_CHECK(a) \
    if (!a) begin \
        $display ("Randomization failure. Simulation halted."); \
        $finish; \
    end
`endif