Questions tagged [floating-point]

The tag has no usage guidance, but it has a tag wiki.

Filter by
Sorted by
Tagged with
0 votes
2 answers
68 views

Synthesize of "REAL VARIABLES" in Vivado 2020.1

I am using the following libraries: library ieee; use ieee.std_logic_1164.all; library ieee_proposed; use ieee_proposed.fixed_pkg.all; use ieee_proposed.fixed_float_types.all; I cannot synthesize real ...
user avatar
  • 1
0 votes
0 answers
31 views

Is there any source of gate counts for components of a modern processor? Specifically looking for AVX2 implementation

I just wrote a simulation of a SIMD unit based on my perceptions of the weaknesses in AVX2, but while the system can generate the underlying gates and have estimates of the cost in silicon of each ...
user avatar
  • 1,599
1 vote
0 answers
77 views

VHDL conversion between signed and float

I've a small IP core module which performs some operations on a float input. The module has been developed using vivado hls. As shown below, the float input of the module is taken as a ...
user avatar
  • 11
1 vote
0 answers
555 views

Print float value over UART with stm32

I am working with an STM32, more specifically an STM32F401RE - I am trying to send over UART some float value by using the printf command. When I execute the code, ...
user avatar
  • 185
1 vote
1 answer
250 views

STM32F4 PLC Integer Calculation vs Float Calculation

I am using a PLC that use a STM32F4 as its processor. The PLC software has Integer and Float calculation commands. When I working with floating point numbers usually trying to use integer calculations ...
user avatar
  • 791
0 votes
1 answer
148 views

How is a Floating Point PRNG designed

Forgive the breadth of my question, but from understanding of basic digital circuits, an integer PRNG outputs a random number by using the XOR of certain bits of a LSFR. using an XOR tap into bits to ...
user avatar
  • 139
0 votes
0 answers
41 views

Implications of CMSIS PID control algorithm variants

Of the CMSIS PID Motor Control there are 3 implementation variants w.r.t. data type used: Q15, Q31, and floating-point. Cause there is little documentation of the library it's difficult to understand ...
user avatar
  • 125
-1 votes
1 answer
80 views

How is the exponent expressed in single precision floating-point number representation using IEEE-754 format

I am learning computer architecture and organization. I am stuck in the following question. Can someone please help me? How is the exponent expressed in single precision floating-point number ...
user avatar
-1 votes
2 answers
315 views

The minimum (negative) value of the exponent in decimal

I am learning computer architecture and organization. I am stuck in the following question. Can someone please help me? For a floating-point representation with 35 bits in the mantissa and 15 bits in ...
user avatar
2 votes
0 answers
435 views

ARM Cortex-M Floating Point Multiply-Accumulate Cycle Time

According to the ARM Cortex M4 technical manual, a floating point multiply accumulate instruction (VMLA.F32) takes 3 cycles. However the separate multiply (VMUL.F32) and add (VADD.F32) instructions ...
user avatar
  • 4,491
0 votes
1 answer
118 views

Floating point representation- Double precision

The difference between 201 and next larger double precision number is 2^P. If IEEE double precision format is used then the value of P is _________? -- I know how number is stored using double ...
user avatar
1 vote
4 answers
934 views

How to code in assembly language for floating point exponentiation?

I have problem calculating raise a to the power of b (a^b) where b is a floating point number. In my case, b=-1.45. So the ...
user avatar
3 votes
2 answers
196 views

How we got exponent as \$2^{127-64}\$?

Information: Consider a 16-bit register of the following format is used to store a floating point number. Mantissa (M) is denoted as normalized signed magnitude fraction, Exponent (E) is expressed in ...
user avatar
  • 135
19 votes
9 answers
6k views

Does the "Avoid using floating-point" rule of thumb apply to a microcontroller with a floating point unit (FPU)?

