-
Notifications
You must be signed in to change notification settings - Fork 40
/
Copy pathmisc_pointer_warning.sv
70 lines (58 loc) · 1.65 KB
/
misc_pointer_warning.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
//==============================================================================
//
// The code is generated by Intel Compiler for SystemC, version 1.6.14
// see more information at https://github.com/intel/systemc-compiler
//
//==============================================================================
//==============================================================================
//
// Module: A ()
//
module A // "a_mod"
(
input logic clk
);
// Variables generated for SystemC signals
logic nrst;
//------------------------------------------------------------------------------
// Method process: nonconst_ptr_method (test_pointer_warning.cpp:42:5)
// Process-local variables
logic signed [31:0] q0;
logic [3:0] v0;
always_comb
begin : nonconst_ptr_method // test_pointer_warning.cpp:42:5
integer j;
q0 = 1;
v0 = 2;
j = q0 + v0;
end
//------------------------------------------------------------------------------
// Clocked THREAD: nonconst_ptr_thread (test_pointer_warning.cpp:47:5)
// Thread-local variables
logic [3:0] v1;
logic [3:0] v1_next;
logic signed [31:0] q1;
logic signed [31:0] q1_next;
// Next-state combinational logic
always_comb begin : nonconst_ptr_thread_comb // test_pointer_warning.cpp:47:5
nonconst_ptr_thread_func;
end
function void nonconst_ptr_thread_func;
integer j;
q1_next = q1;
v1_next = v1;
j = q1_next + v1_next + q1_next;
endfunction
// Synchronous register update
always_ff @(posedge clk or negedge nrst)
begin : nonconst_ptr_thread_ff
if ( ~nrst ) begin
q1 <= 1;
v1 <= 2;
end
else begin
v1 <= v1_next;
q1 <= q1_next;
end
end
endmodule