AHDL

위키백과, 우리 모두의 백과사전.

알테라 하드웨어 기술 언어(altera hardware description language, AHDL)는 복합 프로그래머블 논리 소자(CPLD)와 현장 프로그래머블 게이트 어레이(FPGA)를 프로그램 하기 위한 알테라[1]의 자산 하드웨어 기술 언어 (HDL)이다.

알테라의 쿼터스 (quartus)와 맥스+ (max+)의 컴파일러로 컴파일하며, 이 언어는 C 같은 문법을 가지고 VHDL처럼 비슷하게 동작한다.

예제[편집]

간단한 예시로 아래의 코드 조각은 8비트 업카운터를 수행한다.

% a simple AHDL up counter, released to public domain 11/13/2006 %
% [block quotations achieved with percent sign] %
% like c, ahdl functions must be prototyped %

% PROTOTYPE:
 FUNCTION COUNTER (CLK)
	RETURNS (CNTOUT[7..0]); %

% function declaration, where inputs, outputs, and
bidirectional pins are declared %
% also like c, square brakets indicate an array %

SUBDESIGN COUNTER
(
	CLK		:INPUT;
	CNTOUT[7..0]	:OUTPUT;
)

% variables can be anything from flip-flops (as in this case),
tri-state buffers, state machines, to user defined functions %

VARIABLE
	TIMER[7..0]: DFF;

% as with all hardware description languages, think of this
 less as an algorithm and more as wiring nodes together %

BEGIN
	DEFAULTS

		TIMER[].prn = VCC; %  this takes care of d-ff resets %
		TIMER[].clrn = VCC;
	END DEFAULTS;

	TIMER[].d = TIMER[].q + H"1";
END;

같이 보기[편집]

각주[편집]