HLS assigns initial values to variables over 64bit

    ap_uint<128> P; 
    P.range(127, 64) = 0xffffffffffffffff;
    P.range(63, 0) = 0xfffffffffffffffb;

As shown above, to Passign 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 Pthe value assigned can only be 0xfffffffffffffffb. Special attention should be paid to novices when using.

Published 10 original articles · won praise 0 · Views 6261

Guess you like

Origin blog.csdn.net/u010379248/article/details/102101640