Skip to content

Commit

Permalink
Format
Browse files Browse the repository at this point in the history
Signed-off-by: Ryszard Rozak <[email protected]>
  • Loading branch information
RRozak committed Nov 15, 2023
1 parent 2f814bd commit 8b7a877
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 20 deletions.
43 changes: 29 additions & 14 deletions src/V3Ast.h
Original file line number Diff line number Diff line change
Expand Up @@ -561,19 +561,33 @@ class VBasicDTypeKwd final {
return names[m_e];
}
const char* dpiType() const {
static const char* const names[] = {"%E-unk", "svBit",
"char", "void*",
"char", "int",
"%E-integer", "svLogic",
"long long", "double",
"short", "%E-time",
"const char*", "%E-untyped",
"dpiScope", "const char*",
"%E-mtaskstate", "%E-triggervec",
"%E-dly-sched", "%E-trig-sched",
"%E-dyn-sched", "%E-fork", "%error-rand-gen",
"%E-proc-ref", "IData",
"QData", "%E-logic-implct",
static const char* const names[] = {"%E-unk",
"svBit",
"char",
"void*",
"char",
"int",
"%E-integer",
"svLogic",
"long long",
"double",
"short",
"%E-time",
"const char*",
"%E-untyped",
"dpiScope",
"const char*",
"%E-mtaskstate",
"%E-triggervec",
"%E-dly-sched",
"%E-trig-sched",
"%E-dyn-sched",
"%E-fork",
"%error-rand-gen",
"%E-proc-ref",
"IData",
"QData",
"%E-logic-implct",
" MAX"};
return names[m_e];
}
Expand Down Expand Up @@ -654,7 +668,8 @@ class VBasicDTypeKwd final {
return (m_e == EVENT || m_e == STRING || m_e == SCOPEPTR || m_e == CHARPTR
|| m_e == MTASKSTATE || m_e == TRIGGERVEC || m_e == DELAY_SCHEDULER
|| m_e == TRIGGER_SCHEDULER || m_e == DYNAMIC_TRIGGER_SCHEDULER || m_e == FORK_SYNC
|| m_e == RANDOM_GENERATOR || m_e == PROCESS_REFERENCE || m_e == DOUBLE || m_e == UNTYPED);
|| m_e == RANDOM_GENERATOR || m_e == PROCESS_REFERENCE || m_e == DOUBLE
|| m_e == UNTYPED);
}
bool isDouble() const VL_MT_SAFE { return m_e == DOUBLE; }
bool isEvent() const { return m_e == EVENT; }
Expand Down
4 changes: 3 additions & 1 deletion src/V3AstNodeDType.h
Original file line number Diff line number Diff line change
Expand Up @@ -434,7 +434,9 @@ class AstBasicDType final : public AstNodeDType {
bool isDynamicTriggerScheduler() const VL_MT_SAFE {
return keyword() == VBasicDTypeKwd::DYNAMIC_TRIGGER_SCHEDULER;
}
bool isRandomGenerator() const VL_MT_SAFE { return keyword() == VBasicDTypeKwd::RANDOM_GENERATOR; }
bool isRandomGenerator() const VL_MT_SAFE {
return keyword() == VBasicDTypeKwd::RANDOM_GENERATOR;
}
bool isOpaque() const VL_MT_SAFE { return keyword().isOpaque(); }
bool isString() const VL_MT_SAFE { return keyword().isString(); }
bool isZeroInit() const { return keyword().isZeroInit(); }
Expand Down
10 changes: 5 additions & 5 deletions src/V3Randomize.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -391,11 +391,11 @@ class RandomizeVisitor final : public VNVisitor {
AstNodeExpr* exprp = condsp->exprp()->unlinkFrBack();
pushDeletep(condsp);
// only hard constraints are now supported
auto* const methodp = new AstCMethodHard{
fl, new AstVarRef{fl, genp, VAccess::READWRITE}, "hard", exprp};
methodp->dtypeSetVoid();
taskp->addStmtsp(new AstStmtExpr{fl, methodp});
}
auto* const methodp = new AstCMethodHard{
fl, new AstVarRef{fl, genp, VAccess::READWRITE}, "hard", exprp};
methodp->dtypeSetVoid();
taskp->addStmtsp(new AstStmtExpr{fl, methodp});
}
});
}
void visit(AstRandCase* nodep) override {
Expand Down

0 comments on commit 8b7a877

Please sign in to comment.