Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What do single-cycle multiplication and hardware division mean?

Tags:

c

embedded

stm32

I am going through a data-sheet and read "Single-cycle multiplication and hardware division" as part of STM32 specifications, i am not sure i understand what that means. From what I read on the Net, multiplication is usually easier to compute than division. Would that mean that STM's can compute both multiplication and division within one cycle?

Please assist.

like image 284
panto111088 Avatar asked Dec 26 '22 03:12

panto111088


1 Answers

When it comes to the multiplier, it means that it takes only one clock cycle (this is, for 100Mhz, 10 nanoseconds) to perform the operation.

However, the division is usually performed in an iterative fashion, bit by bit, and the particular implementation (the core instruction set) should be looked into.

Having a look at Cortex M-Series you see that the multiplication is in fact single-cycle, however the division lasts 2-12 cycles, and in the footnote regarding this:

Division operations use early termination to minimize the number of cycles required based on the number of leading ones and zeroes in the input operands.

Added:

Notice, however, that the only INTxINT multiplications are single-cycle, whereas LONGxLONG last 3-5 cycles (as a LONGxLONG mult can be performed as a combination of INTxINT multiplications and additions)

like image 126
Manex Avatar answered Dec 27 '22 18:12

Manex