-
Notifications
You must be signed in to change notification settings - Fork 40
/
Copy pathmisc_comb_signal.sv
88 lines (77 loc) · 1.83 KB
/
misc_comb_signal.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
//==============================================================================
//
// The code is generated by Intel Compiler for SystemC, version 1.6.6
// see more information at https://github.com/intel/systemc-compiler
//
//==============================================================================
//==============================================================================
//
// Module: comb_signal_module ()
//
module comb_signal_module // "tb.mod"
(
input logic clk,
input logic nrst
);
// Variables generated for SystemC signals
logic a;
logic req0;
logic req1;
logic req2;
logic req3;
logic c;
logic d;
//------------------------------------------------------------------------------
// Method process: methProc (test_comb_signal.cpp:36:5)
always_comb
begin : methProc // test_comb_signal.cpp:36:5
if (nrst)
begin
req1 = 0;
req2 = 0;
end else begin
req1 = a;
req2 = a;
end
end
//------------------------------------------------------------------------------
// Clocked THREAD: thrdProc (test_comb_signal.cpp:46:5)
// Thread-local variables
logic req0_next;
logic c_next;
logic d_next;
logic a0;
logic a_next;
// Next-state combinational logic
always_comb begin : thrdProc_comb // test_comb_signal.cpp:46:5
thrdProc_func;
end
function void thrdProc_func;
a_next = a0;
c_next = c;
d = d_next;
req0 = req0_next;
req3 = '0;
c_next = 1;
d = 2;
req0 = a_next;
req3 = a_next;
a_next = !a_next;
endfunction
// Synchronous register update
always_ff @(posedge clk or negedge nrst)
begin : thrdProc_ff
if ( ~nrst ) begin
a0 <= 0;
req0_next <= 1;
c <= 0;
d_next <= 0;
end
else begin
req0_next <= req0;
c <= c_next;
d_next <= d;
a0 <= a_next;
end
end
endmodule