HAL
v4.5.0-83-g30c8f0afc
The Hardware Analyzer - a comprehensive reverse engineering and manipulation framework for gate-level netlists.
wave_form_painted.h
Go to the documentation of this file.
1
// MIT License
2
//
3
// Copyright (c) 2019 Ruhr University Bochum, Chair for Embedded Security. All Rights reserved.
4
// Copyright (c) 2019 Marc Fyrbiak, Sebastian Wallat, Max Hoffmann ("ORIGINAL AUTHORS"). All rights reserved.
5
// Copyright (c) 2021 Max Planck Institute for Security and Privacy. All Rights reserved.
6
// Copyright (c) 2021 Jörn Langheinrich, Julian Speith, Nils Albartus, René Walendy, Simon Klix ("ORIGINAL AUTHORS"). All Rights reserved.
7
//
8
// Permission is hereby granted, free of charge, to any person obtaining a copy
9
// of this software and associated documentation files (the "Software"), to deal
10
// in the Software without restriction, including without limitation the rights
11
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
12
// copies of the Software, and to permit persons to whom the Software is
13
// furnished to do so, subject to the following conditions:
14
//
15
// The above copyright notice and this permission notice shall be included in all
16
// copies or substantial portions of the Software.
17
//
18
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
19
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
21
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
22
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
23
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
24
// SOFTWARE.
25
26
#pragma once
27
#include <QList>
28
#include <QMap>
29
#include <QMutex>
30
#include "
waveform_viewer/wave_transform.h
"
31
#include "
hal_core/defines.h
"
32
33
class
QPainter
;
34
35
namespace
hal
{
36
class
WaveData;
37
class
WaveItemHash;
38
class
WaveDataList;
39
class
WaveFormPrimitive;
40
class
WaveFormPrimitiveFilled;
41
42
class
WaveScrollbar;
43
class
WaveTransform;
44
class
WaveDataProvider;
45
49
class
TimeInterval
50
{
51
public
:
52
double
mCenterTime
;
53
double
mDuration
;
54
TimeInterval
(quint64 t0 = 0, quint64 t1 = 0) :
mCenterTime
(0.5*(t0+t1)),
mDuration
(t1-t0) {;}
55
bool
operator<
(
const
TimeInterval
& other)
const
;
56
};
57
61
class
WaveFormPainted
62
{
63
QList<WaveFormPrimitive*>
mPrimitives;
64
WaveZoomShift
mValidity;
65
TimeInterval
mShortestToggle;
66
u64
mCursorTime;
67
int
mCursorXpos;
68
int
mCursorValue;
69
QMutex
mMutex;
70
71
void
clonePrimitives(
const
WaveFormPainted
& other);
72
public
:
73
WaveFormPainted
();
74
WaveFormPainted
(
const
WaveFormPainted
& other);
75
~WaveFormPainted
();
76
void
clearPrimitives
();
77
78
void
paint
(
int
y0,
QPainter
& painter);
79
80
void
generate
(
WaveDataProvider
* wdp,
const
WaveTransform
* trans,
const
WaveScrollbar
* sbar,
bool
* loop);
81
void
generateTrigger
(
WaveDataProvider
* wdp,
const
WaveTransform
* trans,
const
WaveScrollbar
* sbar,
bool
* loop);
82
bool
generateGroup
(
const
WaveData
* wd,
const
WaveItemHash
*hash);
83
bool
generateBoolean
(
const
WaveData
* wd,
const
WaveDataList
* wdList,
const
WaveItemHash
*hash);
84
85
int
numberPrimitives
()
const
{
return
mPrimitives.
size
(); }
86
87
float
x0
()
const
;
88
float
x1
()
const
;
89
90
int
valueXpos
(
int
xpos);
91
92
const
WaveZoomShift
&
validity
()
const
{
return
mValidity; }
93
bool
isEmpty
()
const
{
return
mPrimitives.
isEmpty
(); }
94
QMap<float,int>
primitiveValues
();
95
TimeInterval
shortestToggle
()
const
{
return
mShortestToggle; }
96
void
setCursorValue
(
u64
tCursor,
int
xpos,
int
val);
97
int
cursorValueStored
(
u64
tCursor,
int
xpos)
const
;
98
int
cursorValuePainted
(
u64
tCursor,
int
xpos);
99
int
cursorValueTrigger
(
u64
tCursor,
int
xpos);
100
WaveFormPainted
&
operator=
(
const
WaveFormPainted
& other);
101
};
102
}
hal::TimeInterval
Definition:
wave_form_painted.h:50
hal::TimeInterval::operator<
bool operator<(const TimeInterval &other) const
Definition:
wave_form_painted.cpp:14
hal::TimeInterval::mDuration
double mDuration
Definition:
wave_form_painted.h:53
hal::TimeInterval::mCenterTime
double mCenterTime
Definition:
wave_form_painted.h:52
hal::TimeInterval::TimeInterval
TimeInterval(quint64 t0=0, quint64 t1=0)
Definition:
wave_form_painted.h:54
hal::WaveData
Definition:
wave_data.h:76
hal::WaveDataList
Definition:
wave_data.h:172
hal::WaveDataProvider
Definition:
wave_data_provider.h:46
hal::WaveFormPainted
Definition:
wave_form_painted.h:62
hal::WaveFormPainted::primitiveValues
QMap< float, int > primitiveValues()
Definition:
wave_form_painted.cpp:95
hal::WaveFormPainted::setCursorValue
void setCursorValue(u64 tCursor, int xpos, int val)
Definition:
wave_form_painted.cpp:430
hal::WaveFormPainted::validity
const WaveZoomShift & validity() const
Definition:
wave_form_painted.h:92
hal::WaveFormPainted::generateTrigger
void generateTrigger(WaveDataProvider *wdp, const WaveTransform *trans, const WaveScrollbar *sbar, bool *loop)
Definition:
wave_form_painted.cpp:281
hal::WaveFormPainted::x1
float x1() const
Definition:
wave_form_painted.cpp:419
hal::WaveFormPainted::numberPrimitives
int numberPrimitives() const
Definition:
wave_form_painted.h:85
hal::WaveFormPainted::clearPrimitives
void clearPrimitives()
Definition:
wave_form_painted.cpp:67
hal::WaveFormPainted::paint
void paint(int y0, QPainter &painter)
Definition:
wave_form_painted.cpp:77
hal::WaveFormPainted::cursorValuePainted
int cursorValuePainted(u64 tCursor, int xpos)
Definition:
wave_form_painted.cpp:461
hal::WaveFormPainted::x0
float x0() const
Definition:
wave_form_painted.cpp:408
hal::WaveFormPainted::generateBoolean
bool generateBoolean(const WaveData *wd, const WaveDataList *wdList, const WaveItemHash *hash)
Definition:
wave_form_painted.cpp:188
hal::WaveFormPainted::operator=
WaveFormPainted & operator=(const WaveFormPainted &other)
Definition:
wave_form_painted.cpp:56
hal::WaveFormPainted::cursorValueTrigger
int cursorValueTrigger(u64 tCursor, int xpos)
Definition:
wave_form_painted.cpp:447
hal::WaveFormPainted::generate
void generate(WaveDataProvider *wdp, const WaveTransform *trans, const WaveScrollbar *sbar, bool *loop)
Definition:
wave_form_painted.cpp:309
hal::WaveFormPainted::~WaveFormPainted
~WaveFormPainted()
Definition:
wave_form_painted.cpp:51
hal::WaveFormPainted::isEmpty
bool isEmpty() const
Definition:
wave_form_painted.h:93
hal::WaveFormPainted::WaveFormPainted
WaveFormPainted()
Definition:
wave_form_painted.cpp:21
hal::WaveFormPainted::cursorValueStored
int cursorValueStored(u64 tCursor, int xpos) const
Definition:
wave_form_painted.cpp:437
hal::WaveFormPainted::generateGroup
bool generateGroup(const WaveData *wd, const WaveItemHash *hash)
Definition:
wave_form_painted.cpp:107
hal::WaveFormPainted::valueXpos
int valueXpos(int xpos)
Definition:
wave_form_painted.cpp:84
hal::WaveFormPainted::shortestToggle
TimeInterval shortestToggle() const
Definition:
wave_form_painted.h:95
hal::WaveItemHash
Definition:
wave_item.h:154
hal::WaveScrollbar
Definition:
wave_scrollbar.h:37
hal::WaveTransform
Definition:
wave_transform.h:37
hal::WaveZoomShift
Definition:
wave_transform.h:60
defines.h
u64
uint64_t u64
Definition:
defines.h:42
hal
Definition:
defines.h:45
QList
QList::isEmpty
bool isEmpty() const const
QList::size
int size() const const
QMap
QMutex
QPainter
wave_transform.h
plugins
simulator
waveform_viewer
include
waveform_viewer
wave_form_painted.h
Generated by
1.9.1