projects
/
yosys.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2f93579
)
ast recognize lower case x and z and verific gives upper case
author
Miodrag Milanovic
<mmicko@gmail.com>
Sun, 30 Aug 2020 11:33:03 +0000
(13:33 +0200)
committer
Miodrag Milanovic
<mmicko@gmail.com>
Sun, 30 Aug 2020 11:33:03 +0000
(13:33 +0200)
frontends/verific/verific.cc
patch
|
blob
|
history
diff --git
a/frontends/verific/verific.cc
b/frontends/verific/verific.cc
index c974c3faabc077ed28285877eda365f7d9698736..4358d957ddaed67cb8ff8e119cb80b2ace67e6f5 100644
(file)
--- a/
frontends/verific/verific.cc
+++ b/
frontends/verific/verific.cc
@@
-203,8
+203,12
@@
void VerificImporter::import_attributes(dict<RTLIL::IdString, RTLIL::Const> &att
auto p = v;
if (p) {
if (*p != '"') {
- if (p != nullptr)
- attributes.emplace(stringf("\\enum_value_%s", p), RTLIL::escape_id(k));
+ auto l = strlen(p);
+ auto q = (char*)malloc(l+1);
+ strncpy(q, p, l);
+ q[l] = '\0';
+ for(char *ptr = q; *ptr; ++ptr )*ptr = tolower(*ptr);
+ attributes.emplace(stringf("\\enum_value_%s", q), RTLIL::escape_id(k));
} else {
auto *q = p+1;
for (; *q != '"'; q++)