Questions tagged [floating-point]
The floating-point tag has no usage guidance, but it has a tag wiki.
97 questions
2
votes
0
answers
76
views
STM32 RAM memory write HARD FAULT
I'm using STM32H755ZIT6 and I do have a global array in main.c file of CortexM7 :
...
1
vote
2
answers
209
views
Dealing with denorms in the ARM Cortex M4 FPU
Okay, a year ago I asked this other question and got zero responses.
Now, I will try to get a little more specific: The ARM chip that is in this product is the STM32F407 and I got the docs on that ...
0
votes
1
answer
45
views
Why is this extra MUX here when shifting mantissa as part of a FP add?
My textbook (Harris and Harris, Digital Design and Computer Architecture) asks us to design a simplified (in that only positive numbers be considered, with NaN and infinities ignored) FP adder block. ...
0
votes
1
answer
1k
views
How to convert floating point numbers to fixed point for use in a Verilog table? [closed]
I have a LUT in I need to assign values. They are in the range of 0 to 3.3. This is the code:
...
-1
votes
2
answers
217
views
-1
votes
1
answer
94
views
Is floating point IEEE754 binary digit represented using special unit/circuit for arithmetic operation?
We know that two un/signed integers arithmetic operation using special circuit called full-adder to execute arithmetic operation in Arithmetic Logic Unit (ALU).
The full-adder I mean is classical ...
1
vote
0
answers
75
views
Are there now 64-bit processors that deal with denorms routinely with no exception or interrupt? [closed]
Title says it all.
Are there processors with FPUs that deal with denorms arithmetically correctly (don't assume they're zero nor flush them to zero) and don't cause an exception? I would be interested ...
3
votes
1
answer
113
views
Floating point arithmetic - unexpected results in certain test cases
I was hoping I could get some help with a floating point adder I'm designing in verilog. The test case I am having trouble with is adding the following 2 numbers:
...
-1
votes
1
answer
135
views
What is the best adder to use inside a FPU unit?
I have this college assignment where I was asked to implement a FPU (floating point unit) that adds numbers using only Verilog, but that's not a problem here.
The problem is that I must use a 32-bit ...
0
votes
2
answers
474
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 ...
1
vote
0
answers
259
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 ...
1
vote
1
answer
3k
views
Print float value over UART with STM32
I am working with an STM32, more specifically an STM32F401RE. I am trying to send some float value over UART by using the printf command.
When I execute the code, ...
2
votes
1
answer
1k
views
STM32F4 PLC Integer Calculation vs Float Calculation
I am using a PLC that uses a STM32F4 as its processor.
The PLC software has Integer and Float calculation commands. When I work with floating point numbers I usually try to use integer calculations ...
1
vote
1
answer
290
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 ...
-1
votes
1
answer
162
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 ...
0
votes
2
answers
679
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 ...
4
votes
1
answer
3k
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 ...
0
votes
1
answer
309
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 ...
1
vote
4
answers
1k
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 ...
3
votes
2
answers
416
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 ...
22
votes
9
answers
11k
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 ...
2
votes
2
answers
3k
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 ...
0
votes
1
answer
162
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:
...
40
votes
6
answers
8k
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 ...
1
vote
1
answer
2k
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"...
12
votes
3
answers
6k
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 ...
0
votes
1
answer
76
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 ...
1
vote
1
answer
82
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 ...
1
vote
0
answers
76
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_{...
0
votes
2
answers
184
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 ...
2
votes
1
answer
2k
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 ...
2
votes
1
answer
408
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 ...
1
vote
3
answers
194
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:
...
0
votes
2
answers
4k
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 ...
1
vote
1
answer
270
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 ...
1
vote
3
answers
1k
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 ...
1
vote
2
answers
309
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 ...
0
votes
2
answers
133
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 ...
4
votes
0
answers
106
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 ...
1
vote
1
answer
1k
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....
1
vote
1
answer
354
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 ...
0
votes
1
answer
1k
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.
...
2
votes
2
answers
3k
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:
...
0
votes
2
answers
8k
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....
5
votes
0
answers
566
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 ...
0
votes
1
answer
509
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
4
votes
3
answers
4k
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, ...
6
votes
1
answer
5k
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 ...
3
votes
3
answers
2k
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 ...
4
votes
2
answers
2k
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 ...