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:
-
controlis 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.
| 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. |