-
Notifications
You must be signed in to change notification settings - Fork 17
/
Copy pathex-regincr-RegIncr.t.v
58 lines (44 loc) · 1.04 KB
/
ex-regincr-RegIncr.t.v
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
//========================================================================
// ex-regincr-RegIncr Unit Tests
//========================================================================
`include "ex-regincr-RegIncr.v"
`include "vc-test.v"
module top;
`VC_TEST_SUITE_BEGIN( "ex-regincr-RegIncr" )
//----------------------------------------------------------------------
// Test ex_regincr_RegIncr
//----------------------------------------------------------------------
logic [7:0] t1_in;
logic [7:0] t1_out;
ex_regincr_RegIncr t1_reg_incr
(
.clk (clk),
.in (t1_in),
.out (t1_out)
);
// Helper task
task t1
(
input logic [7:0] in,
input logic [7:0] out
);
begin
t1_in = in;
#1;
`VC_TEST_NOTE_INPUTS_1( in );
`VC_TEST_NET( t1_out, out );
#9;
end
endtask
// Test case
`VC_TEST_CASE_BEGIN( 1, "simple" )
begin
#1;
t1( 8'h00, 8'h?? );
t1( 8'h13, 8'h02 );
t1( 8'h27, 8'h15 );
t1( 8'hxx, 8'h29 );
end
`VC_TEST_CASE_END
`VC_TEST_SUITE_END
endmodule