Breaking News
Comments
Newest First | Oldest First | Threaded View
Page 1 / 3   >   >>
paragdighe
User Rank
Rookie
its fixed point math
paragdighe   12/10/2013 4:45:31 AM
NO RATINGS
1 saves
here's why it works: x/10=x*0.1={2^16*x*0.1}/2^16={x*2^16*0.1}/2^16 =x*1999H/2^16 

DrFPGA
User Rank
Blogger
Re: Know the limitations of your tools
DrFPGA   12/9/2013 2:37:47 PM
NO RATINGS
Very important point and one difficult to do in practice. How many tools actually document (in detail) what the tool will do or not do. I find I need to do small example designs and look over th output of the place and route tool to figure out what is going on. Widh the vendors did this for me!

Anyone else have tools with detailed enough docs that they can tell ahead of time what is being done?

betajet
User Rank
CEO
Know the limitations of your tools
betajet   12/9/2013 2:20:02 PM
NO RATINGS
I remember the first time I synthesized an FPGA design for a real product.  The synthesizer automatically came up with a one-hot state machine coding.  Everything simulated fine.   Unfortunately, this particular design did not have a well-formed clock when connecting or disconnecting the input signal, which would cause it to lose the one-hot code occasionally when reconnecting.  Switching to a manual state coding that automatically recovered from bad states fixed the problem -- and saved logic cells in this case.

Lesson 1:  Don't trust automatic state assignment.  Some synthesizers make it hard to turn off automatic state assignment, but it's worth the effort.

Lesson 2:  Don't trust simulation.  It only simulates theoretical models, not the real world.

Lessons 1+2 combined and generalized:  Know the limitations of your tools.

DrFPGA
User Rank
Blogger
Re: math links
DrFPGA   12/9/2013 11:02:27 AM
NO RATINGS
Remember when we had to do many of the FPGA tricks by hand? Register retiming, one hot state machines, if then else to mux conversions? Now the synthesis tools do all this for us. Hopefully tricks like the multiply by a constant will get folded in too. Just depends on how common the need is for these tricks I guess.

Maybe there should be a 'list' of tricks that users suggest would be good to put into synthesis tools. Perhaps via a discussion thread on Programmable Logic Design Line?

Max The Magnificent
User Rank
Blogger
Re: math links
Max The Magnificent   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

Max The Magnificent
User Rank
Blogger
Re: math links
Max The Magnificent   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 :-)

 

Adam-Taylor
User Rank
Blogger
How the divisor works
Adam-Taylor   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.

 

Adam-Taylor
User Rank
Blogger
Re: How FPGA do math
Adam-Taylor   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

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

Thanx for posting the link to your article. Very detailed and even had some code!

tom-ii
User Rank
Blogger
Re: How FPGA do math
tom-ii   12/8/2013 10:31:35 AM
NO RATINGS
@Adam:

 

Of course I don't mind!

Page 1 / 3   >   >>


EE Life
Frankenstein's Fix, Teardowns, Sideshows, Design Contests, Reader Content & More
Max Maxfield

Dr. Duino Diagnostic Shield Deduces Dilemmas in Arduino Shield Stacks
Max Maxfield
9 comments
As you are probably aware, I'm spending a lot of my free time creating Arduino-based projects, such as my Inamorata Prognostication Engine, my BADASS Display, and my Vetinari Clock.

EDN Staff

11 Summer Vacation Spots for Engineers
EDN Staff
20 comments
This collection of places from technology history, museums, and modern marvels is a roadmap for an engineering adventure that will take you around the world. Here are just a few spots ...

Glen Chenier

Engineers Solve Analog/Digital Problem, Invent Creative Expletives
Glen Chenier
15 comments
- An analog engineer and a digital engineer join forces, use their respective skills, and pull a few bunnies out of a hat to troubleshoot a system with which they are completely ...

Larry Desjardin

Engineers Should Study Finance: 5 Reasons Why
Larry Desjardin
46 comments
I'm a big proponent of engineers learning financial basics. Why? Because engineers are making decisions all the time, in multiple ways. Having a good financial understanding guides these ...

Flash Poll
Top Comments of the Week
Like Us on Facebook
EE Times on Twitter
EE Times Twitter Feed

Datasheets.com Parts Search

185 million searchable parts
(please enter a part number or hit search to begin)