Casting - 2024.1 English

Vivado Design Suite User Guide: Synthesis (UG901)

Document ID
UG901
Release Date
2024-05-30
Version
2024.1 English

Assigning a value of one data type to a different data type is illegal in SystemVerilog.

However, a workaround is to use the cast operator ('). The cast operator converts the data type when assigning between different types. The usage is:

casting_type'(expression)

The casting_type is one of the following:

  • integer_type
  • non_integer_type
  • real_type
  • constant unsigned number
  • user-created signing value type