scc 2025.09
SystemC components library
time2tick.h
1/*******************************************************************************
2 * Copyright 2018-2021 MINRES Technologies GmbH
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 *******************************************************************************/
16
17#ifndef _SCC_TIME2TICK_H_
18#define _SCC_TIME2TICK_H_
19
20#include "utilities.h"
21
27namespace scc {
33struct time2tick : public sc_core::sc_module {
35#if SYSTEMC_VERSION < 20250221
37#endif
39 sc_core::sc_in<sc_core::sc_time> clk_i{"clk_i"};
41 sc_core::sc_out<bool> clk_o{"clk_o"};
47 explicit time2tick(sc_core::sc_module_name nm)
48 : sc_core::sc_module(nm) {
49 SC_THREAD(clocker);
50 }
51
52private:
53 sc_core::sc_time clk_period;
54 void clocker();
55};
56} // namespace scc // end of scc-sysc
58#endif /* _SCC_TIME2TICK_H_ */
SCC TLM utilities.
time2tick(sc_core::sc_module_name nm)
Definition time2tick.h:47
sc_core::sc_out< bool > clk_o
the clock output
Definition time2tick.h:41
SC_HAS_PROCESS(time2tick)
yes, we have processes
sc_core::sc_in< sc_core::sc_time > clk_i
the clock input
Definition time2tick.h:39