Visible to Intel only — GUID: mwh1409959926057
Ixiasoft
Visible to Intel only — GUID: mwh1409959926057
Ixiasoft
3.5.18. Using altera_attribute to Set Intel® Quartus® Prime Logic Options
The altera_attribute attribute allows you to apply Intel® Quartus® Prime logic options and assignments to an object in your HDL source code. You can set this attribute on an entity, architecture, instance, register, RAM block, or I/O pin. You cannot set it on an arbitrary combinational node such as a net. With altera_attribute, you can control synthesis options from your HDL source even when the options lack a specific HDL synthesis attribute. You can also use this attribute to pass entity-level settings and assignments to phases of the Compiler flow that follow Analysis & Synthesis, such as Fitting.
Assignments or settings made through the Intel® Quartus® Prime software, the .qsf, or the Tcl interface take precedence over assignments or settings made with the altera_attribute synthesis attribute in your HDL code.
The attribute value is a single string containing a list of .qsf variable assignments separated by semicolons:
-name <variable_1> <value_1>;-name <variable_2> <value_2>[;…]
If the Intel® Quartus® Prime option or assignment includes a target, source, and section tag, you must use the syntax in this example for each .qsf variable assignment:
-name <variable> <value>
-from <source> -to <target> -section_id <section>
This example shows the syntax for the full attribute value, including the optional target, source, and section tags for two different .qsf assignments:
" -name <variable_1> <value_1> [-from <source_1>] [-to <target_1>] [-section_id \ <section_1>]; -name <variable_2> <value_2> [-from <source_2>] [-to <target_2>] \
[-section_id <section_2>] "
HDL | Code |
---|---|
Assigned Value of a Variable in Verilog HDL (With Nonexistent Variable and Value Terms) | |
Assigned Value of a Variable in VHDL (With Nonexistent Variable and Value Terms) | |
To find the .qsf variable name or value corresponding to a specific Intel® Quartus® Prime option or assignment, you can set the option setting or assignment in the Intel® Quartus® Prime software, and then make the changes in the .qsf.
Applying altera_attribute to an Instance
These examples use altera_attribute to set the power-up level of an inferred register.
HDL | Code |
---|---|
Verilog-1995 | |
Verilog-2001 | |
VHDL | |
Applying altera_attribute to an Entity
These examples use the altera_attribute to disable the Auto Shift Register Replacement synthesis option for an entity. To apply the Altera Attribute to a VHDL entity, you must set the attribute on its architecture rather than on the entity itself.
HDL | Code |
---|---|
Verilog-1995 | |
Verilog-2001 | |
VHDL | |
Applying altera_attribute with the -to Option
You can also use altera_attribute for more complex assignments that have more than one instance. In Table 66, the altera_attribute cuts all timing paths from reg1 to reg2, equivalent to this Tcl or .qsf command, as shown in the example below:
set_instance_assignment -name CUT ON -from reg1 -to reg2
HDL | Code |
---|---|
Verilog-1995 | |
Verilog-2001 and SystemVerilog | |
VHDL | |
You can specify either the -to option or the -from option in a single altera_attribute; Integrated Synthesis automatically sets the remaining option to the target of the altera_attribute. You can also specify wildcards for either option. For example, if you specify “*” for the -to option instead of reg2 in these examples, the Intel® Quartus® Prime software cuts all timing paths from reg1 to every other register in this design entity.
You can use the altera_attribute only for entity-level settings, and the assignments (including wildcards) apply only to the current entity.
Did you find the information on this page useful?
Feedback Message
Characters remaining: