Conditional Rights Definition - 2024.2 English - 2024.1 English

Vivado Design Suite User Guide: Creating and Packaging Custom IP (UG1118)

Document ID
UG1118
Release Date
2024-11-13
Version
2024.2 English

Conditional rights let IP authors specify different access rights under different evaluated conditions. The basic syntax for defining a conditional access right is:

`protect control <right> = <condition> ? <true_expression> : <false_expression>

Where:

  • control is the keyword identifying an access right.
  • <right> is the access right being defined.
  • <condition> is a condition test for the specified access right.
  • <true_expression> is the rights expression applied when the <condition> is true.
  • <false_expression> is the rights expression applied when the <condition> is false.
  • When <condition> evaluates as true, the right takes the value of <true_expression, else right gets the value of <false_expression>.

For example:

`protect control decryption = (xilinx_activity==simulation) ? "false" : "true"

The results of the conditional expression defined above are detailed in the following table.

Table 1. Conditional Expression Evaluated
xilinx_activity Condition (xilinx_activity==simulation) ?: Expression Result Comment
simulation true "false" Source data is not decrypted.
synthesis false "true" Source data is decrypted.
implementation false "true" Source data is decrypted.