Constraint Files - Constraint Basics
Each line in a constraint file is referred to as a constraint group, since it applies one or more constraint requirements to an entity in the design. The following examples show a variety of different constraint groups.
Example 1
Record=Constraint | TargetKind=Part | TargetId=XC2S300E-6PQ208C
This constraint targets the part (or FPGA component), in this case specifying the type as XC2S300E-6PQ208C. Note that this device must be supported by the system, select the Design » Add/Modify Constraint » Part menu item to display the Choose Physical Device dialog. This dialog displays all devices supported by the system. This constraint group should only appear once in any configuration.
Example 2
Record=Constraint | TargetKind=Port | TargetId=VGA_VSYN | FPGA_PINNUM=P134
This constraint group targets the net connected to port VGA_VSYN, specifying that it be connected to FPGA pin number P134.
Example 3
Record=Constraint | TargetKind=Port | TargetId=LCD_E | FPGA_PINNUM=P82 | FPGA_IOSTANDARD=LVTTL33 | FPGA_SLEW=SLOW | FPGA_DRIVE=12mA
This constraint group targets the net connected to the port LCD_E, specifying that it be connected to FPGA pin number P82, have an I/O standard of LVTTL33
, a slew setting of SLOW
, and a drive current of 12mA
.
Example 4
Record=Constraint | TargetKind=Port | TargetId=VGA_R[1..0] | FPGA_PINNUM=P145,P141
This constraint group targets both the nets in the bus connected to the port VGA_R[1..0]
, specifying that the bus element 1 connect to pin P145, and bus element 0 connect to pin P141.