Sunday, December 13, 2009

How to Convince Xilinx Not to Optimize Away Your Wires!

As I was writing my last post, I remembered how much trouble my lab partner and I had with Xilinx WebPack 9.2 optimizing away our clock wire during synthesis, along with everything that was attached to (read: everything important). After several hours of fruitless Google searching, I finally came across a tiny blurb in a Xilinx PDF saying that putting

/* syn_keep = 1 */

next to a wire will force it to survive optimization!

I'm not sure about the specifics, but I do know is that it saved our project at the last minute, and it very may well save yours too!

Keep in mind, however, that more than likely there's a reason that Xilinx wants to kill your wires. You probably have other problems somewhere in your code (did you check for latches?). Also, keep in mind that this comment must be put next to each wire that you want to survive, not just at the end of a long declaration with many wires.

Happy coding!

No comments:

Post a Comment