CIRCT 22.0.0git
Loading...
Searching...
No Matches
Public Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
circt::arc::runtime::impl::ModelInstance Class Reference

#include <ModelInstance.h>

Collaboration diagram for circt::arc::runtime::impl::ModelInstance:
Collaboration graph
[legend]

Public Member Functions

 ModelInstance ()=delete
 
 ModelInstance (const ArcRuntimeModelInfo *modelInfo, const char *args, ArcState *state)
 
 ~ModelInstance ()
 
const char * getModelName () const
 
void onInitialized (ArcState *mutableState)
 
void onEval (ArcState *mutableState)
 
uint64_t * swapTraceBuffer ()
 

Private Types

enum class  TraceMode { DUMMY , VCD }
 

Private Member Functions

void parseArgs (const char *args)
 
std::filesystem::path getTraceFilePath (const std::string &suffix)
 

Private Attributes

const uint64_t instanceID
 
const ArcRuntimeModelInfo *const modelInfo
 
const ArcState *const state
 
TraceMode traceMode
 
std::optional< std::string > traceFileArg
 
std::unique_ptr< TraceEncodertraceEncoder
 
bool verbose = false
 
uint64_t stepCounter = 0
 

Detailed Description

Definition at line 32 of file ModelInstance.h.

Member Enumeration Documentation

◆ TraceMode

Enumerator
DUMMY 
VCD 

Definition at line 54 of file ModelInstance.h.

Constructor & Destructor Documentation

◆ ModelInstance() [1/2]

circt::arc::runtime::impl::ModelInstance::ModelInstance ( )
delete

◆ ModelInstance() [2/2]

circt::arc::runtime::impl::ModelInstance::ModelInstance ( const ArcRuntimeModelInfo modelInfo,
const char *  args,
ArcState state 
)

◆ ~ModelInstance()

circt::arc::runtime::impl::ModelInstance::~ModelInstance ( )

Member Function Documentation

◆ getModelName()

const char * circt::arc::runtime::impl::ModelInstance::getModelName ( ) const
inline

Definition at line 39 of file ModelInstance.h.

References modelInfo, and ArcRuntimeModelInfo::modelName.

Referenced by ModelInstance(), and ~ModelInstance().

◆ getTraceFilePath()

std::filesystem::path circt::arc::runtime::impl::ModelInstance::getTraceFilePath ( const std::string &  suffix)
private

Definition at line 89 of file ModelInstance.cpp.

References instanceID, modelInfo, ArcRuntimeModelInfo::modelName, and traceFileArg.

Referenced by ModelInstance().

◆ onEval()

void circt::arc::runtime::impl::ModelInstance::onEval ( ArcState mutableState)

Definition at line 106 of file ModelInstance.cpp.

References assert(), state, stepCounter, and traceEncoder.

◆ onInitialized()

void circt::arc::runtime::impl::ModelInstance::onInitialized ( ArcState mutableState)

Definition at line 113 of file ModelInstance.cpp.

References assert(), instanceID, state, traceEncoder, and verbose.

◆ parseArgs()

void circt::arc::runtime::impl::ModelInstance::parseArgs ( const char *  args)
private

◆ swapTraceBuffer()

uint64_t * circt::arc::runtime::impl::ModelInstance::swapTraceBuffer ( )

Member Data Documentation

◆ instanceID

const uint64_t circt::arc::runtime::impl::ModelInstance::instanceID
private

◆ modelInfo

const ArcRuntimeModelInfo* const circt::arc::runtime::impl::ModelInstance::modelInfo
private

Definition at line 52 of file ModelInstance.h.

Referenced by getModelName(), getTraceFilePath(), and ModelInstance().

◆ state

const ArcState* const circt::arc::runtime::impl::ModelInstance::state
private

Definition at line 53 of file ModelInstance.h.

Referenced by onEval(), onInitialized(), swapTraceBuffer(), and ~ModelInstance().

◆ stepCounter

uint64_t circt::arc::runtime::impl::ModelInstance::stepCounter = 0
private

Definition at line 59 of file ModelInstance.h.

Referenced by onEval(), and ~ModelInstance().

◆ traceEncoder

std::unique_ptr<TraceEncoder> circt::arc::runtime::impl::ModelInstance::traceEncoder
private

Definition at line 57 of file ModelInstance.h.

Referenced by ModelInstance(), onEval(), onInitialized(), swapTraceBuffer(), and ~ModelInstance().

◆ traceFileArg

std::optional<std::string> circt::arc::runtime::impl::ModelInstance::traceFileArg
private

Definition at line 56 of file ModelInstance.h.

Referenced by getTraceFilePath(), and parseArgs().

◆ traceMode

TraceMode circt::arc::runtime::impl::ModelInstance::traceMode
private

Definition at line 55 of file ModelInstance.h.

Referenced by ModelInstance(), and parseArgs().

◆ verbose

bool circt::arc::runtime::impl::ModelInstance::verbose = false
private

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