HAL  v4.5.0-83-g30c8f0afc
The Hardware Analyzer - a comprehensive reverse engineering and manipulation framework for gate-level netlists.
hal::WaveData Class Reference

#include </home/runner/work/hal/hal/plugins/simulator/netlist_simulator_controller/include/netlist_simulator_controller/wave_data.h>

Inheritance diagram for hal::WaveData:
Inheritance graph
Collaboration diagram for hal::WaveData:
Collaboration graph

Public Types

enum  NetType {
  RegularNet , InputNet , OutputNet , ClockNet ,
  BooleanNet , TriggerTime , NetGroup
}
 
enum  LoadPolicy { TooBigToLoad , LoadTimeframe , LoadAllData }
 

Public Member Functions

 WaveData (const WaveData &other)
 
 WaveData (u32 id_, const QString &nam, NetType tp=RegularNet, const QMap< u64, int > &dat=QMap< u64, int >())
 
 WaveData (const Net *n, NetType tp=RegularNet)
 
virtual ~WaveData ()
 
u32 id () const
 
QString name () const
 
NetType netType () const
 
virtual int bits () const
 
bool isDirty () const
 
const QMap< u64, int > & data () const
 
int fileIndex () const
 
u64 fileSize () const
 
int valueBase () const
 
std::string fileName () const
 
SaleaeDirectoryNetEntry::Type composedType () const
 
void setId (u32 id_)
 
bool rename (const QString &nam)
 
void setBits (int bts)
 
void setDirty (bool dty)
 
void setFileIndex (int saleaIndex)
 
void setFileSize (u64 siz)
 
void setTimeframeSize (u64 siz)
 
void setWaveDataList (WaveDataList *wdList)
 
virtual LoadPolicy loadPolicy () const
 
int dataIndex () const
 
virtual u64 neighborTransition (double t, bool next) const
 
void loadDataUnlessAlreadyLoaded ()
 
bool loadSaleae (const WaveDataTimeframe &tframe=WaveDataTimeframe())
 
void saveSaleae ()
 
void setData (const QMap< u64, int > &dat)
 
virtual int intValue (double t) const
 
int get_value_at (u64 t)
 
std::string get_name () const
 
std::vector< std::pair< u64, int > > get_events (u64 t0=0) const
 
std::vector< std::pair< u64, int > > get_triggered_events (const WaveDataTrigger *wdTrig, u64 t0=0)
 
u64 maxTime () const
 
void clear ()
 
void insert (u64 t, int val)
 
void insertBooleanValueWithoutSync (u64 t, BooleanFunction::Value bval)
 
QString strValue (int val) const
 
QString strValue (double t) const
 
QString strValue (const QMap< u64, int >::const_iterator &it) const
 
void setValueBase (int bas)
 
bool isEqual (const WaveData &other, int tolerance=0) const
 
bool hasSubscriber () const
 
void addSubscriber ()
 
void removeSubscriber ()
 

Static Public Member Functions

static QString stringValue (int val, int bits, int base)
 

Protected Member Functions

QMap< u64, int >::const_iterator timeIterator (double t) const
 
void resetWave ()
 

Protected Attributes

int mValueBase
 
QMap< u64, int > mData
 
bool mDirty
 
WaveDataListmWaveDataList
 

Detailed Description

The waveform of a single net, i.e., the sequence of value changes over time together with its display properties.

Definition at line 75 of file wave_data.h.

Member Enumeration Documentation

◆ LoadPolicy

Enumerator
TooBigToLoad 
LoadTimeframe 
LoadAllData 

Definition at line 79 of file wave_data.h.

◆ NetType

Enumerator
RegularNet 
InputNet 
OutputNet 
ClockNet 
BooleanNet 
TriggerTime 
NetGroup 

Definition at line 78 of file wave_data.h.

Constructor & Destructor Documentation

◆ WaveData() [1/3]

hal::WaveData::WaveData ( const WaveData other)

Definition at line 48 of file wave_data.cpp.

Referenced by hal::WaveDataGroup::addNet(), and hal::WaveDataGroup::WaveDataGroup().

◆ WaveData() [2/3]

hal::WaveData::WaveData ( u32  id_,
const QString nam,
NetType  tp = RegularNet,
const QMap< u64, int > &  dat = QMap<u64,int>() 
)

Definition at line 54 of file wave_data.cpp.

◆ WaveData() [3/3]

hal::WaveData::WaveData ( const Net n,
NetType  tp = RegularNet 
)

Definition at line 58 of file wave_data.cpp.

