quic/qbox
Loading...
Searching...
No Matches
systemc-components
common
include
qkmulti-freerunning.h
1
/*
2
* Copyright (c) 2022-2023 Qualcomm Innovation Center, Inc. All Rights Reserved.
3
*
4
* SPDX-License-Identifier: BSD-3-Clause
5
*/
6
7
#ifndef QKMULTI_FREERUNNING_H
8
#define QKMULTI_FREERUNNING_H
9
10
#include <qkmultithread.h>
11
12
namespace
gs
{
13
class
tlm_quantumkeeper_freerunning
:
public
tlm_quantumkeeper_multithread
14
{
15
virtual
void
sync()
override
16
{
17
if
(is_sysc_thread()) {
18
assert
(
m_local_time
>= sc_core::sc_time_stamp());
19
sc_core::sc_time
t
=
m_local_time
- sc_core::sc_time_stamp();
20
m_tick.notify();
21
sc_core::wait(
t
);
22
}
else
{
23
/* Wake up the SystemC thread if it's waiting for us to keep up */
24
m_tick.notify();
25
}
26
}
27
28
virtual
bool
need_sync()
override
{
return
false
; }
29
};
30
}
// namespace gs
31
#endif
QemuTargetSocket
Definition
target.h:160
gs::tlm_quantumkeeper_freerunning
Definition
qkmulti-freerunning.h:14
gs::tlm_quantumkeeper_multithread
Definition
qkmultithread.h:24
gs
Tool which reads a Lua configuration file and sets parameters.
Definition
biflow.cc:10
Generated by
1.9.8