3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2025-07-24 13:18:56 +00:00

cxxrtl: Fix value::shl

This commit is contained in:
Merry 2023-12-13 12:02:30 +00:00
parent 1c8e58a736
commit ff53f3d2b6
5 changed files with 30 additions and 0 deletions

View file

@ -0,0 +1,15 @@
#include <cassert>
#include <cstdint>
#include "cxxrtl/cxxrtl.h"
int main()
{
{
// shl exceeding Bits should be masked
cxxrtl::value<6> a(1u);
cxxrtl::value<6> b(8u);
cxxrtl::value<6> c = a.shl(b);
assert(c.get<uint64_t>() == 0);
}
}