-
Notifications
You must be signed in to change notification settings - Fork 40
/
Copy pathmif_var_multiple_use.sv
105 lines (87 loc) · 2.74 KB
/
mif_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
93
94
95
96
97
98
99
100
101
102
103
//==============================================================================
//
// 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;
logic signed [31:0] z;
logic signed [31:0] minst_p[2];
logic minst_clk[2];
logic minst_rst[2];
logic signed [31:0] minst_in[2];
logic signed [31:0] minst_out[2];
// Assignments generated for C++ channel arrays
assign minst_clk[0] = clk;
assign minst_clk[1] = clk;
assign minst_rst[0] = rst;
assign minst_rst[1] = rst;
assign minst_in[0] = t;
assign minst_in[1] = z;
assign t = minst_out[0];
assign t = minst_out[1];
//------------------------------------------------------------------------------
// Method process: minst_ptrProc (test_mif_var_multiple_use.cpp:39:5)
// Process-local variables
logic [3:0] minst_vp[2];
always_comb
begin : minst_ptrProc // test_mif_var_multiple_use.cpp:39:5
minst_p[0] = minst_in[0];
minst_p[0] = minst_vp[0];
end
//------------------------------------------------------------------------------
// Clocked THREAD: minst_thrProc (test_mif_var_multiple_use.cpp:44:5)
// Thread-local variables
logic [3:0] minst_vp[2];
// Next-state combinational logic
always_comb begin : minst_thrProc_comb // test_mif_var_multiple_use.cpp:44:5
minst_thrProc_func;
end
function void minst_thrProc_func;
minst_vp[0] = 5;
endfunction
// Synchronous register update
always_ff @(posedge minst_clk[0] or posedge minst_rst[0])
begin : minst_thrProc_ff
if ( minst_rst[0] ) begin
minst_p[0] <= 4;
end
else begin
end
end
//------------------------------------------------------------------------------
// Method process: minst_ptrProc0 (test_mif_var_multiple_use.cpp:39:5)
always_comb
begin : minst_ptrProc0 // test_mif_var_multiple_use.cpp:39:5
minst_p[1] = minst_in[1];
minst_p[1] = minst_vp[1];
end
//------------------------------------------------------------------------------
// Clocked THREAD: minst_thrProc0 (test_mif_var_multiple_use.cpp:44:5)
// Next-state combinational logic
always_comb begin : minst_thrProc0_comb // test_mif_var_multiple_use.cpp:44:5
minst_thrProc0_func;
end
function void minst_thrProc0_func;
minst_vp[1] = 5;
endfunction
// Synchronous register update
always_ff @(posedge minst_clk[1] or posedge minst_rst[1])
begin : minst_thrProc0_ff
if ( minst_rst[1] ) begin
minst_p[1] <= 4;
end
else begin
end
end
endmodule