Using Numbers

Numbers are used to specify constant values in Boolean expressions and equations, arithmetic expressions, and parameter values. AHDL supports all combinations of decimal, binary, octal, and hexadecimal numbers.

The decode1.tdf file shown below is an address decoder that generates an active-high chip enable when the address is 370 Hex.

SUBDESIGN decode1 
   address[15..0] : INPUT; 
   chip_enable    : OUTPUT;
   chip_enable = (address[15..0] == H"0370");

In this sample file, the decimal numbers 15 and 0 are used to specify bits of the address bus. The hexadecimal number H"0370" specifies the address that is decoded.

The following rules apply to numbers:

Back to Top

- Altera -


Created by chm2web html help conversion utility.