◆ ~WaveData()

virtual hal::WaveData::~WaveData ( )
inlinevirtual

Definition at line 102 of file wave_data.h.

Member Function Documentation

◆ addSubscriber()

void hal::WaveData::addSubscriber ( )
inline

Definition at line 146 of file wave_data.h.

Referenced by hal::WaveItem::WaveItem().

◆ bits()

◆ clear()

void hal::WaveData::clear ( )
inline

Definition at line 136 of file wave_data.h.

References QMap::clear(), and mData.

Referenced by hal::WaveDataList::setUserTimeframe().

◆ composedType()

◆ data()

◆ dataIndex()

int hal::WaveData::dataIndex ( ) const

◆ fileIndex()

int hal::WaveData::fileIndex ( ) const
inline

◆ fileName()

std::string hal::WaveData::fileName ( ) const

◆ fileSize()

◆ get_events()

◆ get_name()

std::string hal::WaveData::get_name ( ) const
inline

Definition at line 132 of file wave_data.h.

References QString::toStdString().

Referenced by hal::PYBIND11_PLUGIN(), and hal::WaveDataGroup::restoreIndex().

◆ get_triggered_events()

std::vector< std::pair< u64, int > > hal::WaveData::get_triggered_events ( const WaveDataTrigger wdTrig,
u64  t0 = 0 
)

Definition at line 183 of file wave_data.cpp.

References get_events(), and intValue().

Referenced by hal::PYBIND11_PLUGIN().

◆ get_value_at()

int hal::WaveData::get_value_at ( u64  t)

◆ hasSubscriber()

bool hal::WaveData::hasSubscriber ( ) const
inline

Definition at line 145 of file wave_data.h.

◆ id()

u32 hal::WaveData::id ( ) const
inline

Definition at line 103 of file wave_data.h.

Referenced by hal::WaveDataList::add(), hal::NetlistSimulatorController::add_boolean_accept_list_waveform(), hal::NetlistSimulatorController::add_boolean_expression_waveform(), hal::NetlistSimulatorController::add_trigger_time(), hal::NetlistSimulatorController::add_waveform_group(), hal::WaveWidget::addableEntries(), hal::WaveDataList::addOrReplace(), hal::WaveTreeModel::addWaves(), hal::BooleanDialog::BooleanDialog(), hal::WaveTreeModel::booleanId(), hal::WaveTreeModel::data(), hal::WaveDataRoot::dump(), hal::WaveItem::dump(), hal::VcdSerializer::exportCsv(), hal::VcdSerializer::exportVcd(), hal::WaveFormPainted::generateGroup(), hal::WaveTreeModel::groupId(), hal::WaveTreeModel::handleBooleanAdded(), hal::WaveTreeModel::handleGroupAboutToBeRemoved(), hal::WaveTreeModel::handleGroupAdded(), hal::WaveTreeModel::handleTriggerAdded(), hal::WaveTreeModel::hashIndex(), hal::WaveTreeModel::insertExisting(), hal::WaveTreeModel::insertItem(), hal::PYBIND11_PLUGIN(), hal::WaveWidget::refreshNetNames(), hal::WaveDataGroup::remove_waveform(), hal::WaveTreeModel::removeGroup(), hal::WaveTreeModel::removeItemFromHash(), hal::NetlistSimulatorController::rename_waveform(), hal::WaveTreeModel::restore(), hal::WaveTreeView::selectionChanged(), hal::WaveDataTrigger::set_filter_wave(), hal::TriggerDialog::TriggerDialog(), hal::WaveTreeModel::triggerId(), hal::WaveDataList::updateWaveData(), hal::WaveDataList::waveDataById(), hal::WaveDataGroupIndex::WaveDataGroupIndex(), hal::WaveTreeModel::waveDataIndexSet(), hal::WaveDataProviderGroup::WaveDataProviderGroup(), hal::WaveDataProviderTrigger::WaveDataProviderTrigger(), and hal::WaveTreeModel::waveIndex().

◆ insert()

void hal::WaveData::insert ( u64  t,
int  val 
)
inline

Definition at line 137 of file wave_data.h.

References QMap::insert(), and mData.

◆ insertBooleanValueWithoutSync()

void hal::WaveData::insertBooleanValueWithoutSync ( u64  t,
BooleanFunction::Value  bval 
)

◆ intValue()

◆ isDirty()

bool hal::WaveData::isDirty ( ) const
inline

Definition at line 107 of file wave_data.h.

References mDirty.

◆ isEqual()

