-
Notifications
You must be signed in to change notification settings - Fork 40
/
Copy pathmethod_clock_sensitive.sv
49 lines (40 loc) · 1.12 KB
/
method_clock_sensitive.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
//==============================================================================
//
// The code is generated by Intel Compiler for SystemC, version 1.6.2
// see more information at https://github.com/intel/systemc-compiler
//
//==============================================================================
//==============================================================================
//
// Module: A ()
//
module A // "a"
(
input logic clk,
input logic nrst
);
// Variables generated for SystemC signals
logic signed [31:0] c;
//------------------------------------------------------------------------------
// Clocked THREAD: thrdProc (test_clock_sensitive.cpp:42:5)
// Thread-local variables
logic signed [31:0] c_next;
// Next-state combinational logic
always_comb begin : thrdProc_comb // test_clock_sensitive.cpp:42:5
thrdProc_func;
end
function void thrdProc_func;
c_next = c;
c_next = c + 1;
endfunction
// Synchronous register update
always_ff @(posedge clk or negedge nrst)
begin : thrdProc_ff
if ( ~nrst ) begin
c <= 0;
end
else begin
c <= c_next;
end
end
endmodule