You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hey! Awesome library. Can you explain what you mean by the range of a in this section:
In svreal, fixed-point formats are generally determined automatically from the range of the signals they represent. In this case, the range of a is set to +/- 5.0, and the range of b is set to +/- 10.0.
I'm far from a fixed point expert, and am only aware of the Q format to establish bits for integer and fractional widths.
The text was updated successfully, but these errors were encountered:
Glad that you're finding it useful. svreal has three properties associated with each fixed-point signal:
Width: total number of bits for signal. For example, if the width is "8", then signal, when interpreted as a twos-complement integer, goes from -128 (10000000) to +127 (01111111).
Exponent: implicit scale factor multiplied by the signal's integer interpretation to produce its real number interpretation. For example, if the exponent is "-5", and the integer interpretation of the signal is "123", then the real number represented is 123*(2^(-5))=3.84375.
Range: real-number range of the signal. For example, if it is "3", then the real-number interpretation can range from -3 to +3. The upper bound of the range is set by the width and exponent, but it is worth keeping track of the range separately to prevent ranges from growing faster than necessary in computations.
In general, the ranges of inputs to a computation must be specified by the user (or passed in from a higher level of the design hierarchy; see "Passing real-number signals"). So in this case, since "a" and "b" are inputs to the computation, the user has to provide their ranges ("5", meaning +/- 5, and "10", meaning +/-10)
Hey! Awesome library. Can you explain what you mean by the range of
a
in this section:I'm far from a fixed point expert, and am only aware of the Q format to establish bits for integer and fractional widths.
The text was updated successfully, but these errors were encountered: