diff options
author | Miodrag Milanovic <mmicko@gmail.com> | 2020-08-30 13:33:03 +0200 |
---|---|---|
committer | Miodrag Milanovic <mmicko@gmail.com> | 2020-08-30 13:33:03 +0200 |
commit | 3af499c60f664711501cf3ee1ab5ff1943315e82 (patch) | |
tree | 9d5920b4dd53bf77feb596bc67416e6877adf347 /frontends/verific | |
parent | 2f93579bd1d4d81b0ee3d327e604c0c4773759a7 (diff) | |
download | yosys-3af499c60f664711501cf3ee1ab5ff1943315e82.tar.gz yosys-3af499c60f664711501cf3ee1ab5ff1943315e82.tar.bz2 yosys-3af499c60f664711501cf3ee1ab5ff1943315e82.zip |
ast recognize lower case x and z and verific gives upper case
Diffstat (limited to 'frontends/verific')
-rw-r--r-- | frontends/verific/verific.cc | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/frontends/verific/verific.cc b/frontends/verific/verific.cc index c974c3faa..4358d957d 100644 --- 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++) |