-
Notifications
You must be signed in to change notification settings - Fork 40
/
Copy pathmethod_sig_array_access.sv
70 lines (57 loc) · 1.83 KB
/
method_sig_array_access.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
//==============================================================================
//
// The code is generated by Intel Compiler for SystemC, version 1.5.12
// see more information at https://github.com/intel/systemc-compiler
//
//==============================================================================
//==============================================================================
//
// Module: dut ()
//
module dut // "dut_inst"
(
input logic clk,
input logic en,
input logic r_nw,
input logic [1:0] addr,
input logic [31:0] wdata,
output logic [31:0] rdata
);
// Variables generated for SystemC signals
logic [31:0] reg_file[4];
logic chr[3];
logic chp[3][2];
//------------------------------------------------------------------------------
// Method process: write_method_ff (test_sig_array_access.cpp:40:5)
always_comb
begin : write_method_ff // test_sig_array_access.cpp:40:5
if (en && !r_nw)
begin
reg_file[addr] = wdata;
end
end
//------------------------------------------------------------------------------
// Method process: read_method_comb (test_sig_array_access.cpp:45:5)
always_comb
begin : read_method_comb // test_sig_array_access.cpp:45:5
rdata = 0;
if (en && r_nw)
begin
rdata = reg_file[addr];
end
end
//------------------------------------------------------------------------------
// Method process: chan_arr_func_param (test_sig_array_access.cpp:59:5)
always_comb
begin : chan_arr_func_param // test_sig_array_access.cpp:59:5
logic par;
par = chr[1];
end
//------------------------------------------------------------------------------
// Method process: chan_arr_func_param2 (test_sig_array_access.cpp:67:5)
always_comb
begin : chan_arr_func_param2 // test_sig_array_access.cpp:67:5
logic par;
par = chp[2][1];
end
endmodule