Monday 29 March 2021

What is a virtual clock ?

  •  What is a virtual clock and why are virtual clocks used in the SDC file?

A virtual clock is a clock that exists but is not associated with any pin or port of the design. It is used as a reference in timing analysis to specify the input and output delays relative to a clock.

The following is an example where virtual clock is applicable:

  • The design under analysis gets its clock from CK_DRIVER1, but the clock driving the input port OBJ_IN is CLK_IN.
  • How can I specify the IO constraint on the input port OBJ_IN in such cases? The same issue occurs on the output port OBJ_OUT.
  • To handle such cases, a virtual clock can be defined with no specification of the source port or pin. In the example (diagram), the virtual clock is defined for CK_DRIVER1 and  CK_DRIVER2.
  • A TCLCMD-1142 warning message will also be issued when a virtual clock is created. If the intent is to create a virtual clock, this warning can be ignored. However, if a virtual clock was not expected, edit the create_clock constraint in the SDC file to include the clock source information to avoid this warning message.

    •  create_clock -name VIRTUAL_ CK_DRIVER1 -period 10 -waveform {2 8}

**WARN: (TCLCMD-1142): Virtual clock 'VIRTUAL_ CK_DRIVER1 ' is being created with no source objects.

    • create_clock -name VIRTUAL_ CK_DRIVER2 -period 8 -waveform {0 4}

**WARN: (TCLCMD-1142): Virtual clock 'VIRTUAL_ CK_DRIVER2  is being created with no source objects.

    •  create_clock -name CLK_IN -period 10 [get_ports CLK_IN]

Having defined these virtual clocks, the IO constraints can be specified relative to this virtual clock.

    •  set_input_delay -clock VIRTUAL_ CK_DRIVER1 -max 2.7 [get_ports OBJ_IN]
    •  set_output_delay -clock VIRTUAL_ CK_DRIVER2 -max 4.5 [get_ports OBJ_OUT]
  • The use of virtual clocks is just one approach to constrain the inputs and outputs. You may choose other methods to constrain the IOs as well.
  • The virtual clocks are always considered ideal. Therefore, when clocks are put into propagated mode to calculate the actual delays through the clock network, these virtual clocks cannot be propagated and will issue the following warning message:

    •  set_propagated_clock [all_clocks]

**WARN: (TCLCMD-986): Clock waveform 'VIRTUAL_ CK_DRIVER1' cannot be propagated as this is a virtual clock.



No comments:

Post a Comment