bool hal::WaveData::isEqual ( const WaveData other,
int  tolerance = 0 
) const

◆ loadDataUnlessAlreadyLoaded()

◆ loadPolicy()

◆ loadSaleae()

◆ maxTime()

u64 hal::WaveData::maxTime ( ) const

Definition at line 525 of file wave_data.cpp.

References QMap::isEmpty(), QMap::lastKey(), and mData.

Referenced by saveSaleae().

◆ name()

◆ neighborTransition()

◆ netType()

◆ removeSubscriber()

void hal::WaveData::removeSubscriber ( )
inline

Definition at line 147 of file wave_data.h.

Referenced by hal::WaveItem::~WaveItem().

◆ rename()

◆ resetWave()

void hal::WaveData::resetWave ( )
protected

Definition at line 64 of file wave_data.cpp.

References QMap::clear(), and mData.

Referenced by loadSaleae(), and hal::WaveDataClock::setMaxTime().

◆ saveSaleae()

◆ setBits()

void hal::WaveData::setBits ( int  bts)

Definition at line 97 of file wave_data.cpp.

References mDirty.

Referenced by hal::WaveDataGroup::WaveDataGroup().

◆ setData()

void hal::WaveData::setData ( const QMap< u64, int > &  dat)

Definition at line 119 of file wave_data.cpp.

References mData, and mDirty.

Referenced by hal::WaveLoaderThread::run().

◆ setDirty()

void hal::WaveData::setDirty ( bool  dty)
inline

Definition at line 117 of file wave_data.h.

References mDirty.

Referenced by hal::WaveItem::setState().

◆ setFileIndex()

void hal::WaveData::setFileIndex ( int  saleaIndex)
inline

Definition at line 118 of file wave_data.h.

Referenced by hal::WaveDataList::updateFromSaleae().

◆ setFileSize()

void hal::WaveData::setFileSize ( u64  siz)

Definition at line 69 of file wave_data.cpp.

Referenced by hal::WaveDataList::updateFromSaleae().

◆ setId()

void hal::WaveData::setId ( u32  id_)

Definition at line 83 of file wave_data.cpp.

References mDirty.

◆ setTimeframeSize()

void hal::WaveData::setTimeframeSize ( u64  siz)
inline

Definition at line 120 of file wave_data.h.

Referenced by hal::WaveLoaderThread::run(), and hal::WaveDataList::setUserTimeframe().

◆ setValueBase()

void hal::WaveData::setValueBase ( int  bas)
inline

Definition at line 142 of file wave_data.h.

References mValueBase.

◆ setWaveDataList()

void hal::WaveData::setWaveDataList ( WaveDataList wdList)
inline

Definition at line 121 of file wave_data.h.

References mWaveDataList.

Referenced by hal::WaveDataList::add().

◆ stringValue()

QString hal::WaveData::stringValue ( int  val,
int  bits,
int  base 
)
static

Definition at line 489 of file wave_data.cpp.

References QString::arg(), bits(), and QString::number().

Referenced by hal::WaveFormPrimitiveValue::paint(), and strValue().

◆ strValue() [1/3]

QString hal::WaveData::strValue ( const QMap< u64, int >::const_iterator &  it) const

Definition at line 478 of file wave_data.cpp.

References QMap::constEnd(), mData, strValue(), and QMap::value().

◆ strValue() [2/3]

QString hal::WaveData::strValue ( double  t) const

Definition at line 471 of file wave_data.cpp.

References QMap::isEmpty(), mData, strValue(), and timeIterator().

◆ strValue() [3/3]

QString hal::WaveData::strValue ( int  val) const

Definition at line 484 of file wave_data.cpp.

References bits(), mValueBase, and stringValue().

Referenced by hal::WaveEditTable::data(), hal::WaveTreeModel::data(), and strValue().

◆ timeIterator()

QMap< u64, int >::const_iterator hal::WaveData::timeIterator ( double  t) const
protected

Definition at line 352 of file wave_data.cpp.

References QMap::constBegin(), QMap::constEnd(), mData, and QMap::upperBound().

Referenced by intValue(), and strValue().

◆ valueBase()

int hal::WaveData::valueBase ( ) const
inline

Member Data Documentation

◆ mData

◆ mDirty

bool hal::WaveData::mDirty
protected

◆ mValueBase

int hal::WaveData::mValueBase
protected

Definition at line 90 of file wave_data.h.

Referenced by setValueBase(), strValue(), and valueBase().

◆ mWaveDataList


The documentation for this class was generated from the following files: