sc_clock.cc (12841:22aa7ba47bf9) sc_clock.cc (12878:97fdce181f51)
1/*
2 * Copyright 2018 Google, Inc.
3 *
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are
6 * met: redistributions of source code must retain the above copyright
7 * notice, this list of conditions and the following disclaimer;
8 * redistributions in binary form must reproduce the above copyright
9 * notice, this list of conditions and the following disclaimer in the
10 * documentation and/or other materials provided with the distribution;
11 * neither the name of the copyright holders nor the names of its
12 * contributors may be used to endorse or promote products derived from
13 * this software without specific prior written permission.
14 *
15 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
16 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
17 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
18 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
19 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
20 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
21 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
22 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
23 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
25 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 *
27 * Authors: Gabe Black
28 */
29
30#include "base/logging.hh"
31#include "systemc/ext/channel/sc_clock.hh"
32#include "systemc/ext/core/sc_module.hh" // for sc_gen_unique_name
33
34namespace sc_core
35{
36
37sc_clock::sc_clock() :
38 sc_interface(), sc_signal<bool>(sc_gen_unique_name("clock"))
39{
40 warn("%s not implemented.\n", __PRETTY_FUNCTION__);
41}
42
43sc_clock::sc_clock(const char *name) : sc_interface(), sc_signal<bool>(name)
44{
45 warn("%s not implemented.\n", __PRETTY_FUNCTION__);
46}
47
48sc_clock::sc_clock(const char *name, const sc_time &period,
49 double duty_cycle, const sc_time &start_time,
50 bool posedge_first)
51{
52 warn("%s not implemented.\n", __PRETTY_FUNCTION__);
53}
54
55sc_clock::sc_clock(const char *name, double period_v, sc_time_unit period_tu,
56 double duty_cycle)
57{
58 warn("%s not implemented.\n", __PRETTY_FUNCTION__);
59}
60
61sc_clock::sc_clock(const char *name, double period_v, sc_time_unit period_tu,
62 double duty_cycle, double start_time_v,
63 sc_time_unit start_time_tu, bool posedge_first)
64{
65 warn("%s not implemented.\n", __PRETTY_FUNCTION__);
66}
67
1/*
2 * Copyright 2018 Google, Inc.
3 *
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are
6 * met: redistributions of source code must retain the above copyright
7 * notice, this list of conditions and the following disclaimer;
8 * redistributions in binary form must reproduce the above copyright
9 * notice, this list of conditions and the following disclaimer in the
10 * documentation and/or other materials provided with the distribution;
11 * neither the name of the copyright holders nor the names of its
12 * contributors may be used to endorse or promote products derived from
13 * this software without specific prior written permission.
14 *
15 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
16 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
17 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
18 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
19 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
20 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
21 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
22 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
23 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
25 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 *
27 * Authors: Gabe Black
28 */
29
30#include "base/logging.hh"
31#include "systemc/ext/channel/sc_clock.hh"
32#include "systemc/ext/core/sc_module.hh" // for sc_gen_unique_name
33
34namespace sc_core
35{
36
37sc_clock::sc_clock() :
38 sc_interface(), sc_signal<bool>(sc_gen_unique_name("clock"))
39{
40 warn("%s not implemented.\n", __PRETTY_FUNCTION__);
41}
42
43sc_clock::sc_clock(const char *name) : sc_interface(), sc_signal<bool>(name)
44{
45 warn("%s not implemented.\n", __PRETTY_FUNCTION__);
46}
47
48sc_clock::sc_clock(const char *name, const sc_time &period,
49 double duty_cycle, const sc_time &start_time,
50 bool posedge_first)
51{
52 warn("%s not implemented.\n", __PRETTY_FUNCTION__);
53}
54
55sc_clock::sc_clock(const char *name, double period_v, sc_time_unit period_tu,
56 double duty_cycle)
57{
58 warn("%s not implemented.\n", __PRETTY_FUNCTION__);
59}
60
61sc_clock::sc_clock(const char *name, double period_v, sc_time_unit period_tu,
62 double duty_cycle, double start_time_v,
63 sc_time_unit start_time_tu, bool posedge_first)
64{
65 warn("%s not implemented.\n", __PRETTY_FUNCTION__);
66}
67
68sc_clock::sc_clock(const char *name, double period, double duty_cycle,
69 double start_time, bool posedge_first)
70{
71 warn("%s not implemented.\n", __PRETTY_FUNCTION__);
72}
73
68sc_clock::~sc_clock() {}
69
70void
71sc_clock::write(const bool &)
72{
73 warn("%s not implemented.\n", __PRETTY_FUNCTION__);
74}
75
76const sc_time &
77sc_clock::period() const
78{
79 warn("%s not implemented.\n", __PRETTY_FUNCTION__);
80 return *(const sc_time *)nullptr;
81}
82
83double
84sc_clock::duty_cycle() const
85{
86 warn("%s not implemented.\n", __PRETTY_FUNCTION__);
87 return 0.0;
88}
89
90const sc_time &
91sc_clock::start_time() const
92{
93 warn("%s not implemented.\n", __PRETTY_FUNCTION__);
94 return *(const sc_time *)nullptr;
95}
96
97bool
98sc_clock::posedge_first() const
99{
100 warn("%s not implemented.\n", __PRETTY_FUNCTION__);
101 return false;
102}
103
104const char *sc_clock::kind() const { return "sc_clock"; }
105
106void sc_clock::before_end_of_elaboration() {}
107
108} // namespace sc_core
74sc_clock::~sc_clock() {}
75
76void
77sc_clock::write(const bool &)
78{
79 warn("%s not implemented.\n", __PRETTY_FUNCTION__);
80}
81
82const sc_time &
83sc_clock::period() const
84{
85 warn("%s not implemented.\n", __PRETTY_FUNCTION__);
86 return *(const sc_time *)nullptr;
87}
88
89double
90sc_clock::duty_cycle() const
91{
92 warn("%s not implemented.\n", __PRETTY_FUNCTION__);
93 return 0.0;
94}
95
96const sc_time &
97sc_clock::start_time() const
98{
99 warn("%s not implemented.\n", __PRETTY_FUNCTION__);
100 return *(const sc_time *)nullptr;
101}
102
103bool
104sc_clock::posedge_first() const
105{
106 warn("%s not implemented.\n", __PRETTY_FUNCTION__);
107 return false;
108}
109
110const char *sc_clock::kind() const { return "sc_clock"; }
111
112void sc_clock::before_end_of_elaboration() {}
113
114} // namespace sc_core