HAL
hal::LatchComponentEntry Class Reference

An entry type that represents properties (functions or behaviors) of a LatchComponent. More...

#include <boolean_function_table_model.h>

Inheritance diagram for hal::LatchComponentEntry:
Inheritance graph
Collaboration diagram for hal::LatchComponentEntry:
Collaboration graph

Public Types

enum  LatchCompFunc {
  Enable = 0 , DataInFunc = 1 , AsyncSet = 2 , AsyncReset = 3 ,
  SetResetBehav = 4
}
 
- Public Types inherited from hal::BooleanFunctionTableEntry
enum class  EntryType {
  BooleanFunctionStandard , CPBehavior , StateComp , FFComp ,
  LatchComp
}
 

Public Member Functions

 LatchComponentEntry (u32 gateId, LatchCompFunc type, BooleanFunction func)
 
 LatchComponentEntry (u32 gateId, std::pair< hal::AsyncSetResetBehavior, hal::AsyncSetResetBehavior > behav)
 
QString getPythonCode () override
 
- Public Member Functions inherited from hal::BooleanFunctionTableEntry
 BooleanFunctionTableEntry (u32 gateId)
 
QString getEntryIdentifier () const
 
QString getEntryValueString () const
 
u32 getGateId () const
 
EntryType getEntryType () const
 

Additional Inherited Members

- Protected Attributes inherited from hal::BooleanFunctionTableEntry
QString mLeft
 
QString mRight
 
u32 mGateId
 
EntryType mType
 

Detailed Description

An entry type that represents properties (functions or behaviors) of a LatchComponent.

Definition at line 189 of file boolean_function_table_model.h.

Member Enumeration Documentation

◆ LatchCompFunc

Enumerator
Enable 
DataInFunc 
AsyncSet 
AsyncReset 
SetResetBehav 

Definition at line 192 of file boolean_function_table_model.h.

Constructor & Destructor Documentation

◆ LatchComponentEntry() [1/2]

hal::LatchComponentEntry::LatchComponentEntry ( u32  gateId,
LatchComponentEntry::LatchCompFunc  type,
BooleanFunction  func 
)

The constructor. For the LatchCompFunc parameter, everything except SetResetBehav should be set.

Parameters
gateId- The gate's id.
type- The entry's type (except SetResetBehav).
func- The function to display.

Definition at line 265 of file boolean_function_table_model.cpp.

References QString::fromStdString(), hal::BooleanFunctionTableEntry::LatchComp, hal::BooleanFunctionTableEntry::mLeft, hal::BooleanFunctionTableEntry::mRight, hal::BooleanFunctionTableEntry::mType, hal::BooleanFunction::to_string(), and type.

◆ LatchComponentEntry() [2/2]

hal::LatchComponentEntry::LatchComponentEntry ( u32  gateId,
std::pair< hal::AsyncSetResetBehavior, hal::AsyncSetResetBehavior behav 
)

The constructor for the set_reset behavior.

Parameters
gateId- The gate's id.
behav- The behavior.

Member Function Documentation

◆ getPythonCode()

QString hal::LatchComponentEntry::getPythonCode ( )
overridevirtual

Returns the python code necessary to access the entry's value through a gate. This function should return an empty string if no python code is available. (E.g. when a "random" boolean function is displayed that belongs to no gate or component)

Returns
The python code if available or an empty string otherwise.

Reimplemented from hal::BooleanFunctionTableEntry.

Definition at line 281 of file boolean_function_table_model.cpp.

References hal::BooleanFunctionTableEntry::mGateId, hal::PyCodeProvider::pyCodeLatchCompAsyncResetFunc(), hal::PyCodeProvider::pyCodeLatchCompAsyncSetFunc(), hal::PyCodeProvider::pyCodeLatchCompDataInFunc(), hal::PyCodeProvider::pyCodeLatchCompEnableFunc(), and hal::PyCodeProvider::pyCodeLatchCompSetResetBehav().


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