-
Notifications
You must be signed in to change notification settings - Fork 40
/
Copy pathmethod_liter_width.sv
78 lines (66 loc) · 1.64 KB
/
method_liter_width.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
//==============================================================================
//
// The code is generated by Intel Compiler for SystemC, version 1.5.12
// see more information at https://github.com/intel/systemc-compiler
//
//==============================================================================
//==============================================================================
//
// Module: A ()
//
module A // "a"
(
input logic clk
);
// Variables generated for SystemC signals
logic nrst;
logic [15:0] s;
//------------------------------------------------------------------------------
// Method process: checkWidthProc (test_liter_width.cpp:31:5)
// Process-local variables
logic [2:0] k;
always_comb
begin : checkWidthProc // test_liter_width.cpp:31:5
if (|s)
begin
k = 1;
end else begin
k = 3'd1;
end
if (|s)
begin
k = 23'd1;
end else begin
k = 2'd1;
end
end
//------------------------------------------------------------------------------
// Clocked THREAD: concatProc (test_liter_width.cpp:49:5)
// Thread-local variables
logic [2:0] j;
logic [2:0] j_next;
logic [2:0] i;
logic [2:0] i_next;
// Next-state combinational logic
always_comb begin : concatProc_comb // test_liter_width.cpp:49:5
concatProc_func;
end
function void concatProc_func;
logic [30:0] t;
i_next = i;
j_next = j;
t = {j_next, i_next};
endfunction
// Synchronous register update
always_ff @(posedge clk or negedge nrst)
begin : concatProc_ff
if ( ~nrst ) begin
j <= 1;
i <= 1;
end
else begin
j <= j_next;
i <= i_next;
end
end
endmodule