A
Allan Herriman
Guest
Hi,
At a client's site I have some legacy VHDL code that is being synthesised
with Xilinx XST 13.1 with Virtex 6 as a target.
This code has some clock domain crossing circuits that use two flip flops
cascaded in the destination clock domain (it's the usual synchroniser
that you've all seen before).
This code worked fine in whatever version of XST it was originally
written for, but with 13.1 I find that these flip flops are being
replaced by SRL32 primitives, the default inference rule being that
whenever XST sees two or more flip flops (without a reset and with the
same control inputs) in series, it replaces them with an SRL.
Obviously, the XST team thought that this was an appropriate thing to do,
but anyone with a modicum of experience should know better.
Question: just how bad are the SRL for this application? Have they even
been characterised?
BTW, there are many possible fixes:
- Put an attribute (SHREG_something_or_other) on each and every
synchroniser to disable SRL inference.
- Disable SRL inference globally (not good).
- Change the XST setting (SHREG_something_else) to 3 so that chains of 2
flip flops are left alone.
- Add a reset (or other control signal that will stop SRL inference) to
each and every synchroniser in the design.
- Wait for XST to be fixed (but don't hold your breath).
Thanks,
Allan
At a client's site I have some legacy VHDL code that is being synthesised
with Xilinx XST 13.1 with Virtex 6 as a target.
This code has some clock domain crossing circuits that use two flip flops
cascaded in the destination clock domain (it's the usual synchroniser
that you've all seen before).
This code worked fine in whatever version of XST it was originally
written for, but with 13.1 I find that these flip flops are being
replaced by SRL32 primitives, the default inference rule being that
whenever XST sees two or more flip flops (without a reset and with the
same control inputs) in series, it replaces them with an SRL.
Obviously, the XST team thought that this was an appropriate thing to do,
but anyone with a modicum of experience should know better.
Question: just how bad are the SRL for this application? Have they even
been characterised?
BTW, there are many possible fixes:
- Put an attribute (SHREG_something_or_other) on each and every
synchroniser to disable SRL inference.
- Disable SRL inference globally (not good).
- Change the XST setting (SHREG_something_else) to 3 so that chains of 2
flip flops are left alone.
- Add a reset (or other control signal that will stop SRL inference) to
each and every synchroniser in the design.
- Wait for XST to be fixed (but don't hold your breath).
Thanks,
Allan