Skip to content

Commit

Permalink
Merge pull request #3962 from alainmarcel/alainmarcel-patch-1
Browse files Browse the repository at this point in the history
remove underscores in values
  • Loading branch information
alaindargelas committed Feb 22, 2024
2 parents 3e9c2d0 + 4bce12b commit 2c4aba0
Show file tree
Hide file tree
Showing 19 changed files with 783 additions and 781 deletions.
4 changes: 3 additions & 1 deletion src/DesignCompile/CompileExpression.cpp
Expand Up @@ -44,6 +44,7 @@
#include <Surelog/Utils/NumUtils.h>
#include <Surelog/Utils/StringUtils.h>

#include <algorithm>
#include <cmath>
#include <cstring>

Expand Down Expand Up @@ -432,7 +433,8 @@ constant *compileConst(const FileContent *fC, NodeId child, Serializer &s) {
// Do not evaluate the constant, keep it as in the source text:
UHDM::constant *c = s.MakeConstant();
fC->populateCoreMembers(child, child, c);
const std::string_view value = fC->SymName(child);
std::string value = std::string(fC->SymName(child));
value.erase(std::remove(value.begin(), value.end(), '_'), value.end());
std::string v;
c->VpiDecompile(value);
bool tickNumber = (value.find('\'') != std::string::npos);
Expand Down

0 comments on commit 2c4aba0

Please sign in to comment.