-
Notifications
You must be signed in to change notification settings - Fork 40
/
Copy pathmisc_module_base_array.sv
90 lines (72 loc) · 1.64 KB
/
misc_module_base_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
//==============================================================================
//
// The code is generated by Intel Compiler for SystemC, version 1.6.14
// see more information at https://github.com/intel/systemc-compiler
//
//==============================================================================
//==============================================================================
//
// Module: Top ()
//
module Top // "top"
(
input logic clk,
input logic rst
);
//------------------------------------------------------------------------------
// Child module instances
B barr_0
(
.clk(clk),
.rst(rst)
);
B barr_1
(
.clk(clk),
.rst(rst)
);
B barr_2
(
.clk(clk),
.rst(rst)
);
endmodule
//==============================================================================
//
// Module: B ()
//
module B // "top.name"
(
input logic clk,
input logic rst
);
// Variables generated for SystemC signals
logic signed [31:0] t0;
//------------------------------------------------------------------------------
// Clocked THREAD: threadProc (test_module_base_array.cpp:34:5)
// Thread-local variables
logic [15:0] a;
logic [15:0] a_next;
logic signed [31:0] t0_next;
// Next-state combinational logic
always_comb begin : threadProc_comb // test_module_base_array.cpp:34:5
threadProc_func;
end
function void threadProc_func;
a_next = a;
t0_next = t0;
a_next++;
t0_next = a_next;
endfunction
// Synchronous register update
always_ff @(posedge clk or negedge rst)
begin : threadProc_ff
if ( ~rst ) begin
a <= 1;
end
else begin
a <= a_next;
t0 <= t0_next;
end
end
endmodule