Move `dpiTemporaryVarSuffix()` to header. (#4474)

Co-authored-by: Mariusz Glebocki <mglebocki@antmicro.com>
This commit is contained in:
Kamil Rakoczy 2023-09-11 15:01:09 +02:00 committed by GitHub
parent c446cc2596
commit 0baee84e96
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 6 deletions

View File

@ -1554,6 +1554,8 @@ public:
//######################################################################
// Task class functions
const char* const V3Task::s_dpiTemporaryVarSuffix = "__Vcvt";
V3TaskConnects V3Task::taskConnects(AstNodeFTaskRef* nodep, AstNode* taskStmtsp) {
// Output list will be in order of the port declaration variables (so
// func calls are made right in C)
@ -1811,11 +1813,6 @@ string V3Task::assignDpiToInternal(const string& lhsName, AstVar* varp) {
return statements;
}
const char* V3Task::dpiTemporaryVarSuffix() {
static const char* const suffix = "__Vcvt";
return suffix;
}
void V3Task::taskAll(AstNetlist* nodep) {
UINFO(2, __FUNCTION__ << ": " << endl);
{

View File

@ -34,6 +34,8 @@ using V3TaskConnects = std::vector<V3TaskConnect>; // [ [port, pin-connects-to]
//============================================================================
class V3Task final {
static const char* const s_dpiTemporaryVarSuffix;
public:
static void taskAll(AstNetlist* nodep);
/// Return vector of [port, pin-connects-to] (SLOW)
@ -41,7 +43,7 @@ public:
static string assignInternalToDpi(AstVar* portp, bool isPtr, const string& frSuffix,
const string& toSuffix, const string& frPrefix = "");
static string assignDpiToInternal(const string& lhsName, AstVar* rhsp);
static const char* dpiTemporaryVarSuffix();
static const char* dpiTemporaryVarSuffix() VL_MT_SAFE { return s_dpiTemporaryVarSuffix; }
};
#endif // Guard