-
Notifications
You must be signed in to change notification settings - Fork 40
/
Copy pathmisc_sc_assert_enable.sv
72 lines (61 loc) · 1.66 KB
/
misc_sc_assert_enable.sv
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
58
59
60
61
62
63
64
65
66
67
68
69
70
//==============================================================================
//
// The code is generated by Intel Compiler for SystemC, version 1.6.6
// see more information at https://github.com/intel/systemc-compiler
//
//==============================================================================
//==============================================================================
//
// Module: A ()
//
module A // "test_top.a_mod"
(
input logic clk,
input logic rstn,
input logic [3:0] a,
output logic [3:0] b
);
// Variables generated for SystemC signals
logic signed [31:0] t0;
logic signed [31:0] t1;
logic signed [31:0] t2;
//------------------------------------------------------------------------------
// Method process: assert_test (test_sc_assert_enable.cpp:36:5)
always_comb
begin : assert_test // test_sc_assert_enable.cpp:36:5
integer i;
i = 0;
t0 = i;
end
//------------------------------------------------------------------------------
// Method process: assert_in_loop_test (test_sc_assert_enable.cpp:44:5)
always_comb
begin : assert_in_loop_test // test_sc_assert_enable.cpp:44:5
t1 = 0;
for (integer unsigned i = 0; i < 3; ++i)
begin
if (|a)
begin
t1 = 1;
end
end
end
//------------------------------------------------------------------------------
// Method process: assert_in_if_test (test_sc_assert_enable.cpp:56:5)
always_comb
begin : assert_in_if_test // test_sc_assert_enable.cpp:56:5
t2 = 0;
case (a)
0 : begin
t2 = 1;
end
default : begin
t2 = 2;
end
endcase
if (|a)
begin
t2 = 2;
end
end
endmodule