HAL
hal::FFComponentEntry Class Reference

A entry type that represents properties (functions and behaviors) of an FFCompont. More...

#include <boolean_function_table_model.h>

Inheritance diagram for hal::FFComponentEntry:
Inheritance graph
Collaboration diagram for hal::FFComponentEntry:
Collaboration graph

Public Types

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

Public Member Functions

 FFComponentEntry (u32 gateId, FFCompFunc type, BooleanFunction func)
 
 FFComponentEntry (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

A entry type that represents properties (functions and behaviors) of an FFCompont.

Definition at line 152 of file boolean_function_table_model.h.

Member Enumeration Documentation

◆ FFCompFunc

Enumerator
Clock 
NextState 
AsyncSet 
AsyncReset 
SetResetBehav 

Definition at line 156 of file boolean_function_table_model.h.

Constructor & Destructor Documentation

◆ FFComponentEntry() [1/2]

hal::FFComponentEntry::FFComponentEntry ( u32  gateId,
FFComponentEntry::FFCompFunc  type,
BooleanFunction  func 
)

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

Parameters
gateId- The represented gate's id.
type- The entry's type (except SetResetBehav, this has its own constructor).
func- The function to display.

Definition at line 217 of file boolean_function_table_model.cpp.

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

◆ FFComponentEntry() [2/2]

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

The constructor for the SetResetBehav.

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

Member Function Documentation

◆ getPythonCode()

QString hal::FFComponentEntry::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 233 of file boolean_function_table_model.cpp.

References hal::BooleanFunctionTableEntry::mGateId, hal::PyCodeProvider::pyCodeFFCompAsyncResetFunc(), hal::PyCodeProvider::pyCodeFFCompAsyncSetFunc(), hal::PyCodeProvider::pyCodeFFCompClockFunc(), hal::PyCodeProvider::pyCodeFFCompNextStateFunc(), and hal::PyCodeProvider::pyCodeFFCompSetResetBehav().


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