-
Notifications
You must be signed in to change notification settings - Fork 40
/
Copy pathmif_with_chan_array.sv
96 lines (82 loc) · 2.57 KB
/
mif_with_chan_array.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
//==============================================================================
//
// The code is generated by Intel Compiler for SystemC, version 1.5.12
// see more information at https://github.com/intel/systemc-compiler
//
//==============================================================================
//==============================================================================
//
// Module: Top ()
//
module Top // "top"
(
input logic clk
);
// Variables generated for SystemC signals
logic minst_rst;
logic minst_s[2];
logic minst_r[2];
logic signed [31:0] minst_t0;
logic signed [31:0] minst_t1;
logic minst_clk;
// Assignments generated for C++ channel arrays
assign minst_clk = clk;
//------------------------------------------------------------------------------
// Method process: minst_meth (test_mif_with_chan_array.cpp:42:5)
// Process-local variables
logic minst_v[2];
always_comb
begin : minst_meth // test_mif_with_chan_array.cpp:42:5
logic b;
minst_v[1] = 0;
b = minst_s[1] || minst_r[1] || minst_v[1];
minst_t0 = b;
end
//------------------------------------------------------------------------------
// Clocked THREAD: minst_thread (test_mif_with_chan_array.cpp:49:5)
// Thread-local variables
logic minst_vv[2];
logic minst_vv_next[2];
logic c;
logic c_next;
logic signed [31:0] minst_t1_next;
logic thread_PROC_STATE;
logic thread_PROC_STATE_next;
// Next-state combinational logic
always_comb begin : minst_thread_comb // test_mif_with_chan_array.cpp:49:5
minst_thread_func;
end
function void minst_thread_func;
logic d;
c_next = c;
minst_t1_next = minst_t1;
minst_vv_next = minst_vv;
thread_PROC_STATE_next = thread_PROC_STATE;
case (thread_PROC_STATE)
0: begin
c_next = minst_s[1] || minst_r[1] || minst_vv_next[1];
thread_PROC_STATE_next = 1; return; // test_mif_with_chan_array.cpp:56:13;
end
1: begin
d = c_next;
minst_t1_next = d;
c_next = minst_s[1] || minst_r[1] || minst_vv_next[1];
thread_PROC_STATE_next = 1; return; // test_mif_with_chan_array.cpp:56:13;
end
endcase
endfunction
// Synchronous register update
always_ff @(posedge minst_clk or posedge minst_rst)
begin : minst_thread_ff
if ( minst_rst ) begin
minst_vv[1] <= 0;
thread_PROC_STATE <= 0; // test_mif_with_chan_array.cpp:52:9;
end
else begin
minst_vv <= minst_vv_next;
c <= c_next;
minst_t1 <= minst_t1_next;
thread_PROC_STATE <= thread_PROC_STATE_next;
end
end
endmodule