diff options
author | whitequark <whitequark@whitequark.org> | 2020-04-25 18:30:53 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-04-25 18:30:53 +0000 |
commit | 868b6b1b0dfa7ca1f10392678d7c3c29db37c60d (patch) | |
tree | b99d4d701ffaa6cf0e09d10b3b0acd3cedd93f4e /backends | |
parent | bbf343589ba2b4508afdfaed17dfd11c3252cf7f (diff) | |
parent | 1b93dda03718154fe4c5d292e53c0514bf1e633b (diff) | |
download | yosys-868b6b1b0dfa7ca1f10392678d7c3c29db37c60d.tar.gz yosys-868b6b1b0dfa7ca1f10392678d7c3c29db37c60d.tar.bz2 yosys-868b6b1b0dfa7ca1f10392678d7c3c29db37c60d.zip |
Merge pull request #2002 from YosysHQ/dave/cxxrtl-width
cxxrtl: Round up constant width
Diffstat (limited to 'backends')
-rw-r--r-- | backends/cxxrtl/cxxrtl.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/backends/cxxrtl/cxxrtl.cc b/backends/cxxrtl/cxxrtl.cc index e5351a387..e7711962f 100644 --- 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) |