1 | /*------------------------------------------------------------\ |
---|
2 | | | |
---|
3 | | Tool : systemcass | |
---|
4 | | | |
---|
5 | | File : sc_clock_ext.h | |
---|
6 | | | |
---|
7 | | Author : Buchmann Richard | |
---|
8 | | Taktak Sami | |
---|
9 | | | |
---|
10 | | Date : 09_09_2005 | |
---|
11 | | | |
---|
12 | \------------------------------------------------------------*/ |
---|
13 | |
---|
14 | /* |
---|
15 | * This file is part of the Disydent Project |
---|
16 | * Copyright (C) Laboratoire LIP6 - Département ASIM |
---|
17 | * Universite Pierre et Marie Curie |
---|
18 | * |
---|
19 | * Home page : http://www-asim.lip6.fr/disydent |
---|
20 | * E-mail : mailto:richard.buchmann@lip6.fr |
---|
21 | * |
---|
22 | * This library is free software; you can redistribute it and/or modify it |
---|
23 | * under the terms of the GNU Library General Public License as published |
---|
24 | * by the Free Software Foundation; either version 2 of the License, or (at |
---|
25 | * your option) any later version. |
---|
26 | * |
---|
27 | * Disydent is distributed in the hope that it will be |
---|
28 | * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
29 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General |
---|
30 | * Public License for more details. |
---|
31 | * |
---|
32 | * You should have received a copy of the GNU General Public License along |
---|
33 | * with the GNU C Library; see the file COPYING. If not, write to the Free |
---|
34 | * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. |
---|
35 | */ |
---|
36 | |
---|
37 | #ifndef __SC_CLOCK_EXT_H__ |
---|
38 | #define __SC_CLOCK_EXT_H__ |
---|
39 | |
---|
40 | #include "sc_signal.h" |
---|
41 | |
---|
42 | namespace sc_core { |
---|
43 | |
---|
44 | // ---------------------------------------------------------------------------- |
---|
45 | // CLASS : sc_clock |
---|
46 | // |
---|
47 | // ---------------------------------------------------------------------------- |
---|
48 | |
---|
49 | class sc_clock : public sc_signal<bool> { |
---|
50 | /////////// |
---|
51 | // Internal |
---|
52 | void init (); |
---|
53 | /////////// |
---|
54 | |
---|
55 | private: |
---|
56 | typedef bool data_type; |
---|
57 | typedef sc_signal<bool> base_type; |
---|
58 | typedef sc_clock this_type; |
---|
59 | |
---|
60 | public: |
---|
61 | sc_clock(); |
---|
62 | ~sc_clock(); |
---|
63 | |
---|
64 | // Changes from LRM : |
---|
65 | // We use "const char *" instead of "sc_module_name" because we don't need |
---|
66 | // to add a module name in the stack when constructing sc_clock ! |
---|
67 | |
---|
68 | explicit sc_clock(const char * name_); |
---|
69 | sc_clock(const char * name_, |
---|
70 | const sc_time & period_, |
---|
71 | double duty_cycle_ = 0.5, |
---|
72 | const sc_time & start_time_ = SC_ZERO_TIME, |
---|
73 | bool posedge_first_ = true); |
---|
74 | |
---|
75 | sc_clock(const char * name_, |
---|
76 | double period_, |
---|
77 | double duty_cycle_ = 0.5, |
---|
78 | double start_time_ = 0.0, |
---|
79 | bool posedge_first_ = true); |
---|
80 | |
---|
81 | static const char * const kind_string; |
---|
82 | |
---|
83 | /*inline*/ this_type & operator = (const data_type & value_); |
---|
84 | |
---|
85 | bool posedge_first; |
---|
86 | }; |
---|
87 | |
---|
88 | } // end of sc_core namespace |
---|
89 | |
---|
90 | #endif /* __SC_CLOCK_EXT_H__ */ |
---|
91 | |
---|
92 | /* |
---|
93 | # Local Variables: |
---|
94 | # tab-width: 4; |
---|
95 | # c-basic-offset: 4; |
---|
96 | # c-file-offsets:((innamespace . 0)(inline-open . 0)); |
---|
97 | # indent-tabs-mode: nil; |
---|
98 | # End: |
---|
99 | # |
---|
100 | # vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=4:softtabstop=4 |
---|
101 | */ |
---|
102 | |
---|