1/*****************************************************************************
2
3  Licensed to Accellera Systems Initiative Inc. (Accellera) under one or
4  more contributor license agreements.  See the NOTICE file distributed
5  with this work for additional information regarding copyright ownership.
6  Accellera licenses this file to you under the Apache License, Version 2.0
7  (the "License"); you may not use this file except in compliance with the
8  License.  You may obtain a copy of the License at
9
10    http://www.apache.org/licenses/LICENSE-2.0
11
12  Unless required by applicable law or agreed to in writing, software
13  distributed under the License is distributed on an "AS IS" BASIS,
14  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
15  implied.  See the License for the specific language governing
16  permissions and limitations under the License.
17
18 *****************************************************************************/
19
20/*****************************************************************************
21
22  test01.cpp --
23
24  Original Author: Ucar Aziz, Synopsys, Inc., 2002-02-15
25                   Martin Janssen, Synopsys, Inc., 2002-02-15
26
27 *****************************************************************************/
28
29/*****************************************************************************
30
31  MODIFICATION LOG - modifiers, enter your name, affiliation, date and
32  changes you are making here.
33
34      Name, Affiliation, Date:
35  Description of Modification:
36
37 *****************************************************************************/
38
39// test of sc_signal_resolved_port constructors
40
41#include "systemc.h"
42
43
44#define WRITE(a) \
45    cout << a.name() << " (" << a.kind() << ")" << endl
46
47
48SC_MODULE( mod_a)
49{
50  sc_signal_resolved sig_1;
51  sc_signal_resolved sig_2;
52  sc_signal_resolved sig_3;
53  sc_signal_resolved sig_4;
54
55  sc_in_resolved in_1;
56  sc_in_resolved in_2;
57  sc_in_resolved in_3;
58  sc_in_resolved in_4;
59  sc_in_resolved in_5;
60  sc_in_resolved in_6;
61  sc_inout_resolved in_out1;
62  sc_inout_resolved in_out2;
63  sc_inout_resolved in_out3;
64  sc_inout_resolved in_out4;
65  sc_inout_resolved in_out5;
66  sc_inout_resolved in_out6;
67
68  SC_CTOR( mod_a ):in_1(), in_2("in_2"), in_4("in_4"),
69    in_out4("in_out4"), in_out5(), in_out6("in_out6")
70    {
71     in_3(sig_1);
72     in_4(sig_2);
73     in_out3(sig_3);
74     in_out4(sig_4);
75     WRITE(in_1);
76     WRITE(in_2);
77     WRITE(in_3);
78     WRITE(in_4);
79     WRITE(in_5);
80     WRITE(in_6);
81     WRITE(in_out1);
82     WRITE(in_out2);
83     WRITE(in_out3);
84     WRITE(in_out4);
85     WRITE(in_out5);
86     WRITE(in_out6);
87    }
88};
89
90SC_MODULE(mod_b)
91{
92  mod_a a;
93  sc_in_resolved input_1;
94  sc_in_resolved input_2;
95  sc_in_resolved input_3;
96  sc_in_resolved input_4;
97
98
99  SC_CTOR( mod_b ):a("a"), input_2("input_2"), input_4("input_4")
100 {
101   input_1(a.in_5);
102   input_2(a.in_6);
103   input_3(a.in_out1);
104   input_4(a.in_out2);
105   WRITE(input_1);
106   WRITE(input_2);
107   WRITE(input_3);
108   WRITE(input_4);
109  }
110
111
112};
113
114int sc_main(int, char* []){
115
116  mod_b b("b");
117
118  return 0;
119}
120