As a rule of thumb, I try to avoid using floating-point in my embedded system codebase. Floating-point variables are: Computation-intensive Not atomic (can cause problems in an RTOS application or ...
user avatar
  • 527
2 votes
2 answers
2k views

Sending a double type value over CAN Bus

I need help to send a double value using a CAN Bus. I am working on a eletronic traction control and i need to send, by a CAN bus, the calculated values of speed of wheels. The problem start when the ...
user avatar
  • 23
0 votes
1 answer
121 views

Problems with mbed LPC1768 double precision

I have a motion profile generator which calculates a position 1000/sec. During the decelerating portion of the move, the following calculation is used: ...
user avatar
  • 591
40 votes
6 answers
7k views

Why does Intel's Haswell chip allow floating point multiplication to be twice as fast as addition?

I was reading this very interesting question on Stack Overflow: Is integer multiplication really done at the same speed as addition on a modern CPU? One of the comments said: "It's worth nothing ...
user avatar
1 vote
1 answer
1k views

How to convert single precision floating point numbers in a file into their 32 bit representation in VHDL

Test data consists of single precision floating point numbers in a text file. These must be read into testbench and applied to a 32 bit std_logic_vector input port. The numbers can be read in as "real"...
user avatar
  • 1,392
11 votes
3 answers
4k views

VHDL: Why is it hard to design a floating point unit in hardware? [closed]

Floating point calculation basically involves representing units in a scientific notation and then deciding how many bits to devote to the manitssa and exponent. Therefore, all calculations involving ...
user avatar
  • 9,669
0 votes
1 answer
50 views

Does choosing rounding mode have to be costly?

In many floating-point implementations, changing the rounding mode is costly in that it requires a pipeline flush. Is this because there is something particularly complicated about rounding modes, or ...
user avatar
  • 539
1 vote
1 answer
73 views

Is qNaN easier than trapping on overflow?

According to James Demmel's article, "Faster Numerical Algorithms via Exception Handling", IEEE Trans. on Computers 43 (1994), 983-992, the way a floating-point processor handles overflow can be ...
user avatar
  • 539
1 vote
0 answers
75 views

How should be interpreted this note about the floating point?

In an old class notes I have found something that puzzles me since I don't grasp how it works. The notes says **Floating point numbers representation ** In general if \$N=\pm(a_{n-1}...a_{0}...a_{...
user avatar
  • 510
0 votes
2 answers
132 views

Are floating point numbers denormalised before the processor performs arithmetic operations on them? [closed]

Does the processor denormalise the numbers in IEEE 754 notation and normalise the result after storing or are the arithmetic operations performed on the numbers as they are? I'm asking because in case ...
user avatar
2 votes
1 answer
892 views

Transistor count of floating point multiplier

I'm trying to figure out just how expensive floating point fundamentally is, at the hardware level. For example, how many more transistors does a 32-bit multiplier cost in floating point compared to ...
user avatar
  • 539
2 votes
1 answer
218 views

How does the ARM Compiler (Version 5) handle double-precision floats in devices whose floating-point unit hardware only supports single precision?

After reading ARM Compiler version 5's manual, it says that for devices without a floating point unit, floats are dealt with through software implementations, which is likely going to be slower than ...
user avatar
  • 135
1 vote
3 answers
158 views

Convert 4.11 (integer.fraction) to float32

Im getting a value from a register (SRCx_RATIO) from a SHARC DSP, the datasheet says: I'm using the following code to convert the value: ...
user avatar
0 votes
1 answer
2k views

The decimal value 0.5 in IEEE single precision floating point representation?

If I hadn't studied floating point from here my answer would be fraction bits of 000…000 and exponent value of −1 as shown below : But in the link I attached above, they mention Denormalized value in ...
user avatar
  • 103
1 vote
1 answer
201 views

Combinational Linear Shifting VHDL

I am designing a 32 bit floating point pipelined and synthesizable adder/multiplier as part of group for a class in school. I was put in charge of the re-normalization. Part of this is left or right ...
user avatar
1 vote
3 answers
786 views

The NUCLEO F411RE Works with float point?

I need a MCU to works with Wifi and Floating point for PID application. In the later I acquire a Wifi expansion board, but I wants know if the STM32 NUCLEO FR11RE works with a Floating Point. I don't ...
user avatar
  • 191
1 vote
2 answers
256 views

How would you calculate the Mandelbrot set in hardware? [closed]

I'd like to build a small novelty circuit that calculates the Mandelbrot set and displays it on an array of LEDs. The minimum floating point math would not necessarily require complex numbers (just ...
user avatar
  • 3,611
0 votes
2 answers
102 views

Two single-precision versus one double-precision unit

Suppose you are designing a floating point unit, and it is desired that it be capable of both single precision and double precision operation, in the former case not by simply expanding the single ...
user avatar
  • 539
3 votes
0 answers
97 views

Can anyone tell me what other computers used this floating-point format?

I have discovered that the DEC PDP-10 used a floating-point format that differed from IEEE-754 in an interesting way. IEEE-754 is like sign-magnitude representation. The only difference between a ...
user avatar
1 vote
1 answer
726 views

Denormalized Number

I have read that for IEEE-754 Single Precision For E = 0, N = (-1)^S × 0.F × 2^(-126). These numbers are in the so-called denormalized form. The exponent of 2^-126 evaluates to a very small number....
user avatar
1 vote
1 answer
308 views

Problems with implementation of a band-stop filter on an MCU (dsPIC) using fixed-point arithmetic

I'm trying to implement a band-stop (notch) filter on a microcontroller dsPIC33EP64GS506 to filter out a 100 Hz component from ...
user avatar
  • 1,471
0 votes
1 answer
727 views

How can I save a floating point value to a Microcontroller data Flash

I'm trying to save some floating values to the Data flash of my Nuc220(ARM-M0 32 bit) Microcontroller using ISP procedure. ...
user avatar
2 votes
2 answers
2k views

STM32 NaN value for floating point operations on global variables

I am trying to implement a simple Odometry computation loop. Which is being run in a while loop. Following is the code: ...
user avatar
  • 75
0 votes
2 answers
6k views

How to compute acceleration from accelerometer raw data

I'm working on a project based on NXP accelerometer MMA8653. This is a I2C, 3-axial accelerometer with 10-bit resolution. Actually I can read the accelerometer registers and I'm able to configure it....
user avatar
  • 145
4 votes
0 answers
425 views

Floating point addition. Are guard, round and sticky bit always necessaryl? analysis of a special case

I've a particular case of floating point addition. As you know for given floating point numbers \$x,y\$ one of the steps of the addition involves the fixed point sum: $$ s = 1.m_x + (-1)^{s_x \oplus ...
user avatar
0 votes
1 answer
399 views

IEEE 754 standard and C language float data type [closed]

Is IEEE single precision floating point numbers equal to the float data type numbers in C language. Is there a way to check this
user avatar
  • 1
3 votes
3 answers
3k views

STM32 non floating point unit chips

I would like to know how STM32F2 chips and below that doesn't handle floating point unit, perform float operation. I read here, it mentions that the floating point is handled by library functions, ...
user avatar
  • 881
6 votes
1 answer
4k views

STM32F4 : Floating point instructions too slow

I'm working on an audio application on the Nucleo F411RE and I've noticed that my processing was too slow, making the application skip some samples. Looking at my disassembly I figured given the ...
user avatar
  • 370
2 votes
3 answers
1k views

wav file audio samples are signed, how does DAC deal with signed numbers when it does not have negative supply?

I was looking into wav audio file specification, they may hold the pulse coded modulation data as signed our unsigned integers as well as floating point values. How does a DAC deal with signed ...
user avatar
  • 9,669
4 votes
2 answers
1k views

Why comparison of biased representation are faster than two's complement?

Biased representation (or excess-N, offset binary) are used for floating number representation in computers. This wiki page says This allows high speed comparisons Could any one explain why ...
user avatar
  • 143
3 votes
2 answers
26k views

Normalized and denormalized floating point numbers

Regarding the normalized and denormalized representations of binary floating-point numbers (as described in the book by Patterson), I want to know how a denormalized number is really shown. See the ...
user avatar
  • 313
1 vote
2 answers
523 views

avr-gcc float macro error

When I try to compile some code with macro definition at the following definition # define _SPEED_FACTOR0 0.9 //or any float value I get the error floating ...
user avatar
7 votes
1 answer
1k views

TMS320 Floating Point (Texas Instruments DSP from '98)

Background Is there anybody here who is an EE with programming experience who has worked with the Texas Instruments TMS320 C3X-series DSP? I am currently doing some work with the C3X for a project. ...
user avatar
  • 571
0 votes
1 answer
103 views

How to store modify and resend 4 bytes of data from an assembly coded dspic to that in a c compiler based pic18f

I'm using Xc8 compiler and pic18f.Im communicating with a dspic30f ;coded in assembly and receiving a 4 byte variable via i2c. Task: I have to receive the 4 byte packet store,modify it and send back ...
user avatar
  • 2,078
2 votes
3 answers
15k views

Why float data type is not accurate on a STM32?

I'm using STM32F103C8T6 and my compiler is KEIL 5. I have written a simple program to check something but I found out an interesting point. When I download the program to the MCU, ...
user avatar
  • 41
2 votes
0 answers
1k views

Include libraries in GHDL

I'm using GHDL to simulate some designs that I'm doing. Now, I included the float_pkg package to work with floats in Sigasi but when I'm simulating in GHDL it ...
user avatar
0 votes
1 answer
1k views

Converting int to float and vice-versa in HDL

I am trying to write an HDL code for converting floating point numbers in IEEE-754 format to integers and vice-versa. For eg. ...
user avatar
  • 127