We are using an fpga with limited resources, the IGLOO Nano, so to implement all our functionality, we need to share a FIFO between two different vhdl components, which are using different clocks.
The functionality is as shown below:
DATA(SCLK) -->|------| |----------|
| MUX |------------->|DATA |
DATA (CLK) -->|------| | |
| FIFO |
SCLK ---->|------| | |
| MUX |------------->|WCLK |
CLK ---->|------| |----------|
SCLK=27MHz and CLK=13.5MHz are not related.
DATA is either synchronous with the SCLK or CLK, depending on which is selected in the MUX.
The synthesizer tool shows a warning: While analyzing gated clock network, ambiguities have been found on gates
My problem is that DATA is not clocked correctly into the FIFO, and the post place and route simulation confirms this. The DATA is not correctly aligned with WCLK, when arriving at the FIFO input port.
How do I constrain a design like shown above, so data is always synchronous with the WCLK ?
EDIT: additional information, the MUX select pin does not change often.
CLK
is exactly half the rate ofSCLK
, is there a way to make them related? It seems that doing this would make the scenario much simpler, as you could then implement all the logic usingSCLK
with anenable
signal. \$\endgroup\$BUFGMUX
). Other solutions are probably better though. \$\endgroup\$