On Sat, 02 Aug 2008 00:20:23 -0700, Mike Treseler <
[email protected]>
wrote:
>utauta wrote:
>> I wanted to know what are the common pitfalls/mistakes made when the
>> simulation of a design works, but the same code implemented on the
>> FPGA does not.
>
>Sometimes,
>[] a pin assignment doesn't match the board
>[] an unassigned pin gets a default assignment to a random node.
In Xilinx, check the Map report files (map.mrp or mydesign.mrp) to
diagnose these. Also check for I/O logic types voltages appropriate to
your board, and I/O flip-flops being created as you expect. (If not, I/O
timings will be MUCH slower than you expect)
My experience puts most of these problems as I/O related; maybe 60% of
them.
>[] unclocked logic or unintended latches don't happen to work
Again with Xilinx, there are pitfalls associated with DLL use for clock
generation: here are a few
(a) "reset" to a DLL must be active for some time (these have changed
over the years; check the actual
FPGA's most recent documentation,
and/or search the answers database! older documents for V2Pro said 4
cycles but newer ones may say more)
(b) don't clock the reset timer from the DLL output clock; it's inactive
during reset so you'll never come out of reset! (don't ask me how I know
:-)
(c) wait for a DLL to lock (sense its "lock" output) before bringing
downstream logic out of reset
(d) don't cascade more than 2 DLLs; the third one won't reliably lock
(e) obey any constraints on clock speeds; especially don't run below 20
(25?) MHz on the main clock; that's why there are divided clock
outputs...
Bring clock and reset signals out on unused pins to observe these
problems.
>[] undocumented timing constraint on a reused entity.
Or the simulation model of the outside world doesn't match reality; e.g.
you haven't correctly accounted for clock timings to external memories,
or you are using simple models instead of the manufacturer's models, so
memory timings are different...
If all else fails, there's Chipscope...
- Brian