Creating a New Rule

  1. Select Tools > Rule Editor.

The Rule Editor Dialog Box is displayed.

  1. Click the New Rule icon. The Rules Wizard is displayed.
  1. Enter a name for the new rule in the Name field.
  1. Enter a description for the rule in the Description field.
  1. In the Failure answer field, enter some text that will be returned if the attempted assignment breaks this rule.
  1. Click Next.
  1. Set whether the rule will allow or forbid placements.

This information appears in the window at the bottom of the Rules Wizard.

  1. Click Next.

The next pages allow primitives and conditions for signals and pin conditions to be defined.

  1. Double-click the required primitive or use the arrow controls to move it from the Available Primitives: list into the Rule Primitives: list.

The Edit Primitive Value(s) Dialog Box is displayed.

  1. In the Operator: field, select the required operator for the primitive.

The rule is executed when the primitive is, is not, contains, does not contain, matches, or does not match the values defined in the Operand: field or selected from the list of available values (present depending upon the type of operator).

  1. Enter value(s) into the Operand: field or select them from the list of available values (present depending upon the type of operator). This field is case sensitive.

Regular Expression Filters may be used to specify values. Clicking the arrow next to the Operand: field gives suggestions of commonly used regular expression filters.

  1. Click OK.

Primitive details are added to the window at the bottom of the Rules Wizard.

  1. Click Add Term to make more rule assignments for a different set of signals (optional).
Note

When setting “Allow” rules, any signals or pins which do not qualify the rule will be disallowed by default. If you want all signals and pins to be usable, ensure that you set additional terms to allow those signals and pins to be assigned. This is demonstrated in "Setting a Rule for an FPGA Device".

 
  1. Repeat step 10 to add further primitives to the rule if required.
  1. Click Next.
  1. Click Finish.

The rule is created and will be present in the Rules: field in the Rule Editor Dialog Box.

Example 7-1. Setting a Rule for an FPGA Device

The following example creates locate rules for an FPGA device. The intent of the rule is to locate the ALU busses and strobe to banks 6 and 10 in the top left quadrant of the Xilinx Virtex 4 part.

  1. In an FPGA database, select Tools > Rule Editor to open the Rule Manager dialog.
  1. Click the New Rule icon to create a new rule.

The Set rule name and description page allows you to enter a name for the new rule in the Name field, a description for the rule in the Description field, and in the Failure answer field, you can enter some text that will be returned if the attempted assignment breaks this rule.

  1. Click Next.
  1. On the Rule scope page, set the following primitives by double-clicking them from the list of Available Primitives:
  1. Click Next.
  1. Select Allow assignments.
  1. On the Pins condition page, set the following primitives by double-clicking them from the list of Available Primitives:
  1. On the Signal conditions page, double-click Signal Name from the list of Available Primitives. Set the primitive to:

This sets the primitive to use all signals that start with “ALU”.

  1. The final step is to add an additional term that states “do nothing” for the remaining signals. This in effect “releases” the remaining signals to be assigned as needed.
  1. Click Add Term.
  1. On the Signal conditions page, double-click Signal Name from the list of Available Primitives.
  1. Set the primitive to: Signal Name not matches ^ALU.*

This adds a term to the rule to allow use of signals that don’t start with “ALU”.

Additional terms can also be set up to make more rule assignments for a different set of signals.