ap_uint<128> P;
P.range(127, 64) = 0xffffffffffffffff;
P.range(63, 0) = 0xfffffffffffffffb;
As shown above, to P
assign a value to a 128bit variable , if it is directly written P=0xfffffffffffffffffffffffffffffffb
, then the right side of the equal sign can only store 64bit, so P
the value assigned can only be 0xfffffffffffffffb
. Special attention should be paid to novices when using.