Resolve L2SDP-162
2 unresolved threads
2 unresolved threads
Closes L2SDP-162
Merge request reports
Activity
1701 1743 RETURN TO_SVEC(dec, 32); 1702 1744 END; 1703 1745 1746 FUNCTION TO_UREAL(uvec : STD_LOGIC_VECTOR) RETURN REAL IS 1786 BEGIN 1787 -- Then scale to real (see TO_SREAL) 1788 RETURN v_real * 2.0**REAL(resolution_w); 1789 END; 1790 1791 FUNCTION TO_SREAL(svec : STD_LOGIC_VECTOR; resolution_w : INTEGER) RETURN REAL IS 1792 -- First convert as signed integer: 1793 VARIABLE v_real : REAL := TO_SREAL(svec); 1794 BEGIN 1795 -- Then scale to real: 1796 -- . The resolution_w is the number of bits that LSbit 0 in svec is after or before the fixed point. 1797 -- . The real value is then scaled by scaling the integer value by 2**resolution_w: 1798 -- . resolution_w = 0 : scale by 2**0 = 1, so no scaling and the value is treated as an integer 1799 -- . resolution_w < 0 : scale up 1800 -- . resolution_w > 0 : scale down 1801 RETURN v_real * 2.0**REAL(resolution_w); changed this line in version 3 of the diff
added 1 commit
- d610c00d - Improved and clarified definition of sign of resolution_w in TO_SREAL().
mentioned in commit 507af0f3
Please register or sign in to reply