Velocity Reviews > VHDL > need help in designing normalization

# need help in designing normalization

ledinhkha@gmail.com
Guest
Posts: n/a

 12-10-2005
hi,
i'm new in VHDL, and i'm taking a class about VLSI. My task is to
design a chip that receiving a set of numbers (in serial), then finding
the max and min of the input set and normalize it to the range [0;255].
I've also tried to do in VHDL with Xilinx, and I have a problem with
the divide operator (because i have to divide by my max value). Some
people tell me that we just can divide by a number that is in the form
power of 2 (ex: 1024, 512, ...).
Is there anyone that have ever done sth similar to me? if yes then pls
advice me.
Thks
Kha

usenet_10@stanka-web.de
Guest
Posts: n/a

 12-12-2005

http://www.velocityreviews.com/forums/(E-Mail Removed) schrieb:

> hi,
> i'm new in VHDL, and i'm taking a class about VLSI. My task is to
> design a chip that receiving a set of numbers (in serial), then finding
> the max and min of the input set and normalize it to the range [0;255].
> I've also tried to do in VHDL with Xilinx, and I have a problem with
> the divide operator (because i have to divide by my max value). Some
> people tell me that we just can divide by a number that is in the form
> power of 2 (ex: 1024, 512, ...).

Thats wrong, you could easy divide by 2^n by shifting, while dividing
by integer is a bit harder in digital devices. I would recommend you
start with simple designs for learning vhdl before doing that task
above.
Dividing is often done serial because of area and timing constraints,
search serial dividers (or parallel dividers) for more.

bye Thomas

ledinhkha@gmail.com
Guest
Posts: n/a

 12-12-2005
thks so much, Thomas. I will try by some simple designs, and finding
about serial dividers to read.
Have a nice day!
Kha

Ray Andraka
Guest
Posts: n/a

 09-06-2006
(E-Mail Removed) wrote:
> hi,
> i'm new in VHDL, and i'm taking a class about VLSI. My task is to
> design a chip that receiving a set of numbers (in serial), then finding
> the max and min of the input set and normalize it to the range [0;255].
> I've also tried to do in VHDL with Xilinx, and I have a problem with
> the divide operator (because i have to divide by my max value). Some
> people tell me that we just can divide by a number that is in the form
> power of 2 (ex: 1024, 512, ...).
> Is there anyone that have ever done sth similar to me? if yes then pls
> advice me.
> Thks
> Kha
>

You'll need a buffer to hold the samples while you find the min and max.
You didn't mention how many bits your input data is.

Division can be done as a multiplication by the reciprocal of the
divisor, in which case the reciprocal can come from a look-up table in
block RAM. For larger numbers of bits, this obviously gets cumbersome.
You can improve the range by using the upper bits of the divisor to
address a reciprocal, and then the lower bits to address an
interpolation slope table, and use that to do a linear interpolation to
get a more precise answer. That provides a fairly compact, and one of
the fastest ways to do a 16 bit divide in an FPGA. If you need more
precision, look up array divider or restoring or non-restoring division.

KJ
Guest
Posts: n/a

 09-06-2006
> Division can be done as a multiplication by the reciprocal of the
> divisor, in which case the reciprocal can come from a look-up table in
> block RAM. For larger numbers of bits, this obviously gets cumbersome.

You can also divide by simply using the lpm_divide function that is
part of the EIA standard LPM package.

KJ

 Thread Tools

 Posting Rules You may not post new threads You may not post replies You may not post attachments You may not edit your posts BB code is On Smilies are On [IMG] code is On HTML code is OffTrackbacks are On Pingbacks are On Refbacks are Off Forum Rules

 Similar Threads Thread Thread Starter Forum Replies Last Post William Ahern C Programming 4 09-19-2006 02:19 PM Aaron Gray HTML 15 02-05-2006 11:47 PM Python 0 06-12-2004 02:22 AM Chris Java 2 05-04-2004 12:18 AM Rakesh Kumar C++ 14 04-28-2004 04:08 PM

Advertisments