Intel® Quartus® Prime Pro Edition User Guide: Platform Designer

ID 683609
Date 9/26/2022
Public

A newer version of this document is available. Customers should click here to go to the newest version.

Document Table of Contents

2.7.3.2. Wire-Level Expression Syntax

The wire-level expression derives from Verilog syntax. The following is an example and list of legal operators and elements that you can use for wire-level expressions.

Example Expressions:

foo1.port1[5:0] = foo2.port1[5:0]
foo3.port1[8:4] = foo5.port1[4:0] & 5’b10101
foo6.port1[0] = ‘b1
foo7.port1 = foo8.port1
foo9.port1[0] = ~foo10.port1[0] 
foo10.port1[3:0] = foo11.port2[1:0] + 4’b1100
foo12:port1[3:0] = {4{0}}
foo13.port1[7:0] = {foo14.port1[3:0], 4’b0011} 
Table 7.  Ports
Port Description
<instance_name>.<port_name> Whole port
<instance_name>.<port_name>[x] Wire x of port
<instance_name>.<port_name>[y:x] Wires x to y of port. Port ranges must be in decreasing order, for example a[1:0].
<constant base x values> For example: 1, ’b1, 4’hf, 4’o7, 32’d9
Table 8.  Operators (Bitwise)
Operator Description
~ Negation
& AND
| OR
~& NAND
~| NOR
^ XOR
~^ XNOR
Table 9.  Operators (Logical)
Operator Description
? Conditional
! Negation
&& AND
|| OR
Table 10.  Operators (Relational, Equality, and Shift)
Operator Description
> Greater Than
< Less Than
>= Greater Than or Equal To
<= Less Than or Equal To
== Equal To
!= Not Equal To
<< Shift Left
>> Shift Right
Table 11.  Operators (Mathematical)
Operator Description
+ Addition
- Subtraction
* Multiplication
/ Division
% Modulus
Table 12.  Operators (Other)
Operator Description
{integer {x}} Replication of x
{x, y, ...} Concatenation