3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2025-08-05 10:50:25 +00:00

cxxrtl: Fix value::ctlz

This commit is contained in:
Merry 2023-12-13 12:15:12 +00:00
parent ded63bedd5
commit d7cb6981b5
2 changed files with 9 additions and 2 deletions

View file

@ -36,4 +36,10 @@ int main()
cxxrtl::value<64> c = a.sshr(b);
assert(c.get<uint64_t>() == 0xffffffff8abcdef1u);
}
}
{
// ctlz should work with Bits that are a multiple of chunk size
cxxrtl::value<32> a(0x00040000u);
assert(a.ctlz() == 13);
}
}