projects
/
yosys.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
bbf3435
)
cxxrtl: Round up constant width
author
David Shah
<dave@ds0.me>
Sat, 25 Apr 2020 09:42:21 +0000
(10:42 +0100)
committer
David Shah
<dave@ds0.me>
Sat, 25 Apr 2020 09:42:21 +0000
(10:42 +0100)
Signed-off-by: David Shah <dave@ds0.me>
backends/cxxrtl/cxxrtl.cc
patch
|
blob
|
history
diff --git
a/backends/cxxrtl/cxxrtl.cc
b/backends/cxxrtl/cxxrtl.cc
index e5351a387459dc8103db01c623913f3c13aa81b5..e7711962f20dc1c835eb9e6d2791c1d4c9a18eb6 100644
(file)
--- a/
backends/cxxrtl/cxxrtl.cc
+++ b/
backends/cxxrtl/cxxrtl.cc
@@
-732,7
+732,7
@@
struct CxxrtlWorker {
int chunk_width = min(width, CHUNK_SIZE);
uint32_t chunk = data.extract(offset, chunk_width).as_int();
if (fixed_width)
- f << stringf("0x%.*xu",
chunk_width
/ 4, chunk);
+ f << stringf("0x%.*xu",
(3 + chunk_width)
/ 4, chunk);
else
f << stringf("%#xu", chunk);
if (width > CHUNK_SIZE)