Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

VHDL Xilinx divide generator V3.0

Status
Not open for further replies.

abimann

Member level 4
Joined
Jun 21, 2016
Messages
77
Helped
0
Reputation
0
Reaction score
0
Trophy points
6
Activity points
673
How to divide range of numbers from -32767 to +32767 and get according data from -1 to +1.

So i use signed core, reminder type both fractional and reminder too.

It is OK, when results must be 1 or more,but when result must be less then 1, that gave wrong number.
When result must be more then 1, quotient show right results in two's compliment digits (according to datasheet) . But !!! fractional part is mad, cannot use two's compliment digit conversion. when i divide any digit by 32767 (0111111111111111) and in fractional result is always equal to dividend. I try fractional part 32-bit width but no luck.

Why it doesnot work ? Does anyone meet this problem ?
 

You missed to specify the intended number range of dividend, divisor and quotient.

E.g. if you are dividing 16 bit by 16 bit and want 16 integer and 16 fractional result bits, you'll extend the dividend by 16 zero bits on the right and perform a 32 by 16 bit division. The higher 16 quotient bit are the integer result, the 16 lower bit the fraction.

Its rather easy to visualize the method by pencil and paper or with a pocket calculator.
 

(1/32767) is a constant value. you would convert this to an appropriated fixed point value and perform a multiplication that provides the required precision.

Either that or you detect the "10000...0" sequence and just trim it down to 1000...01".
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top