mirror of
https://github.com/YosysHQ/yosys.git
synced 2026-08-22 06:07:26 +02:00
cxxrtl: Fix value::shl
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user