-
Notifications
You must be signed in to change notification settings - Fork 40
/
Copy pathmisc_static_array.sv
86 lines (73 loc) · 1.99 KB
/
misc_static_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
//==============================================================================
//
// 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;
logic [3:0] s;
logic signed [31:0] t1;
logic signed [31:0] t2;
// Local parameters generated for C++ constants
localparam logic [63:0] E = 0;
//------------------------------------------------------------------------------
// Method process: mif_method (test_static_array.cpp:53:5)
// Process-local variables
logic [63:0] mif_I;
logic [31:0] mif_JJ[3][2];
logic [31:0] mif_J[2];
logic [31:0] D[2];
always_comb
begin : mif_method // test_static_array.cpp:53:5
integer l;
l = mif_I;
l = mif_I;
l = mif_JJ[0][0];
l = mif_J[s];
mif_I = mif_J[0];
l = D[s];
t1 = l;
end
//------------------------------------------------------------------------------
// Clocked THREAD: mif_thrd (test_static_array.cpp:66:5)
// Thread-local variables
logic [31:0] mif_K[2][3];
logic [31:0] mif_K_next[2][3];
logic signed [31:0] t2_next;
logic [31:0] DD[2];
logic [31:0] DD_next[2];
// Next-state combinational logic
always_comb begin : mif_thrd_comb // test_static_array.cpp:66:5
mif_thrd_func;
end
function void mif_thrd_func;
integer unsigned l;
DD_next = DD;
mif_K_next = mif_K;
t2_next = t2;
t2_next = mif_K_next[s + 1][s - 1] + DD_next[s];
endfunction
// Synchronous register update
always_ff @(posedge clk or negedge nrst)
begin : mif_thrd_ff
if ( ~nrst ) begin
integer unsigned l;
l = mif_K[0][1] + E;
t2 <= l;
end
else begin
mif_K <= mif_K_next;
t2 <= t2_next;
DD <= DD_next;
end
end
endmodule