Breaking News
<<   <   Page 2 / 3   >   >>
User Rank
Blogger
Re: Fortran is lying to you
12/7/2013 5:48:22 PM
NO RATINGS
@AZskibum:

Fractional fixed point (often referred to as "Q" format) is efficient -- you choose exactly the precision you need, no less and no more -- and the bookkeeping exercise of keeping track of the radix point is not a big deal.

This is actually what I used in my final implementation - We'll get to that in a few weeks, I suppose....  (Max willing)

User Rank
Blogger
12/7/2013 5:49:11 PM
NO RATINGS
Brian,

Interesting stuff.  To be honest, though, I'm a complete n00b, and am teaching myself Verilog at this point.

User Rank
Manager
Re: Fractional arithmetic
12/7/2013 7:50:19 PM
NO RATINGS
I broke out Excel and did some quick fractions.

For a 12-bit number: 1/10 = 409.6/4096 and 410 = 19AH
16 bits: 1/10 = [6,553.6] / [65,536]  and 6,554 = 199AH
24 bits: 1/10 = [1,677,721.6] / [16,777,216] and 1,677,722 = 19 999AH

Yes, I have a habit of putting commas in decimal numbers and spaces in hex numbers. I find it makes them easier to distinguish.

User Rank
Blogger
How FPGA do math
12/8/2013 7:22:29 AM
Hi Tom

good blog, I wrote an article on this for Xcell a few years ago hope you do not mind me linking to it here

http://www.eetimes.com/document.asp?doc_id=1279807

User Rank
Blogger
Re: How FPGA do math
12/8/2013 10:31:35 AM
NO RATINGS

Of course I don't mind!

User Rank
Blogger
Re: How FPGA do math
12/8/2013 11:49:13 PM
NO RATINGS

User Rank
Blogger
Re: How FPGA do math
12/9/2013 3:47:20 AM
NO RATINGS
You are welcome I tried to make it as simple as possible to explain within the 2000 word limit how to do maths in FPGA's

The more complex things like filters and CORDICs etc are covered in other articles

I find a simple example often helps to demonstrate the principles

User Rank
Blogger
How the divisor works
12/9/2013 4:04:30 AM
NO RATINGS
1 saves
The divider works because the 0x199A for a 16 bit number is the reciprocal of 10 which is 1/10 or 0.1

This is then scaled by integer(2**16 * 0.1) = 6554 or 0x199A doing the multiply then works out the same as doing the divide. This trick can be used for any number when the divisor is fixed.

User Rank
Blogger
12/9/2013 10:01:11 AM
NO RATINGS
1 saves
@Brian: There's some nice material about constant division on the companion website for "Hacker's Delight"

I was going to mention that book Hacker's Delight -- it's a great book -- lots of useful tricks in it. I just now found there's a second edition (the link above) -- I have th efirst -- I'll have to add this second edition to my wish list :-)

User Rank
Blogger
12/9/2013 10:04:24 AM
NO RATINGS
@Kris: Pretty cool math...I wonder whether they teach something like that in vlsi classes...

I'd be interested to knwo that myself -- but I fear not. When I started out, everyone knew and "swapped" tips and tricks like this -- it was key to making programs run as fast as possible when you were limited in terms of memory size, clock frequency, and the fac tthat CPUs too multiple cycles to do anything.

Magazines like BYTE were always publishing stuff like this... I love this stuff

<<   <   Page 2 / 3   >   >>

12/21/2014
2:03:24 PM
Flash Poll

#### Datasheets.com Parts Search

##### 185 million searchable parts (please enter a part number or hit search to begin)
Frankenstein's Fix, Teardowns, Sideshows, Design Contests, Reader Content & More
Betajet">

The Circle – The Future's Imperfect in the Present Tense 5 comments
The Circle, a satirical, dystopian novel published in 2013 by San Francisco-based writer Dave Eggers, is about a large, very powerful technology company that combines aspects of Google, ...

I'm not sure if I read more than most folks or not, but I do I know that I spend quite a lot of time reading. I hate to be idle, so I always have a book or two somewhere about my person -- ...

latest comment betajet

Vincent Valentine is a man on a mission. He wants to make the first house to ever have a telephone into a telephone museum. Without help, it may not happen.

As every developer knows, there are the paper specifications for a product design, and then there are the real requirements. The paper specs are dry, bland, and rigidly numeric, making ...

latest comment MWagner_MA
Special Video Section
The LT8640 is a 42V, 5A synchronous step-down regulator ...
5:52
The LTC2000 high-speed DAC has low noise and excellent ...
5:14
How do you protect the load and ensure output continues to ...
6:54
General-purpose DACs have applications in instrumentation, ...
7:34
Linear Technology demonstrates its latest measurement ...
10:29
Demos from Maxim Integrated at Electronica 2014 show ...
4:17
Bosch CEO Stefan Finkbeiner shows off latest combo and ...
5:59
STMicroelectronics demoed this simple gesture control ...
2:15
Keysight shows you what signals lurk in real-time at 510MHz ...
4:17
TE Connectivity's clear-plastic, full-size model car shows ...
3:42
Why culture makes Linear Tech a winner.
6:08
Recently formed Architects of Modern Power consortium ...
6:39
Specially modified Corvette C7 Stingray responds to ex Indy ...
8:52
Avago’s ACPL-K30T is the first solid-state driver qualified ...
2:42
NXP launches its line of multi-gate, multifunction, ...
4:56
Doug Bailey, VP of marketing at Power Integrations, gives a ...
9:28
See how to ease software bring-up with DesignWare IP ...
5:19
DesignWare IP Prototyping Kits enable fast software ...
4:01
This video explores the LT3086, a new member of our LDO+ ...
7:03
In today’s modern electronic systems, the need for power ...
5:48