diff options
author | Clifford Wolf <clifford@clifford.at> | 2017-05-16 08:50:23 +0200 |
---|---|---|
committer | Clifford Wolf <clifford@clifford.at> | 2017-05-16 08:50:23 +0200 |
commit | 35be567605a8b032bb42f5911f3d658d8ba83b6a (patch) | |
tree | cd8f3288fba320f8ab546823b22cfc3d0f0f61e5 /backends/simplec/simplec.cc | |
parent | 8d3c7064598fe68d68b79edd30a13d3022ea6e65 (diff) | |
download | yosys-35be567605a8b032bb42f5911f3d658d8ba83b6a.tar.gz yosys-35be567605a8b032bb42f5911f3d658d8ba83b6a.tar.bz2 yosys-35be567605a8b032bb42f5911f3d658d8ba83b6a.zip |
Improve simplec back-end
Diffstat (limited to 'backends/simplec/simplec.cc')
-rw-r--r-- | backends/simplec/simplec.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/backends/simplec/simplec.cc b/backends/simplec/simplec.cc index 5ea35c564..c8a812748 100644 --- a/backends/simplec/simplec.cc +++ b/backends/simplec/simplec.cc @@ -235,7 +235,7 @@ struct SimplecWorker util_declarations.push_back(stringf(" else")); util_declarations.push_back(stringf(" sig->%s &= ~(1UL << %d);", value_name.c_str(), word_offset)); #else - util_declarations.push_back(stringf(" sig->%s = (sig->%s | (uint%d_t)(value & 1) << %d) & ~((uint%d_t)((value & 1) ^ 1) << %d);", + util_declarations.push_back(stringf(" sig->%s = (sig->%s & ~((uint%d_t)1 << %d)) | ((uint%d_t)value << %d);", value_name.c_str(), value_name.c_str(), max_uintsize, word_offset, max_uintsize, word_offset)); #endif |