AHDL

Variable Section



The optional Variable Section is used to declare and/or generate any variables used in the Logic Section. AHDL variables are similar to variables in a high-level programming language; they are used to define buried (internal) logic.

The following example shows a Variable Section:

VARIABLE
	a, b, c	[WIDTHAD-1..0]	: NODE;
	ts_node			: TRI_STATE_NODE;
	temp 			: DFFE;

	IF DEVICE_FAMILY == "APEX20K" GENERATE
		20kcounter	: lpm_counter WITH (LPM_WIDTH=WITHAD-1);
	END GENERATE;
NOTE This example uses the predefined Altera® parameter DEVICE_FAMILY, which represents the current device family that you specified for compilation with the Device page of the Settings dialog box (Assignments menu).


The Variable Section can include the following statements or constructs:

NOTE The Variable Section can also contain If Generate Statements which can be used to generate Instance, Node, Register, and State Machine Declarations.

 

The Variable Section has the following characteristics:

NOTE Compiler-generated names that contain the tilde (~) character may appear in the compilation database for a project. If you back-annotate the assignments in the database, these names will then appear in the project's Compiler Settings File (.csf). The tilde character is reserved for Compiler-generated names only; you cannot use it in your own pin, node, and group names.


Back to Top

- PLDWorld -

 

Created by chm2web html help conversion utility.