aboutsummaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
authorEddie Hung <eddie@fpgeh.com>2019-08-06 19:07:45 -0700
committerEddie Hung <eddie@fpgeh.com>2019-08-06 19:07:45 -0700
commit234fcf1724941b5c4fa77cc0359d339ddd36aeb3 (patch)
tree36d65d38d42b03e4ffd80ddf41aeb5dc94ef38b4 /kernel
parente5be9ff8711533a6ed4dc77722c0df06a5c28356 (diff)
downloadyosys-234fcf1724941b5c4fa77cc0359d339ddd36aeb3.tar.gz
yosys-234fcf1724941b5c4fa77cc0359d339ddd36aeb3.tar.bz2
yosys-234fcf1724941b5c4fa77cc0359d339ddd36aeb3.zip
Fix typos
Diffstat (limited to 'kernel')
-rw-r--r--kernel/rtlil.cc4
-rw-r--r--kernel/rtlil.h4
2 files changed, 4 insertions, 4 deletions
diff --git a/kernel/rtlil.cc b/kernel/rtlil.cc
index 0c7216520..c8bfa8da6 100644
--- a/kernel/rtlil.cc
+++ b/kernel/rtlil.cc
@@ -828,7 +828,7 @@ namespace {
void check()
{
- if (cell->type.begins_with("$") || cell->type.begins_with("$__") || cell->type.begins_with("$paramod") || cell->type.begins_with("$fmcombine") ||
+ if (!cell->type.begins_with("$") || cell->type.begins_with("$__") || cell->type.begins_with("$paramod") || cell->type.begins_with("$fmcombine") ||
cell->type.begins_with("$verific$") || cell->type.begins_with("$array:") || cell->type.begins_with("$extern:"))
return;
@@ -2553,7 +2553,7 @@ void RTLIL::Cell::check()
void RTLIL::Cell::fixup_parameters(bool set_a_signed, bool set_b_signed)
{
- if (type.begins_with("$") || type.begins_with("$_") || type.begins_with("$paramod") || type.begins_with("$fmcombine") ||
+ if (!type.begins_with("$") || type.begins_with("$_") || type.begins_with("$paramod") || type.begins_with("$fmcombine") ||
type.begins_with("$verific$") || type.begins_with("$array:") || type.begins_with("$extern:"))
return;
diff --git a/kernel/rtlil.h b/kernel/rtlil.h
index d7e036431..275b0b269 100644
--- a/kernel/rtlil.h
+++ b/kernel/rtlil.h
@@ -283,13 +283,13 @@ namespace RTLIL
bool begins_with(const char* prefix) const {
size_t len = strlen(prefix);
if (size() < len) return false;
- return compare(0, len, prefix);
+ return compare(0, len, prefix) == 0;
}
bool ends_with(const char* suffix) const {
size_t len = strlen(suffix);
if (size() < len) return false;
- return compare(size()-len, len, suffix);
+ return compare(size()-len, len, suffix) == 0;
}
size_t size() const {