-
Notifications
You must be signed in to change notification settings - Fork 40
/
Copy pathmethod_var_multiple_use.sv
94 lines (73 loc) · 1.99 KB
/
method_var_multiple_use.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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
//==============================================================================
//
// The code is generated by Intel Compiler for SystemC, version 1.6.2
// see more information at https://github.com/intel/systemc-compiler
//
//==============================================================================
//==============================================================================
//
// Module: Top ()
//
module Top // "top"
(
input logic clk
);
// Variables generated for SystemC signals
logic rst;
logic signed [31:0] t;
//------------------------------------------------------------------------------
// Child module instances
Child child
(
.clk(clk),
.rst(rst),
.in(t),
.out(t)
);
endmodule
//==============================================================================
//
// Module: Child (test_var_multiple_use.cpp:62:5)
//
module Child // "top.child"
(
input logic clk,
input logic rst,
input logic signed [31:0] in,
output logic signed [31:0] out
);
// Variables generated for SystemC signals
logic signed [31:0] s;
// Local parameters generated for C++ constants
localparam logic [2:0] vv = 0;
localparam logic signed [31:0] c = 5;
//------------------------------------------------------------------------------
// Method process: methA (test_var_multiple_use.cpp:39:5)
// Process-local variables
logic [2:0] v;
always_comb
begin : methA // test_var_multiple_use.cpp:39:5
if (|in)
begin
v = c;
end
s = 2 - v;
end
//------------------------------------------------------------------------------
// Method process: methB (test_var_multiple_use.cpp:45:5)
always_comb
begin : methB // test_var_multiple_use.cpp:45:5
out = in + vv;
end
//------------------------------------------------------------------------------
// Method process: methC (test_var_multiple_use.cpp:49:5)
always_comb
begin : methC // test_var_multiple_use.cpp:49:5
if (|in)
begin
out = 0;
end else begin
out = 1;
end
end
endmodule